From mal at egenix.com Sun May 1 21:29:25 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 13 11:13:29 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <427259F3.4090806@egenix.com> References: <20050427130906.52878.qmail@web30008.mail.mud.yahoo.com> <427259F3.4090806@egenix.com> Message-ID: <42752005.7080904@egenix.com> M.-A. Lemburg wrote: > David Rushby wrote: > >> --- "M.-A. Lemburg" wrote: >> >>> Are you using the standard mxDateTime build or one >>> with WANT_SUBCLASSABLE_TYPES defined... >> >> >> >> Presumably "the standard", since I just built with 'py24d setup.py >> build', making no attempt to enable special directives. >> >> >>> ... (mxDateTime_Deallocate is only used by the latter)? >> >> >> >> That's true in 2.1.0-2005-04-15, but not in 2.1.0b5. >> >> >>> In any case, please try our latest snapshot: >>> >>> >> >> http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-04-15.zip >> >>> to see if that makes any difference. >> >> >> >> I can't build it out of the box: > > > Hmm, looks like distutils' sdist command doesn't like our new > repository layout which uses symlinks (after we've switched to > subversion). > > We'll have to debug distutils first, I guess :-( Ok, we've found the problem and fixed it. Here's the new release (which does build out of the box at least on our boxes ;-): http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 01 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From davidrushby at yahoo.com Mon May 2 15:49:53 2005 From: davidrushby at yahoo.com (David Rushby) Date: Fri Jan 13 11:13:29 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Ok, we've found the problem and fixed it. Here's the new > release (which does build out of the box at least on our > boxes ;-): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip It does build now, but: py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" still behaves as it did when I submitted my original message: Fatal Python error: UNREF invalid object Aborted This is the same debug build of Python 2.4.1 that I was previously using, running the same configuration (CentOS Linux 4.0/i386, everything compiled with GCC 3.4.3). Have you examined my original claim as to the cause of the bug? __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 10:21:55 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 13 11:13:29 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> References: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> Message-ID: <42772693.8050306@egenix.com> David Rushby wrote: > --- "M.-A. Lemburg" wrote: > >>Ok, we've found the problem and fixed it. Here's the new >>release (which does build out of the box at least on our >>boxes ;-): >> >> > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip > > It does build now, but: > py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" > still behaves as it did when I submitted my original message: > Fatal Python error: UNREF invalid object > Aborted > > This is the same debug build of Python 2.4.1 that I was previously > using, running the same configuration (CentOS Linux 4.0/i386, > everything compiled with GCC 3.4.3). > > Have you examined my original claim as to the cause of the bug? No. We haven't had time for looking into it. I'm not sure whether your analysis of the problem is correct: if you don't define WANT_SUBCLASSABLE_TYPES, the API mxDateTime_Deallocate() is neither defined nor used. Furthermore, PyObject_Del() is only called by mxDateTime_Free() if you have explicitely edited mxDateTime.c to disabled the free list #defines. In a standard build, PyObject_Del() is only called at module finalization time. Note that the reason we call mxDateTime_Free() in the constructor is that we don't want the destructor of the object to be called. Py_DECREF() would call the destructor (mxDateTime_Deallocate). It is possible that the debug code in Python complains about the refcount in the object not being 0 at the time the object is finalized (module finalization time), but I don't see any such checks in PyObject_Free() (which is what PyObject_Del() maps to). Again, all of this does not happen in regular non-debug Python builds. Please be aware that we don't support debug builds, so fixing the problem (if there is one - gcc has some serious optimization problems on some combinations of platform and version) will take a while. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 09:27:37 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Fri Jan 13 11:13:29 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 Message-ID: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Hi all- I am trying to build the mx-base package, v.2.0.6. This will be used with postgresql 7.3.9, psycopg 1.1.18, and Roundup 0.8.2. RHEL 3.0 Python 2.3 egenix-mx-base-2.0.6.tar.gz I performed a: /usr/local/bin/python2.3 setup.py install Everything looks proper with the exeception of this series of warning statements: ----------------- gcc -pthread -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fno-strict-aliasing -fPIC -Imx/BeeBase/mxBeeBase -I/usr/local/incl ude/python2.3 -I/usr/local/include -c mx/BeeBase/mxBeeBase/btr.c -o build/temp.linux-i686-2.3/mx/BeeBase/mxBeeBase/mxBeeBa se/mx/BeeBase/mxBeeBase/btr.o mx/BeeBase/mxBeeBase/btr.c: In function `dumpBuf': mx/BeeBase/mxBeeBase/btr.c:249: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:250: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:255: warning: unsigned int format, long unsigned int arg (arg 4) mx/BeeBase/mxBeeBase/btr.c:256: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c: In function `_validateTree': mx/BeeBase/mxBeeBase/btr.c:330: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:337: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:339: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:349: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:351: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 3) creating build/lib.linux-i686-2.3/mx/BeeBase creating build/lib.linux-i686-2.3/mx/BeeBase/mxBeeBase -------------- Would someone be kind enough to let me know whether these messages were expected, and if not, how I might resolve these? Thanks! DC __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 22:06:33 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 13 11:13:29 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> References: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Message-ID: <4277CBB9.8020302@egenix.com> Dianne Chen wrote: > Hi all- > > I am trying to build the mx-base package, v.2.0.6. > This will be used with postgresql 7.3.9, psycopg > 1.1.18, and Roundup 0.8.2. > > RHEL 3.0 > Python 2.3 > egenix-mx-base-2.0.6.tar.gz > > I performed a: > > /usr/local/bin/python2.3 setup.py install > > Everything looks proper with the exeception of this > series of warning statements: > > ----------------- > ... > -------------- > > Would someone be kind enough to let me know whether > these messages were expected, and if not, how I might > resolve these? These warning can safely be ignored. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 13:41:14 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Fri Jan 13 11:13:29 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: 6667 Message-ID: <20050503194114.72091.qmail@web31414.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Dianne Chen wrote: > > Hi all- > > > > I am trying to build the mx-base package, v.2.0.6. > > This will be used with postgresql 7.3.9, psycopg > > 1.1.18, and Roundup 0.8.2. > > > > RHEL 3.0 > > Python 2.3 > > egenix-mx-base-2.0.6.tar.gz > > > > I performed a: > > > > /usr/local/bin/python2.3 setup.py install > > > > Everything looks proper with the exeception of > this > > series of warning statements: > > > > ----------------- > > ... > > -------------- > > > > Would someone be kind enough to let me know > whether > > these messages were expected, and if not, how I > might > > resolve these? > > These warning can safely be ignored. > > -- > Marc-Andre Lemburg > eGenix.com > Marc- Thank you very much for the reply. It helps greatly. With kind regards, DC __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From davidrushby at yahoo.com Tue May 3 17:18:46 2005 From: davidrushby at yahoo.com (David Rushby) Date: Fri Jan 13 11:13:29 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050503231846.35012.qmail@web30009.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > I'm not sure whether your analysis of the problem is correct... Indeed, my original analysis wasn't correct; I think this one is. The fatal error I'm complaining about only arises if the arguments to DateTime.DateTime are invalid, so that the object is deallocated in the onError block of mxDateTime_FromDateAndTime. If the object is created successfully, and later deallocated by Python's garbage collector, the fatal error doesn't arise. Here's my analysis of the problem: --- If the debugging directive Py_TRACE_REFS is enabled, as it is in my case, the Python interpreter maintains a doubly linked list of all Python objects (named refchain) via the _ob_next and _ob_prev pointers added to PyObject via _PyObject_HEAD_EXTRA. Each object is inserted into refchain by the _Py_AddToAllObjects call in _Py_NewReference, and removed from refchain by the _Py_ForgetReference call in _Py_Dealloc. _Py_ForgetReference performs an integrity check on the object being deallocated (op) to make sure that its neighbors in refchain recognize it. Specifically, _Py_ForgetReference verifies that the _ob_next pointer of the previous object in refchain (op->_ob_prev->_ob_next) points to op, and that the _ob_prev pointer of the next object in refchain (op->_ob_next->_ob_prev) points to op. If either of those conditions is false, the interpreter raises the fatal error I'm seeing. After mxDateTime_New pulls an mxDateTimeObject out of the free list, it calls _Py_NewReference on that object to transform it from a "conceptually deallocated" object to a "conceptually allocated" one. _Py_NewReference inserts the object into refchain. Later, when the object is being "conceptually deallocated", it should be removed from refchain with _Py_ForgetReference. The version of _Py_Dealloc that's active when Py_TRACE_REFS is enabled does this (_Py_Dealloc is the element of Py_DECREF that performs the actual destruction). _Py_Dealloc first calls _Py_ForgetReference to remove the object from refchain, then calls the object's destructor (op->ob_type->tp_dealloc). If WANT_SUBCLASSABLE_TYPES is not defined (it is not in my case), the destructor for mxDateTime_Type is mxDateTime_Free. So, if a DateTime object is deallocated normally, as a result of its reference count falling to zero, _Py_Dealloc is called on the object, which first removes it from refchain, then passes it to mxDateTime_Free. If a DateTime object is destroyed prematurely, as a result of invalid arguments to its destructor, the onError handler calls mxDateTime_Free, so the object is "conceptually deallocated" (placed in the free list), *but* the object is not removed from refchain. So if a refchain-membership-integrity-check is performed on the object in question or one of its immediate neighbors in refchain, that integrity check fails, leading to the fatal error. --- The solution is to 'Py_DECREF(...)' the object in the onError handler of its constructor, instead of passing the object directly to mxDateTime_Free. That change solves two problems: 1) It causes _Py_Dealloc to execute, which in turn executes _Py_ForgetReference, so the object is removed from refchain, as it should be. 2) At present, objects that are created successfully and later deallocated by normal reference count mechanics have a reference count of 0 when they enter the free list, whereas objects whose constructors abort their creation due to invalid arguments have a reference count of 1 when they enter the free list. Although AFAIK this doesn't cause an actual execution problem (because the object's reference count is *explicitly set to 1* rather than *incremented by 1* when the object is later "conceptually allocated" by _Py_NewReference), it is likely to confuse future maintainers and thereby lead to the introduction of an actual execution problem. I assume that if you agree that this is a reasonable solution, you'll want to apply the change not only to mxDateTime_FromDateAndTime, but to all similar constructors in mxDateTime.c. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From rj at maxxian.com Thu May 5 01:57:40 2005 From: rj at maxxian.com (RJ Juneau) Date: Fri Jan 13 11:13:29 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c5512e$f72798c0$6505a8c0@rjlaptop> I'm on the 30 day evaluation for mxodbc_zope_da. I'm getting the following error when I submit some queries: Error Type: KeyError Error Value: 'query' I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 with UCS4. The error seems to be caused by multiple rows being returned. I did see an earlier posting with the same error message. The response suggested a template error, but this is clearly not the case here. The additional evidence I've gathered so far: - I'm running the test directly from the ZSQL method, so there's no template involved. - If I use the same query with an additional "where" clause to ensure that only one row is returned, it works - If I use a value in the 'where' clause with no rows returned, it works - The same ZSQL query is being used on a Windows machine running Zope and the free ZODBC module without a problem - The query has been verified directly in mysql-client-browser Other info: - The database is MySQL 4.1.10A-0 - iODBC is the DB driver RJ Juneau -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050505/68d278bf/attachment.htm From mal at egenix.com Thu May 5 12:37:43 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 13 11:13:29 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c5512e$f72798c0$6505a8c0@rjlaptop> References: <000301c5512e$f72798c0$6505a8c0@rjlaptop> Message-ID: <4279E967.6010904@egenix.com> RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 > with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 09:37:42 2005 From: rj at maxxian.com (RJ Juneau) Date: Fri Jan 13 11:13:29 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000101c5516f$3b96de90$6505a8c0@rjlaptop> More interesting info on the problem: If I execute the query directly in the "test" window of the base eGenix mxODBC Database Connection window, it works fine and returns the 20 lines expected. That could point to a problem in the rendering, which seems to be where the traceback ends. Note that within the same Zope system I also have an ODBC connection to a Sybase database, and I have successfully tested multi-line ZSQL queries there. This is the traceback: Time 2005/05/05 07:55:15.294 GMT-4 Exception Type KeyError Exception Value 'query' Traceback (innermost last): Module ZPublisher.Publish, line 101, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 39, in call_object Module Shared.DC.ZRDB.DA, line 337, in manage_test Module DocumentTemplate.DT_String, line 474, in __call__ Module DocumentTemplate.DT_In, line 602, in renderwb Module DocumentTemplate.DT_Var, line 219, in render KeyError: 'query' I don't think the following is an issue, but I'll include it for completeness.I am also getting the following iODBC warnings and errors in the Zope console log, which are related to the ODBC parameters being passed by iODBC. Note that these errors also appear for all of the successful queries. [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (Setup). [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (UsageCount). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Timeout). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Reuse). As for the ZSQL snippet from the template... Since there's no template involved yet (I'm still testing directly from the ZSQL method), I assume you mean the SQL code? select h.host_name, s.system_name, s.system_handle, count(*) from terminal t, system_map s, host h where t.system_index = s.system_index and s.host_index = h.host_index group by s.system_name order by h.host_name Nothing complicated here. There are no parameters passed to the query. RJ -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: May 5, 2005 5:38 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: Re: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is > 2.3.4 with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ---------------------------------------------------------------------- > -- > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 16:00:32 2005 From: charlie at egenix.com (Charlie Clark) Date: Fri Jan 13 11:13:29 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000101c5516f$3b96de90$6505a8c0@rjlaptop> References: <000101c5516f$3b96de90$6505a8c0@rjlaptop> Message-ID: <20050505150032.644.1@bepc.1115296715.fake> On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base eGenix > mxODBC Database Connection window, it works fine and returns the 20 > lines expected. That could point to a problem in the rendering, which > seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection to > a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 10:22:17 2005 From: rj at maxxian.com (RJ Juneau) Date: Fri Jan 13 11:13:29 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505150032.644.1@bepc.1115296715.fake> Message-ID: <000201c55175$75bcad10$6505a8c0@rjlaptop> At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 11:47:14 2005 From: rj at maxxian.com (RJ Juneau) Date: Fri Jan 13 11:13:29 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c55181$549be0e0$6505a8c0@rjlaptop> Charlie, I found a fix. Here it is in case anyone else runs into this. You were correct - the problem is in another part of Zope. Based on your feedback, I did a bit more searching and found something here: http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. html The problem appears to be in Zope versions after 2.7.0. I'm running 2.7.6, and the post indicates that it also happens in 2.7.4. The solution: Edit file /lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. There are two lines in the file that start with . Edit them as follows: Change first line to: Change second line to: Just to be after, I shut down Zope before I made the changes and restarted it after. Thanks for the help! RJ -----Original Message----- From: RJ Juneau [mailto:rj@maxxian.com] Sent: May 5, 2005 9:22 AM To: 'Charlie Clark' Cc: 'egenix-users@lists.egenix.com' Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 17:57:25 2005 From: charlie at egenix.com (Charlie Clark) Date: Fri Jan 13 11:13:29 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <20050505165725.3380.2@bepc.1115296715.fake> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Thu May 5 09:15:21 2005 From: charlie at egenix.com (Charlie Clark) Date: Fri Jan 13 11:13:29 2006 Subject: [Zope-DB] RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <000001c55185$41477730$6b00a8c0@fonacier.local> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________ Zope-DB mailing list Zope-DB@zope.org http://mail.zope.org/mailman/listinfo/zope-db From rj at maxxian.com Thu May 5 12:38:00 2005 From: rj at maxxian.com (RJ Juneau) Date: Fri Jan 13 11:13:29 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000001c55188$6b841eb0$6505a8c0@rjlaptop> I just double-checked. Zope-2.7.6-final. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 12:49:16 2005 From: rj at maxxian.com (RJ Juneau) Date: Fri Jan 13 11:13:29 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000501c55189$fe149ba0$6505a8c0@rjlaptop> Charlie, The fix has only been applied for 2.7.7, 2.8b2. The info is in the original bug report which is closed and can be found here: http://www.zope.org/Collectors/Zope/1745 RJ -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Fri May 6 11:50:09 2005 From: rj at maxxian.com (RJ Juneau) Date: Fri Jan 13 11:13:29 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC Message-ID: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Still on eval for the product. I cannot get a stable connection to Sybase via the iODBC drivers. - The Sybase ODBC connection - including a query - have been verified at the iODBC level. - The setup is already working well for ODBC connection to MySQL. Symptoms include: - If I click on "Open Connection", it still comes back with "Connection Closed" when I go to a ZSQL method - Using 'Connect on Demand' is not working either. - Clicking "Open Connection" gives me the following error: Connection string: DSN=lixbox_sybase; UID=sa; PWD=XXXXXXX Connection pool entry: 0 Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection rejected by data source', 7952) The odbc.ini definition for DSN "lixbox_sybase" is as follows: [lixbox_sybase] JetFix = No NoRowSetSizeLimit = No Description = Test connection to listbox Options = LIXBOX DSQUERY = SQLSERVER TDSHOST = lixbox TDSPORT = 5000 TDSVER = 5.0 SQLSERVER_CATALOG = N CURSOR_SENSITIVITY = LOW UserName = sa Password = XXXXXXXX ServerType = Sybase 10/11/12 Driver = /opt/openlink/lib/sql_mt_lt.so Database = pubs2 ReadOnly = no NoAutoCommit = No NoLoginBox = No FetchBufferSize = 60 Other relevant data: - Connecting via OpenLink's iODBC - Zope 2.7.6-final - Python 2.3.4 - Connection to Sybase has been successfully tested with iODBC, including issuing a query - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC connection RJ Juneau Chief Technology Officer Maxxian Integration Inc. 155 Westhampton Drive Thornhill, Ontario Canada L4J 7X2 E-mail: rj@maxxian.com Phone: +1 905 482 9429 Cell: +1 416 897 6682 Toll free: +1 866 758 9161 Fax: +1 647 722 2038 -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050506/aef33361/attachment.htm From mal at egenix.com Fri May 6 18:27:37 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 13 11:13:29 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC In-Reply-To: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> References: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Message-ID: <427B8CE9.1010601@egenix.com> RJ Juneau wrote: > Still on eval for the product. > > I cannot get a stable connection to Sybase via the iODBC drivers. > > - The Sybase ODBC connection - including a query - have been verified at > the iODBC level. > - The setup is already working well for ODBC connection to MySQL. > > Symptoms include: > > - If I click on "Open Connection", it still comes back with "Connection > Closed" when I go to a ZSQL method > - Using 'Connect on Demand' is not working either. > - Clicking "Open Connection" gives me the following error: > > Connection string: DSN=lixbox_sybase; > UID=sa; > PWD=XXXXXXX Try writing the connection string on one line and without whitespace. ODBC drivers sometimes have problems with this. > Connection pool entry: 0 > Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection > rejected by data source', 7952) This is a generic error that relates to authentication or firewall problems. It is possible that turning on ODBC tracing the ODBC manager will give more clues as to the real cause of the problem. > The odbc.ini definition for DSN "lixbox_sybase" is as follows: > > [lixbox_sybase] > JetFix = No > NoRowSetSizeLimit = No > Description = Test connection to listbox > Options = LIXBOX > DSQUERY = SQLSERVER > TDSHOST = lixbox > TDSPORT = 5000 > TDSVER = 5.0 > SQLSERVER_CATALOG = N > CURSOR_SENSITIVITY = LOW > UserName = sa > Password = XXXXXXXX > ServerType = Sybase 10/11/12 > Driver = /opt/openlink/lib/sql_mt_lt.so > Database = pubs2 > ReadOnly = no > NoAutoCommit = No > NoLoginBox = No > FetchBufferSize = 60 > > > Other relevant data: > - Connecting via OpenLink's iODBC > - Zope 2.7.6-final > - Python 2.3.4 > - Connection to Sybase has been successfully tested with iODBC, > including issuing a query > - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC > connection > > > > RJ Juneau > Chief Technology Officer > Maxxian Integration Inc. > 155 Westhampton Drive > Thornhill, Ontario > Canada L4J 7X2 > E-mail: rj@maxxian.com > Phone: +1 905 482 9429 > Cell: +1 416 897 6682 > Toll free: +1 866 758 9161 > Fax: +1 647 722 2038 > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 06 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From calisp at gmail.com Sun May 15 23:49:03 2005 From: calisp at gmail.com (calisp@gmail.com) Date: Fri Jan 13 11:13:29 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK Message-ID: Hi, I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the following error... 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the last phase of a two-phase commit. This shouldn't happen. Traceback (most recent call last): File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one jar.tpc_finish(self) File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish try: self._finish() File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could not perform COMMIT or ROLLBACK', 1023) What could be causing this? Can I get the mxODBCZopeDA source from somewhere? It would make debugging this much easier. Thanks, Calisp. From mal at egenix.com Mon May 16 13:52:12 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 13 11:13:29 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK In-Reply-To: References: Message-ID: <42887B5C.4010109@egenix.com> calisp@gmail.com wrote: > Hi, > > I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with > unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the > following error... > > 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the > last phase of a two-phase commit. This shouldn't happen. > Traceback (most recent call last): > File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one > jar.tpc_finish(self) > File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish > try: self._finish() > File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish > File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler > ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could > not perform COMMIT or ROLLBACK', 1023) You should have a look at the database logs to see what prevented the commit from being completed. > What could be causing this? Hard to say: mxODBCZopeDA is trying to commit the transaction, but the driver or database failed to complete the request. The above error was generated by the ODBC driver. This could be network or DNS problems, or be related to a bug in FreeTDS (which is getting more stable with every new release, but should still be considered beta quality software at the moment). > Can I get the mxODBCZopeDA source from > somewhere? It would make debugging this much easier. Getting the source is not an option and won't help much either since the source of the problem is not mxODBCZopeDA. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 16 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Sun May 1 21:29:25 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 13 15:14:00 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <427259F3.4090806@egenix.com> References: <20050427130906.52878.qmail@web30008.mail.mud.yahoo.com> <427259F3.4090806@egenix.com> Message-ID: <42752005.7080904@egenix.com> M.-A. Lemburg wrote: > David Rushby wrote: > >> --- "M.-A. Lemburg" wrote: >> >>> Are you using the standard mxDateTime build or one >>> with WANT_SUBCLASSABLE_TYPES defined... >> >> >> >> Presumably "the standard", since I just built with 'py24d setup.py >> build', making no attempt to enable special directives. >> >> >>> ... (mxDateTime_Deallocate is only used by the latter)? >> >> >> >> That's true in 2.1.0-2005-04-15, but not in 2.1.0b5. >> >> >>> In any case, please try our latest snapshot: >>> >>> >> >> http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-04-15.zip >> >>> to see if that makes any difference. >> >> >> >> I can't build it out of the box: > > > Hmm, looks like distutils' sdist command doesn't like our new > repository layout which uses symlinks (after we've switched to > subversion). > > We'll have to debug distutils first, I guess :-( Ok, we've found the problem and fixed it. Here's the new release (which does build out of the box at least on our boxes ;-): http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 01 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From davidrushby at yahoo.com Mon May 2 15:49:53 2005 From: davidrushby at yahoo.com (David Rushby) Date: Fri Jan 13 15:14:00 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Ok, we've found the problem and fixed it. Here's the new > release (which does build out of the box at least on our > boxes ;-): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip It does build now, but: py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" still behaves as it did when I submitted my original message: Fatal Python error: UNREF invalid object Aborted This is the same debug build of Python 2.4.1 that I was previously using, running the same configuration (CentOS Linux 4.0/i386, everything compiled with GCC 3.4.3). Have you examined my original claim as to the cause of the bug? __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 10:21:55 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 13 15:14:00 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> References: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> Message-ID: <42772693.8050306@egenix.com> David Rushby wrote: > --- "M.-A. Lemburg" wrote: > >>Ok, we've found the problem and fixed it. Here's the new >>release (which does build out of the box at least on our >>boxes ;-): >> >> > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip > > It does build now, but: > py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" > still behaves as it did when I submitted my original message: > Fatal Python error: UNREF invalid object > Aborted > > This is the same debug build of Python 2.4.1 that I was previously > using, running the same configuration (CentOS Linux 4.0/i386, > everything compiled with GCC 3.4.3). > > Have you examined my original claim as to the cause of the bug? No. We haven't had time for looking into it. I'm not sure whether your analysis of the problem is correct: if you don't define WANT_SUBCLASSABLE_TYPES, the API mxDateTime_Deallocate() is neither defined nor used. Furthermore, PyObject_Del() is only called by mxDateTime_Free() if you have explicitely edited mxDateTime.c to disabled the free list #defines. In a standard build, PyObject_Del() is only called at module finalization time. Note that the reason we call mxDateTime_Free() in the constructor is that we don't want the destructor of the object to be called. Py_DECREF() would call the destructor (mxDateTime_Deallocate). It is possible that the debug code in Python complains about the refcount in the object not being 0 at the time the object is finalized (module finalization time), but I don't see any such checks in PyObject_Free() (which is what PyObject_Del() maps to). Again, all of this does not happen in regular non-debug Python builds. Please be aware that we don't support debug builds, so fixing the problem (if there is one - gcc has some serious optimization problems on some combinations of platform and version) will take a while. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 09:27:37 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Fri Jan 13 15:14:00 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 Message-ID: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Hi all- I am trying to build the mx-base package, v.2.0.6. This will be used with postgresql 7.3.9, psycopg 1.1.18, and Roundup 0.8.2. RHEL 3.0 Python 2.3 egenix-mx-base-2.0.6.tar.gz I performed a: /usr/local/bin/python2.3 setup.py install Everything looks proper with the exeception of this series of warning statements: ----------------- gcc -pthread -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fno-strict-aliasing -fPIC -Imx/BeeBase/mxBeeBase -I/usr/local/incl ude/python2.3 -I/usr/local/include -c mx/BeeBase/mxBeeBase/btr.c -o build/temp.linux-i686-2.3/mx/BeeBase/mxBeeBase/mxBeeBa se/mx/BeeBase/mxBeeBase/btr.o mx/BeeBase/mxBeeBase/btr.c: In function `dumpBuf': mx/BeeBase/mxBeeBase/btr.c:249: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:250: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:255: warning: unsigned int format, long unsigned int arg (arg 4) mx/BeeBase/mxBeeBase/btr.c:256: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c: In function `_validateTree': mx/BeeBase/mxBeeBase/btr.c:330: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:337: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:339: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:349: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:351: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 3) creating build/lib.linux-i686-2.3/mx/BeeBase creating build/lib.linux-i686-2.3/mx/BeeBase/mxBeeBase -------------- Would someone be kind enough to let me know whether these messages were expected, and if not, how I might resolve these? Thanks! DC __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 22:06:33 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 13 15:14:00 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> References: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Message-ID: <4277CBB9.8020302@egenix.com> Dianne Chen wrote: > Hi all- > > I am trying to build the mx-base package, v.2.0.6. > This will be used with postgresql 7.3.9, psycopg > 1.1.18, and Roundup 0.8.2. > > RHEL 3.0 > Python 2.3 > egenix-mx-base-2.0.6.tar.gz > > I performed a: > > /usr/local/bin/python2.3 setup.py install > > Everything looks proper with the exeception of this > series of warning statements: > > ----------------- > ... > -------------- > > Would someone be kind enough to let me know whether > these messages were expected, and if not, how I might > resolve these? These warning can safely be ignored. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 13:41:14 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Fri Jan 13 15:14:00 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: 6667 Message-ID: <20050503194114.72091.qmail@web31414.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Dianne Chen wrote: > > Hi all- > > > > I am trying to build the mx-base package, v.2.0.6. > > This will be used with postgresql 7.3.9, psycopg > > 1.1.18, and Roundup 0.8.2. > > > > RHEL 3.0 > > Python 2.3 > > egenix-mx-base-2.0.6.tar.gz > > > > I performed a: > > > > /usr/local/bin/python2.3 setup.py install > > > > Everything looks proper with the exeception of > this > > series of warning statements: > > > > ----------------- > > ... > > -------------- > > > > Would someone be kind enough to let me know > whether > > these messages were expected, and if not, how I > might > > resolve these? > > These warning can safely be ignored. > > -- > Marc-Andre Lemburg > eGenix.com > Marc- Thank you very much for the reply. It helps greatly. With kind regards, DC __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From davidrushby at yahoo.com Tue May 3 17:18:46 2005 From: davidrushby at yahoo.com (David Rushby) Date: Fri Jan 13 15:14:00 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050503231846.35012.qmail@web30009.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > I'm not sure whether your analysis of the problem is correct... Indeed, my original analysis wasn't correct; I think this one is. The fatal error I'm complaining about only arises if the arguments to DateTime.DateTime are invalid, so that the object is deallocated in the onError block of mxDateTime_FromDateAndTime. If the object is created successfully, and later deallocated by Python's garbage collector, the fatal error doesn't arise. Here's my analysis of the problem: --- If the debugging directive Py_TRACE_REFS is enabled, as it is in my case, the Python interpreter maintains a doubly linked list of all Python objects (named refchain) via the _ob_next and _ob_prev pointers added to PyObject via _PyObject_HEAD_EXTRA. Each object is inserted into refchain by the _Py_AddToAllObjects call in _Py_NewReference, and removed from refchain by the _Py_ForgetReference call in _Py_Dealloc. _Py_ForgetReference performs an integrity check on the object being deallocated (op) to make sure that its neighbors in refchain recognize it. Specifically, _Py_ForgetReference verifies that the _ob_next pointer of the previous object in refchain (op->_ob_prev->_ob_next) points to op, and that the _ob_prev pointer of the next object in refchain (op->_ob_next->_ob_prev) points to op. If either of those conditions is false, the interpreter raises the fatal error I'm seeing. After mxDateTime_New pulls an mxDateTimeObject out of the free list, it calls _Py_NewReference on that object to transform it from a "conceptually deallocated" object to a "conceptually allocated" one. _Py_NewReference inserts the object into refchain. Later, when the object is being "conceptually deallocated", it should be removed from refchain with _Py_ForgetReference. The version of _Py_Dealloc that's active when Py_TRACE_REFS is enabled does this (_Py_Dealloc is the element of Py_DECREF that performs the actual destruction). _Py_Dealloc first calls _Py_ForgetReference to remove the object from refchain, then calls the object's destructor (op->ob_type->tp_dealloc). If WANT_SUBCLASSABLE_TYPES is not defined (it is not in my case), the destructor for mxDateTime_Type is mxDateTime_Free. So, if a DateTime object is deallocated normally, as a result of its reference count falling to zero, _Py_Dealloc is called on the object, which first removes it from refchain, then passes it to mxDateTime_Free. If a DateTime object is destroyed prematurely, as a result of invalid arguments to its destructor, the onError handler calls mxDateTime_Free, so the object is "conceptually deallocated" (placed in the free list), *but* the object is not removed from refchain. So if a refchain-membership-integrity-check is performed on the object in question or one of its immediate neighbors in refchain, that integrity check fails, leading to the fatal error. --- The solution is to 'Py_DECREF(...)' the object in the onError handler of its constructor, instead of passing the object directly to mxDateTime_Free. That change solves two problems: 1) It causes _Py_Dealloc to execute, which in turn executes _Py_ForgetReference, so the object is removed from refchain, as it should be. 2) At present, objects that are created successfully and later deallocated by normal reference count mechanics have a reference count of 0 when they enter the free list, whereas objects whose constructors abort their creation due to invalid arguments have a reference count of 1 when they enter the free list. Although AFAIK this doesn't cause an actual execution problem (because the object's reference count is *explicitly set to 1* rather than *incremented by 1* when the object is later "conceptually allocated" by _Py_NewReference), it is likely to confuse future maintainers and thereby lead to the introduction of an actual execution problem. I assume that if you agree that this is a reasonable solution, you'll want to apply the change not only to mxDateTime_FromDateAndTime, but to all similar constructors in mxDateTime.c. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From rj at maxxian.com Thu May 5 01:57:40 2005 From: rj at maxxian.com (RJ Juneau) Date: Fri Jan 13 15:14:00 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c5512e$f72798c0$6505a8c0@rjlaptop> I'm on the 30 day evaluation for mxodbc_zope_da. I'm getting the following error when I submit some queries: Error Type: KeyError Error Value: 'query' I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 with UCS4. The error seems to be caused by multiple rows being returned. I did see an earlier posting with the same error message. The response suggested a template error, but this is clearly not the case here. The additional evidence I've gathered so far: - I'm running the test directly from the ZSQL method, so there's no template involved. - If I use the same query with an additional "where" clause to ensure that only one row is returned, it works - If I use a value in the 'where' clause with no rows returned, it works - The same ZSQL query is being used on a Windows machine running Zope and the free ZODBC module without a problem - The query has been verified directly in mysql-client-browser Other info: - The database is MySQL 4.1.10A-0 - iODBC is the DB driver RJ Juneau -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050505/68d278bf/attachment-0001.htm From mal at egenix.com Thu May 5 12:37:43 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 13 15:14:00 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c5512e$f72798c0$6505a8c0@rjlaptop> References: <000301c5512e$f72798c0$6505a8c0@rjlaptop> Message-ID: <4279E967.6010904@egenix.com> RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 > with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 09:37:42 2005 From: rj at maxxian.com (RJ Juneau) Date: Fri Jan 13 15:14:00 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000101c5516f$3b96de90$6505a8c0@rjlaptop> More interesting info on the problem: If I execute the query directly in the "test" window of the base eGenix mxODBC Database Connection window, it works fine and returns the 20 lines expected. That could point to a problem in the rendering, which seems to be where the traceback ends. Note that within the same Zope system I also have an ODBC connection to a Sybase database, and I have successfully tested multi-line ZSQL queries there. This is the traceback: Time 2005/05/05 07:55:15.294 GMT-4 Exception Type KeyError Exception Value 'query' Traceback (innermost last): Module ZPublisher.Publish, line 101, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 39, in call_object Module Shared.DC.ZRDB.DA, line 337, in manage_test Module DocumentTemplate.DT_String, line 474, in __call__ Module DocumentTemplate.DT_In, line 602, in renderwb Module DocumentTemplate.DT_Var, line 219, in render KeyError: 'query' I don't think the following is an issue, but I'll include it for completeness.I am also getting the following iODBC warnings and errors in the Zope console log, which are related to the ODBC parameters being passed by iODBC. Note that these errors also appear for all of the successful queries. [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (Setup). [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (UsageCount). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Timeout). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Reuse). As for the ZSQL snippet from the template... Since there's no template involved yet (I'm still testing directly from the ZSQL method), I assume you mean the SQL code? select h.host_name, s.system_name, s.system_handle, count(*) from terminal t, system_map s, host h where t.system_index = s.system_index and s.host_index = h.host_index group by s.system_name order by h.host_name Nothing complicated here. There are no parameters passed to the query. RJ -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: May 5, 2005 5:38 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: Re: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is > 2.3.4 with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ---------------------------------------------------------------------- > -- > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 16:00:32 2005 From: charlie at egenix.com (Charlie Clark) Date: Fri Jan 13 15:14:00 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000101c5516f$3b96de90$6505a8c0@rjlaptop> References: <000101c5516f$3b96de90$6505a8c0@rjlaptop> Message-ID: <20050505150032.644.1@bepc.1115296715.fake> On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base eGenix > mxODBC Database Connection window, it works fine and returns the 20 > lines expected. That could point to a problem in the rendering, which > seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection to > a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 10:22:17 2005 From: rj at maxxian.com (RJ Juneau) Date: Fri Jan 13 15:14:00 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505150032.644.1@bepc.1115296715.fake> Message-ID: <000201c55175$75bcad10$6505a8c0@rjlaptop> At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 11:47:14 2005 From: rj at maxxian.com (RJ Juneau) Date: Fri Jan 13 15:14:00 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c55181$549be0e0$6505a8c0@rjlaptop> Charlie, I found a fix. Here it is in case anyone else runs into this. You were correct - the problem is in another part of Zope. Based on your feedback, I did a bit more searching and found something here: http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. html The problem appears to be in Zope versions after 2.7.0. I'm running 2.7.6, and the post indicates that it also happens in 2.7.4. The solution: Edit file /lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. There are two lines in the file that start with . Edit them as follows: Change first line to: Change second line to: Just to be after, I shut down Zope before I made the changes and restarted it after. Thanks for the help! RJ -----Original Message----- From: RJ Juneau [mailto:rj@maxxian.com] Sent: May 5, 2005 9:22 AM To: 'Charlie Clark' Cc: 'egenix-users@lists.egenix.com' Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 17:57:25 2005 From: charlie at egenix.com (Charlie Clark) Date: Fri Jan 13 15:14:01 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <20050505165725.3380.2@bepc.1115296715.fake> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Thu May 5 09:15:21 2005 From: charlie at egenix.com (Charlie Clark) Date: Fri Jan 13 15:14:01 2006 Subject: [Zope-DB] RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <000001c55185$41477730$6b00a8c0@fonacier.local> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________ Zope-DB mailing list Zope-DB@zope.org http://mail.zope.org/mailman/listinfo/zope-db From rj at maxxian.com Thu May 5 12:38:00 2005 From: rj at maxxian.com (RJ Juneau) Date: Fri Jan 13 15:14:01 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000001c55188$6b841eb0$6505a8c0@rjlaptop> I just double-checked. Zope-2.7.6-final. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 12:49:16 2005 From: rj at maxxian.com (RJ Juneau) Date: Fri Jan 13 15:14:01 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000501c55189$fe149ba0$6505a8c0@rjlaptop> Charlie, The fix has only been applied for 2.7.7, 2.8b2. The info is in the original bug report which is closed and can be found here: http://www.zope.org/Collectors/Zope/1745 RJ -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Fri May 6 11:50:09 2005 From: rj at maxxian.com (RJ Juneau) Date: Fri Jan 13 15:14:01 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC Message-ID: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Still on eval for the product. I cannot get a stable connection to Sybase via the iODBC drivers. - The Sybase ODBC connection - including a query - have been verified at the iODBC level. - The setup is already working well for ODBC connection to MySQL. Symptoms include: - If I click on "Open Connection", it still comes back with "Connection Closed" when I go to a ZSQL method - Using 'Connect on Demand' is not working either. - Clicking "Open Connection" gives me the following error: Connection string: DSN=lixbox_sybase; UID=sa; PWD=XXXXXXX Connection pool entry: 0 Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection rejected by data source', 7952) The odbc.ini definition for DSN "lixbox_sybase" is as follows: [lixbox_sybase] JetFix = No NoRowSetSizeLimit = No Description = Test connection to listbox Options = LIXBOX DSQUERY = SQLSERVER TDSHOST = lixbox TDSPORT = 5000 TDSVER = 5.0 SQLSERVER_CATALOG = N CURSOR_SENSITIVITY = LOW UserName = sa Password = XXXXXXXX ServerType = Sybase 10/11/12 Driver = /opt/openlink/lib/sql_mt_lt.so Database = pubs2 ReadOnly = no NoAutoCommit = No NoLoginBox = No FetchBufferSize = 60 Other relevant data: - Connecting via OpenLink's iODBC - Zope 2.7.6-final - Python 2.3.4 - Connection to Sybase has been successfully tested with iODBC, including issuing a query - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC connection RJ Juneau Chief Technology Officer Maxxian Integration Inc. 155 Westhampton Drive Thornhill, Ontario Canada L4J 7X2 E-mail: rj@maxxian.com Phone: +1 905 482 9429 Cell: +1 416 897 6682 Toll free: +1 866 758 9161 Fax: +1 647 722 2038 -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050506/aef33361/attachment-0001.htm From mal at egenix.com Fri May 6 18:27:37 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 13 15:14:01 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC In-Reply-To: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> References: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Message-ID: <427B8CE9.1010601@egenix.com> RJ Juneau wrote: > Still on eval for the product. > > I cannot get a stable connection to Sybase via the iODBC drivers. > > - The Sybase ODBC connection - including a query - have been verified at > the iODBC level. > - The setup is already working well for ODBC connection to MySQL. > > Symptoms include: > > - If I click on "Open Connection", it still comes back with "Connection > Closed" when I go to a ZSQL method > - Using 'Connect on Demand' is not working either. > - Clicking "Open Connection" gives me the following error: > > Connection string: DSN=lixbox_sybase; > UID=sa; > PWD=XXXXXXX Try writing the connection string on one line and without whitespace. ODBC drivers sometimes have problems with this. > Connection pool entry: 0 > Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection > rejected by data source', 7952) This is a generic error that relates to authentication or firewall problems. It is possible that turning on ODBC tracing the ODBC manager will give more clues as to the real cause of the problem. > The odbc.ini definition for DSN "lixbox_sybase" is as follows: > > [lixbox_sybase] > JetFix = No > NoRowSetSizeLimit = No > Description = Test connection to listbox > Options = LIXBOX > DSQUERY = SQLSERVER > TDSHOST = lixbox > TDSPORT = 5000 > TDSVER = 5.0 > SQLSERVER_CATALOG = N > CURSOR_SENSITIVITY = LOW > UserName = sa > Password = XXXXXXXX > ServerType = Sybase 10/11/12 > Driver = /opt/openlink/lib/sql_mt_lt.so > Database = pubs2 > ReadOnly = no > NoAutoCommit = No > NoLoginBox = No > FetchBufferSize = 60 > > > Other relevant data: > - Connecting via OpenLink's iODBC > - Zope 2.7.6-final > - Python 2.3.4 > - Connection to Sybase has been successfully tested with iODBC, > including issuing a query > - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC > connection > > > > RJ Juneau > Chief Technology Officer > Maxxian Integration Inc. > 155 Westhampton Drive > Thornhill, Ontario > Canada L4J 7X2 > E-mail: rj@maxxian.com > Phone: +1 905 482 9429 > Cell: +1 416 897 6682 > Toll free: +1 866 758 9161 > Fax: +1 647 722 2038 > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 06 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From calisp at gmail.com Sun May 15 23:49:03 2005 From: calisp at gmail.com (calisp@gmail.com) Date: Fri Jan 13 15:14:01 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK Message-ID: Hi, I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the following error... 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the last phase of a two-phase commit. This shouldn't happen. Traceback (most recent call last): File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one jar.tpc_finish(self) File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish try: self._finish() File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could not perform COMMIT or ROLLBACK', 1023) What could be causing this? Can I get the mxODBCZopeDA source from somewhere? It would make debugging this much easier. Thanks, Calisp. From mal at egenix.com Mon May 16 13:52:12 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 13 15:14:01 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK In-Reply-To: References: Message-ID: <42887B5C.4010109@egenix.com> calisp@gmail.com wrote: > Hi, > > I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with > unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the > following error... > > 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the > last phase of a two-phase commit. This shouldn't happen. > Traceback (most recent call last): > File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one > jar.tpc_finish(self) > File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish > try: self._finish() > File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish > File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler > ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could > not perform COMMIT or ROLLBACK', 1023) You should have a look at the database logs to see what prevented the commit from being completed. > What could be causing this? Hard to say: mxODBCZopeDA is trying to commit the transaction, but the driver or database failed to complete the request. The above error was generated by the ODBC driver. This could be network or DNS problems, or be related to a bug in FreeTDS (which is getting more stable with every new release, but should still be considered beta quality software at the moment). > Can I get the mxODBCZopeDA source from > somewhere? It would make debugging this much easier. Getting the source is not an option and won't help much either since the source of the problem is not mxODBCZopeDA. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 16 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Sun May 1 21:29:25 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 13 15:21:26 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <427259F3.4090806@egenix.com> References: <20050427130906.52878.qmail@web30008.mail.mud.yahoo.com> <427259F3.4090806@egenix.com> Message-ID: <42752005.7080904@egenix.com> M.-A. Lemburg wrote: > David Rushby wrote: > >> --- "M.-A. Lemburg" wrote: >> >>> Are you using the standard mxDateTime build or one >>> with WANT_SUBCLASSABLE_TYPES defined... >> >> >> >> Presumably "the standard", since I just built with 'py24d setup.py >> build', making no attempt to enable special directives. >> >> >>> ... (mxDateTime_Deallocate is only used by the latter)? >> >> >> >> That's true in 2.1.0-2005-04-15, but not in 2.1.0b5. >> >> >>> In any case, please try our latest snapshot: >>> >>> >> >> http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-04-15.zip >> >>> to see if that makes any difference. >> >> >> >> I can't build it out of the box: > > > Hmm, looks like distutils' sdist command doesn't like our new > repository layout which uses symlinks (after we've switched to > subversion). > > We'll have to debug distutils first, I guess :-( Ok, we've found the problem and fixed it. Here's the new release (which does build out of the box at least on our boxes ;-): http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 01 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From davidrushby at yahoo.com Mon May 2 15:49:53 2005 From: davidrushby at yahoo.com (David Rushby) Date: Fri Jan 13 15:21:26 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Ok, we've found the problem and fixed it. Here's the new > release (which does build out of the box at least on our > boxes ;-): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip It does build now, but: py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" still behaves as it did when I submitted my original message: Fatal Python error: UNREF invalid object Aborted This is the same debug build of Python 2.4.1 that I was previously using, running the same configuration (CentOS Linux 4.0/i386, everything compiled with GCC 3.4.3). Have you examined my original claim as to the cause of the bug? __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 10:21:55 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 13 15:21:26 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> References: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> Message-ID: <42772693.8050306@egenix.com> David Rushby wrote: > --- "M.-A. Lemburg" wrote: > >>Ok, we've found the problem and fixed it. Here's the new >>release (which does build out of the box at least on our >>boxes ;-): >> >> > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip > > It does build now, but: > py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" > still behaves as it did when I submitted my original message: > Fatal Python error: UNREF invalid object > Aborted > > This is the same debug build of Python 2.4.1 that I was previously > using, running the same configuration (CentOS Linux 4.0/i386, > everything compiled with GCC 3.4.3). > > Have you examined my original claim as to the cause of the bug? No. We haven't had time for looking into it. I'm not sure whether your analysis of the problem is correct: if you don't define WANT_SUBCLASSABLE_TYPES, the API mxDateTime_Deallocate() is neither defined nor used. Furthermore, PyObject_Del() is only called by mxDateTime_Free() if you have explicitely edited mxDateTime.c to disabled the free list #defines. In a standard build, PyObject_Del() is only called at module finalization time. Note that the reason we call mxDateTime_Free() in the constructor is that we don't want the destructor of the object to be called. Py_DECREF() would call the destructor (mxDateTime_Deallocate). It is possible that the debug code in Python complains about the refcount in the object not being 0 at the time the object is finalized (module finalization time), but I don't see any such checks in PyObject_Free() (which is what PyObject_Del() maps to). Again, all of this does not happen in regular non-debug Python builds. Please be aware that we don't support debug builds, so fixing the problem (if there is one - gcc has some serious optimization problems on some combinations of platform and version) will take a while. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 09:27:37 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Fri Jan 13 15:21:26 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 Message-ID: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Hi all- I am trying to build the mx-base package, v.2.0.6. This will be used with postgresql 7.3.9, psycopg 1.1.18, and Roundup 0.8.2. RHEL 3.0 Python 2.3 egenix-mx-base-2.0.6.tar.gz I performed a: /usr/local/bin/python2.3 setup.py install Everything looks proper with the exeception of this series of warning statements: ----------------- gcc -pthread -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fno-strict-aliasing -fPIC -Imx/BeeBase/mxBeeBase -I/usr/local/incl ude/python2.3 -I/usr/local/include -c mx/BeeBase/mxBeeBase/btr.c -o build/temp.linux-i686-2.3/mx/BeeBase/mxBeeBase/mxBeeBa se/mx/BeeBase/mxBeeBase/btr.o mx/BeeBase/mxBeeBase/btr.c: In function `dumpBuf': mx/BeeBase/mxBeeBase/btr.c:249: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:250: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:255: warning: unsigned int format, long unsigned int arg (arg 4) mx/BeeBase/mxBeeBase/btr.c:256: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c: In function `_validateTree': mx/BeeBase/mxBeeBase/btr.c:330: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:337: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:339: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:349: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:351: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 3) creating build/lib.linux-i686-2.3/mx/BeeBase creating build/lib.linux-i686-2.3/mx/BeeBase/mxBeeBase -------------- Would someone be kind enough to let me know whether these messages were expected, and if not, how I might resolve these? Thanks! DC __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 22:06:33 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 13 15:21:26 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> References: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Message-ID: <4277CBB9.8020302@egenix.com> Dianne Chen wrote: > Hi all- > > I am trying to build the mx-base package, v.2.0.6. > This will be used with postgresql 7.3.9, psycopg > 1.1.18, and Roundup 0.8.2. > > RHEL 3.0 > Python 2.3 > egenix-mx-base-2.0.6.tar.gz > > I performed a: > > /usr/local/bin/python2.3 setup.py install > > Everything looks proper with the exeception of this > series of warning statements: > > ----------------- > ... > -------------- > > Would someone be kind enough to let me know whether > these messages were expected, and if not, how I might > resolve these? These warning can safely be ignored. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 13:41:14 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Fri Jan 13 15:21:26 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: 6667 Message-ID: <20050503194114.72091.qmail@web31414.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Dianne Chen wrote: > > Hi all- > > > > I am trying to build the mx-base package, v.2.0.6. > > This will be used with postgresql 7.3.9, psycopg > > 1.1.18, and Roundup 0.8.2. > > > > RHEL 3.0 > > Python 2.3 > > egenix-mx-base-2.0.6.tar.gz > > > > I performed a: > > > > /usr/local/bin/python2.3 setup.py install > > > > Everything looks proper with the exeception of > this > > series of warning statements: > > > > ----------------- > > ... > > -------------- > > > > Would someone be kind enough to let me know > whether > > these messages were expected, and if not, how I > might > > resolve these? > > These warning can safely be ignored. > > -- > Marc-Andre Lemburg > eGenix.com > Marc- Thank you very much for the reply. It helps greatly. With kind regards, DC __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From davidrushby at yahoo.com Tue May 3 17:18:46 2005 From: davidrushby at yahoo.com (David Rushby) Date: Fri Jan 13 15:21:26 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050503231846.35012.qmail@web30009.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > I'm not sure whether your analysis of the problem is correct... Indeed, my original analysis wasn't correct; I think this one is. The fatal error I'm complaining about only arises if the arguments to DateTime.DateTime are invalid, so that the object is deallocated in the onError block of mxDateTime_FromDateAndTime. If the object is created successfully, and later deallocated by Python's garbage collector, the fatal error doesn't arise. Here's my analysis of the problem: --- If the debugging directive Py_TRACE_REFS is enabled, as it is in my case, the Python interpreter maintains a doubly linked list of all Python objects (named refchain) via the _ob_next and _ob_prev pointers added to PyObject via _PyObject_HEAD_EXTRA. Each object is inserted into refchain by the _Py_AddToAllObjects call in _Py_NewReference, and removed from refchain by the _Py_ForgetReference call in _Py_Dealloc. _Py_ForgetReference performs an integrity check on the object being deallocated (op) to make sure that its neighbors in refchain recognize it. Specifically, _Py_ForgetReference verifies that the _ob_next pointer of the previous object in refchain (op->_ob_prev->_ob_next) points to op, and that the _ob_prev pointer of the next object in refchain (op->_ob_next->_ob_prev) points to op. If either of those conditions is false, the interpreter raises the fatal error I'm seeing. After mxDateTime_New pulls an mxDateTimeObject out of the free list, it calls _Py_NewReference on that object to transform it from a "conceptually deallocated" object to a "conceptually allocated" one. _Py_NewReference inserts the object into refchain. Later, when the object is being "conceptually deallocated", it should be removed from refchain with _Py_ForgetReference. The version of _Py_Dealloc that's active when Py_TRACE_REFS is enabled does this (_Py_Dealloc is the element of Py_DECREF that performs the actual destruction). _Py_Dealloc first calls _Py_ForgetReference to remove the object from refchain, then calls the object's destructor (op->ob_type->tp_dealloc). If WANT_SUBCLASSABLE_TYPES is not defined (it is not in my case), the destructor for mxDateTime_Type is mxDateTime_Free. So, if a DateTime object is deallocated normally, as a result of its reference count falling to zero, _Py_Dealloc is called on the object, which first removes it from refchain, then passes it to mxDateTime_Free. If a DateTime object is destroyed prematurely, as a result of invalid arguments to its destructor, the onError handler calls mxDateTime_Free, so the object is "conceptually deallocated" (placed in the free list), *but* the object is not removed from refchain. So if a refchain-membership-integrity-check is performed on the object in question or one of its immediate neighbors in refchain, that integrity check fails, leading to the fatal error. --- The solution is to 'Py_DECREF(...)' the object in the onError handler of its constructor, instead of passing the object directly to mxDateTime_Free. That change solves two problems: 1) It causes _Py_Dealloc to execute, which in turn executes _Py_ForgetReference, so the object is removed from refchain, as it should be. 2) At present, objects that are created successfully and later deallocated by normal reference count mechanics have a reference count of 0 when they enter the free list, whereas objects whose constructors abort their creation due to invalid arguments have a reference count of 1 when they enter the free list. Although AFAIK this doesn't cause an actual execution problem (because the object's reference count is *explicitly set to 1* rather than *incremented by 1* when the object is later "conceptually allocated" by _Py_NewReference), it is likely to confuse future maintainers and thereby lead to the introduction of an actual execution problem. I assume that if you agree that this is a reasonable solution, you'll want to apply the change not only to mxDateTime_FromDateAndTime, but to all similar constructors in mxDateTime.c. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From rj at maxxian.com Thu May 5 01:57:40 2005 From: rj at maxxian.com (RJ Juneau) Date: Fri Jan 13 15:21:26 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c5512e$f72798c0$6505a8c0@rjlaptop> I'm on the 30 day evaluation for mxodbc_zope_da. I'm getting the following error when I submit some queries: Error Type: KeyError Error Value: 'query' I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 with UCS4. The error seems to be caused by multiple rows being returned. I did see an earlier posting with the same error message. The response suggested a template error, but this is clearly not the case here. The additional evidence I've gathered so far: - I'm running the test directly from the ZSQL method, so there's no template involved. - If I use the same query with an additional "where" clause to ensure that only one row is returned, it works - If I use a value in the 'where' clause with no rows returned, it works - The same ZSQL query is being used on a Windows machine running Zope and the free ZODBC module without a problem - The query has been verified directly in mysql-client-browser Other info: - The database is MySQL 4.1.10A-0 - iODBC is the DB driver RJ Juneau -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050505/68d278bf/attachment-0002.htm From mal at egenix.com Thu May 5 12:37:43 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 13 15:21:26 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c5512e$f72798c0$6505a8c0@rjlaptop> References: <000301c5512e$f72798c0$6505a8c0@rjlaptop> Message-ID: <4279E967.6010904@egenix.com> RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 > with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 09:37:42 2005 From: rj at maxxian.com (RJ Juneau) Date: Fri Jan 13 15:21:26 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000101c5516f$3b96de90$6505a8c0@rjlaptop> More interesting info on the problem: If I execute the query directly in the "test" window of the base eGenix mxODBC Database Connection window, it works fine and returns the 20 lines expected. That could point to a problem in the rendering, which seems to be where the traceback ends. Note that within the same Zope system I also have an ODBC connection to a Sybase database, and I have successfully tested multi-line ZSQL queries there. This is the traceback: Time 2005/05/05 07:55:15.294 GMT-4 Exception Type KeyError Exception Value 'query' Traceback (innermost last): Module ZPublisher.Publish, line 101, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 39, in call_object Module Shared.DC.ZRDB.DA, line 337, in manage_test Module DocumentTemplate.DT_String, line 474, in __call__ Module DocumentTemplate.DT_In, line 602, in renderwb Module DocumentTemplate.DT_Var, line 219, in render KeyError: 'query' I don't think the following is an issue, but I'll include it for completeness.I am also getting the following iODBC warnings and errors in the Zope console log, which are related to the ODBC parameters being passed by iODBC. Note that these errors also appear for all of the successful queries. [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (Setup). [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (UsageCount). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Timeout). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Reuse). As for the ZSQL snippet from the template... Since there's no template involved yet (I'm still testing directly from the ZSQL method), I assume you mean the SQL code? select h.host_name, s.system_name, s.system_handle, count(*) from terminal t, system_map s, host h where t.system_index = s.system_index and s.host_index = h.host_index group by s.system_name order by h.host_name Nothing complicated here. There are no parameters passed to the query. RJ -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: May 5, 2005 5:38 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: Re: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is > 2.3.4 with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ---------------------------------------------------------------------- > -- > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 16:00:32 2005 From: charlie at egenix.com (Charlie Clark) Date: Fri Jan 13 15:21:26 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000101c5516f$3b96de90$6505a8c0@rjlaptop> References: <000101c5516f$3b96de90$6505a8c0@rjlaptop> Message-ID: <20050505150032.644.1@bepc.1115296715.fake> On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base eGenix > mxODBC Database Connection window, it works fine and returns the 20 > lines expected. That could point to a problem in the rendering, which > seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection to > a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 10:22:17 2005 From: rj at maxxian.com (RJ Juneau) Date: Fri Jan 13 15:21:26 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505150032.644.1@bepc.1115296715.fake> Message-ID: <000201c55175$75bcad10$6505a8c0@rjlaptop> At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 11:47:14 2005 From: rj at maxxian.com (RJ Juneau) Date: Fri Jan 13 15:21:26 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c55181$549be0e0$6505a8c0@rjlaptop> Charlie, I found a fix. Here it is in case anyone else runs into this. You were correct - the problem is in another part of Zope. Based on your feedback, I did a bit more searching and found something here: http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. html The problem appears to be in Zope versions after 2.7.0. I'm running 2.7.6, and the post indicates that it also happens in 2.7.4. The solution: Edit file /lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. There are two lines in the file that start with . Edit them as follows: Change first line to: Change second line to: Just to be after, I shut down Zope before I made the changes and restarted it after. Thanks for the help! RJ -----Original Message----- From: RJ Juneau [mailto:rj@maxxian.com] Sent: May 5, 2005 9:22 AM To: 'Charlie Clark' Cc: 'egenix-users@lists.egenix.com' Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 17:57:25 2005 From: charlie at egenix.com (Charlie Clark) Date: Fri Jan 13 15:21:26 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <20050505165725.3380.2@bepc.1115296715.fake> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Thu May 5 09:15:21 2005 From: charlie at egenix.com (Charlie Clark) Date: Fri Jan 13 15:21:26 2006 Subject: [Zope-DB] RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <000001c55185$41477730$6b00a8c0@fonacier.local> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________ Zope-DB mailing list Zope-DB@zope.org http://mail.zope.org/mailman/listinfo/zope-db From rj at maxxian.com Thu May 5 12:38:00 2005 From: rj at maxxian.com (RJ Juneau) Date: Fri Jan 13 15:21:26 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000001c55188$6b841eb0$6505a8c0@rjlaptop> I just double-checked. Zope-2.7.6-final. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 12:49:16 2005 From: rj at maxxian.com (RJ Juneau) Date: Fri Jan 13 15:21:26 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000501c55189$fe149ba0$6505a8c0@rjlaptop> Charlie, The fix has only been applied for 2.7.7, 2.8b2. The info is in the original bug report which is closed and can be found here: http://www.zope.org/Collectors/Zope/1745 RJ -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Fri May 6 11:50:09 2005 From: rj at maxxian.com (RJ Juneau) Date: Fri Jan 13 15:21:26 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC Message-ID: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Still on eval for the product. I cannot get a stable connection to Sybase via the iODBC drivers. - The Sybase ODBC connection - including a query - have been verified at the iODBC level. - The setup is already working well for ODBC connection to MySQL. Symptoms include: - If I click on "Open Connection", it still comes back with "Connection Closed" when I go to a ZSQL method - Using 'Connect on Demand' is not working either. - Clicking "Open Connection" gives me the following error: Connection string: DSN=lixbox_sybase; UID=sa; PWD=XXXXXXX Connection pool entry: 0 Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection rejected by data source', 7952) The odbc.ini definition for DSN "lixbox_sybase" is as follows: [lixbox_sybase] JetFix = No NoRowSetSizeLimit = No Description = Test connection to listbox Options = LIXBOX DSQUERY = SQLSERVER TDSHOST = lixbox TDSPORT = 5000 TDSVER = 5.0 SQLSERVER_CATALOG = N CURSOR_SENSITIVITY = LOW UserName = sa Password = XXXXXXXX ServerType = Sybase 10/11/12 Driver = /opt/openlink/lib/sql_mt_lt.so Database = pubs2 ReadOnly = no NoAutoCommit = No NoLoginBox = No FetchBufferSize = 60 Other relevant data: - Connecting via OpenLink's iODBC - Zope 2.7.6-final - Python 2.3.4 - Connection to Sybase has been successfully tested with iODBC, including issuing a query - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC connection RJ Juneau Chief Technology Officer Maxxian Integration Inc. 155 Westhampton Drive Thornhill, Ontario Canada L4J 7X2 E-mail: rj@maxxian.com Phone: +1 905 482 9429 Cell: +1 416 897 6682 Toll free: +1 866 758 9161 Fax: +1 647 722 2038 -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050506/aef33361/attachment-0002.htm From mal at egenix.com Fri May 6 18:27:37 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 13 15:21:26 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC In-Reply-To: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> References: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Message-ID: <427B8CE9.1010601@egenix.com> RJ Juneau wrote: > Still on eval for the product. > > I cannot get a stable connection to Sybase via the iODBC drivers. > > - The Sybase ODBC connection - including a query - have been verified at > the iODBC level. > - The setup is already working well for ODBC connection to MySQL. > > Symptoms include: > > - If I click on "Open Connection", it still comes back with "Connection > Closed" when I go to a ZSQL method > - Using 'Connect on Demand' is not working either. > - Clicking "Open Connection" gives me the following error: > > Connection string: DSN=lixbox_sybase; > UID=sa; > PWD=XXXXXXX Try writing the connection string on one line and without whitespace. ODBC drivers sometimes have problems with this. > Connection pool entry: 0 > Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection > rejected by data source', 7952) This is a generic error that relates to authentication or firewall problems. It is possible that turning on ODBC tracing the ODBC manager will give more clues as to the real cause of the problem. > The odbc.ini definition for DSN "lixbox_sybase" is as follows: > > [lixbox_sybase] > JetFix = No > NoRowSetSizeLimit = No > Description = Test connection to listbox > Options = LIXBOX > DSQUERY = SQLSERVER > TDSHOST = lixbox > TDSPORT = 5000 > TDSVER = 5.0 > SQLSERVER_CATALOG = N > CURSOR_SENSITIVITY = LOW > UserName = sa > Password = XXXXXXXX > ServerType = Sybase 10/11/12 > Driver = /opt/openlink/lib/sql_mt_lt.so > Database = pubs2 > ReadOnly = no > NoAutoCommit = No > NoLoginBox = No > FetchBufferSize = 60 > > > Other relevant data: > - Connecting via OpenLink's iODBC > - Zope 2.7.6-final > - Python 2.3.4 > - Connection to Sybase has been successfully tested with iODBC, > including issuing a query > - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC > connection > > > > RJ Juneau > Chief Technology Officer > Maxxian Integration Inc. > 155 Westhampton Drive > Thornhill, Ontario > Canada L4J 7X2 > E-mail: rj@maxxian.com > Phone: +1 905 482 9429 > Cell: +1 416 897 6682 > Toll free: +1 866 758 9161 > Fax: +1 647 722 2038 > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 06 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From calisp at gmail.com Sun May 15 23:49:03 2005 From: calisp at gmail.com (calisp@gmail.com) Date: Fri Jan 13 15:21:26 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK Message-ID: Hi, I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the following error... 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the last phase of a two-phase commit. This shouldn't happen. Traceback (most recent call last): File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one jar.tpc_finish(self) File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish try: self._finish() File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could not perform COMMIT or ROLLBACK', 1023) What could be causing this? Can I get the mxODBCZopeDA source from somewhere? It would make debugging this much easier. Thanks, Calisp. From mal at egenix.com Mon May 16 13:52:12 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 13 15:21:26 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK In-Reply-To: References: Message-ID: <42887B5C.4010109@egenix.com> calisp@gmail.com wrote: > Hi, > > I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with > unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the > following error... > > 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the > last phase of a two-phase commit. This shouldn't happen. > Traceback (most recent call last): > File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one > jar.tpc_finish(self) > File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish > try: self._finish() > File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish > File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler > ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could > not perform COMMIT or ROLLBACK', 1023) You should have a look at the database logs to see what prevented the commit from being completed. > What could be causing this? Hard to say: mxODBCZopeDA is trying to commit the transaction, but the driver or database failed to complete the request. The above error was generated by the ODBC driver. This could be network or DNS problems, or be related to a bug in FreeTDS (which is getting more stable with every new release, but should still be considered beta quality software at the moment). > Can I get the mxODBCZopeDA source from > somewhere? It would make debugging this much easier. Getting the source is not an option and won't help much either since the source of the problem is not mxODBCZopeDA. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 16 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Sun May 1 21:29:25 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 13 16:00:56 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <427259F3.4090806@egenix.com> References: <20050427130906.52878.qmail@web30008.mail.mud.yahoo.com> <427259F3.4090806@egenix.com> Message-ID: <42752005.7080904@egenix.com> M.-A. Lemburg wrote: > David Rushby wrote: > >> --- "M.-A. Lemburg" wrote: >> >>> Are you using the standard mxDateTime build or one >>> with WANT_SUBCLASSABLE_TYPES defined... >> >> >> >> Presumably "the standard", since I just built with 'py24d setup.py >> build', making no attempt to enable special directives. >> >> >>> ... (mxDateTime_Deallocate is only used by the latter)? >> >> >> >> That's true in 2.1.0-2005-04-15, but not in 2.1.0b5. >> >> >>> In any case, please try our latest snapshot: >>> >>> >> >> http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-04-15.zip >> >>> to see if that makes any difference. >> >> >> >> I can't build it out of the box: > > > Hmm, looks like distutils' sdist command doesn't like our new > repository layout which uses symlinks (after we've switched to > subversion). > > We'll have to debug distutils first, I guess :-( Ok, we've found the problem and fixed it. Here's the new release (which does build out of the box at least on our boxes ;-): http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 01 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From davidrushby at yahoo.com Mon May 2 15:49:53 2005 From: davidrushby at yahoo.com (David Rushby) Date: Fri Jan 13 16:00:56 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Ok, we've found the problem and fixed it. Here's the new > release (which does build out of the box at least on our > boxes ;-): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip It does build now, but: py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" still behaves as it did when I submitted my original message: Fatal Python error: UNREF invalid object Aborted This is the same debug build of Python 2.4.1 that I was previously using, running the same configuration (CentOS Linux 4.0/i386, everything compiled with GCC 3.4.3). Have you examined my original claim as to the cause of the bug? __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 10:21:55 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 13 16:00:56 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> References: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> Message-ID: <42772693.8050306@egenix.com> David Rushby wrote: > --- "M.-A. Lemburg" wrote: > >>Ok, we've found the problem and fixed it. Here's the new >>release (which does build out of the box at least on our >>boxes ;-): >> >> > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip > > It does build now, but: > py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" > still behaves as it did when I submitted my original message: > Fatal Python error: UNREF invalid object > Aborted > > This is the same debug build of Python 2.4.1 that I was previously > using, running the same configuration (CentOS Linux 4.0/i386, > everything compiled with GCC 3.4.3). > > Have you examined my original claim as to the cause of the bug? No. We haven't had time for looking into it. I'm not sure whether your analysis of the problem is correct: if you don't define WANT_SUBCLASSABLE_TYPES, the API mxDateTime_Deallocate() is neither defined nor used. Furthermore, PyObject_Del() is only called by mxDateTime_Free() if you have explicitely edited mxDateTime.c to disabled the free list #defines. In a standard build, PyObject_Del() is only called at module finalization time. Note that the reason we call mxDateTime_Free() in the constructor is that we don't want the destructor of the object to be called. Py_DECREF() would call the destructor (mxDateTime_Deallocate). It is possible that the debug code in Python complains about the refcount in the object not being 0 at the time the object is finalized (module finalization time), but I don't see any such checks in PyObject_Free() (which is what PyObject_Del() maps to). Again, all of this does not happen in regular non-debug Python builds. Please be aware that we don't support debug builds, so fixing the problem (if there is one - gcc has some serious optimization problems on some combinations of platform and version) will take a while. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 09:27:37 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Fri Jan 13 16:00:56 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 Message-ID: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Hi all- I am trying to build the mx-base package, v.2.0.6. This will be used with postgresql 7.3.9, psycopg 1.1.18, and Roundup 0.8.2. RHEL 3.0 Python 2.3 egenix-mx-base-2.0.6.tar.gz I performed a: /usr/local/bin/python2.3 setup.py install Everything looks proper with the exeception of this series of warning statements: ----------------- gcc -pthread -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fno-strict-aliasing -fPIC -Imx/BeeBase/mxBeeBase -I/usr/local/incl ude/python2.3 -I/usr/local/include -c mx/BeeBase/mxBeeBase/btr.c -o build/temp.linux-i686-2.3/mx/BeeBase/mxBeeBase/mxBeeBa se/mx/BeeBase/mxBeeBase/btr.o mx/BeeBase/mxBeeBase/btr.c: In function `dumpBuf': mx/BeeBase/mxBeeBase/btr.c:249: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:250: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:255: warning: unsigned int format, long unsigned int arg (arg 4) mx/BeeBase/mxBeeBase/btr.c:256: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c: In function `_validateTree': mx/BeeBase/mxBeeBase/btr.c:330: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:337: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:339: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:349: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:351: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 3) creating build/lib.linux-i686-2.3/mx/BeeBase creating build/lib.linux-i686-2.3/mx/BeeBase/mxBeeBase -------------- Would someone be kind enough to let me know whether these messages were expected, and if not, how I might resolve these? Thanks! DC __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 22:06:33 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 13 16:00:56 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> References: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Message-ID: <4277CBB9.8020302@egenix.com> Dianne Chen wrote: > Hi all- > > I am trying to build the mx-base package, v.2.0.6. > This will be used with postgresql 7.3.9, psycopg > 1.1.18, and Roundup 0.8.2. > > RHEL 3.0 > Python 2.3 > egenix-mx-base-2.0.6.tar.gz > > I performed a: > > /usr/local/bin/python2.3 setup.py install > > Everything looks proper with the exeception of this > series of warning statements: > > ----------------- > ... > -------------- > > Would someone be kind enough to let me know whether > these messages were expected, and if not, how I might > resolve these? These warning can safely be ignored. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 13:41:14 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Fri Jan 13 16:00:56 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: 6667 Message-ID: <20050503194114.72091.qmail@web31414.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Dianne Chen wrote: > > Hi all- > > > > I am trying to build the mx-base package, v.2.0.6. > > This will be used with postgresql 7.3.9, psycopg > > 1.1.18, and Roundup 0.8.2. > > > > RHEL 3.0 > > Python 2.3 > > egenix-mx-base-2.0.6.tar.gz > > > > I performed a: > > > > /usr/local/bin/python2.3 setup.py install > > > > Everything looks proper with the exeception of > this > > series of warning statements: > > > > ----------------- > > ... > > -------------- > > > > Would someone be kind enough to let me know > whether > > these messages were expected, and if not, how I > might > > resolve these? > > These warning can safely be ignored. > > -- > Marc-Andre Lemburg > eGenix.com > Marc- Thank you very much for the reply. It helps greatly. With kind regards, DC __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From davidrushby at yahoo.com Tue May 3 17:18:46 2005 From: davidrushby at yahoo.com (David Rushby) Date: Fri Jan 13 16:00:56 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050503231846.35012.qmail@web30009.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > I'm not sure whether your analysis of the problem is correct... Indeed, my original analysis wasn't correct; I think this one is. The fatal error I'm complaining about only arises if the arguments to DateTime.DateTime are invalid, so that the object is deallocated in the onError block of mxDateTime_FromDateAndTime. If the object is created successfully, and later deallocated by Python's garbage collector, the fatal error doesn't arise. Here's my analysis of the problem: --- If the debugging directive Py_TRACE_REFS is enabled, as it is in my case, the Python interpreter maintains a doubly linked list of all Python objects (named refchain) via the _ob_next and _ob_prev pointers added to PyObject via _PyObject_HEAD_EXTRA. Each object is inserted into refchain by the _Py_AddToAllObjects call in _Py_NewReference, and removed from refchain by the _Py_ForgetReference call in _Py_Dealloc. _Py_ForgetReference performs an integrity check on the object being deallocated (op) to make sure that its neighbors in refchain recognize it. Specifically, _Py_ForgetReference verifies that the _ob_next pointer of the previous object in refchain (op->_ob_prev->_ob_next) points to op, and that the _ob_prev pointer of the next object in refchain (op->_ob_next->_ob_prev) points to op. If either of those conditions is false, the interpreter raises the fatal error I'm seeing. After mxDateTime_New pulls an mxDateTimeObject out of the free list, it calls _Py_NewReference on that object to transform it from a "conceptually deallocated" object to a "conceptually allocated" one. _Py_NewReference inserts the object into refchain. Later, when the object is being "conceptually deallocated", it should be removed from refchain with _Py_ForgetReference. The version of _Py_Dealloc that's active when Py_TRACE_REFS is enabled does this (_Py_Dealloc is the element of Py_DECREF that performs the actual destruction). _Py_Dealloc first calls _Py_ForgetReference to remove the object from refchain, then calls the object's destructor (op->ob_type->tp_dealloc). If WANT_SUBCLASSABLE_TYPES is not defined (it is not in my case), the destructor for mxDateTime_Type is mxDateTime_Free. So, if a DateTime object is deallocated normally, as a result of its reference count falling to zero, _Py_Dealloc is called on the object, which first removes it from refchain, then passes it to mxDateTime_Free. If a DateTime object is destroyed prematurely, as a result of invalid arguments to its destructor, the onError handler calls mxDateTime_Free, so the object is "conceptually deallocated" (placed in the free list), *but* the object is not removed from refchain. So if a refchain-membership-integrity-check is performed on the object in question or one of its immediate neighbors in refchain, that integrity check fails, leading to the fatal error. --- The solution is to 'Py_DECREF(...)' the object in the onError handler of its constructor, instead of passing the object directly to mxDateTime_Free. That change solves two problems: 1) It causes _Py_Dealloc to execute, which in turn executes _Py_ForgetReference, so the object is removed from refchain, as it should be. 2) At present, objects that are created successfully and later deallocated by normal reference count mechanics have a reference count of 0 when they enter the free list, whereas objects whose constructors abort their creation due to invalid arguments have a reference count of 1 when they enter the free list. Although AFAIK this doesn't cause an actual execution problem (because the object's reference count is *explicitly set to 1* rather than *incremented by 1* when the object is later "conceptually allocated" by _Py_NewReference), it is likely to confuse future maintainers and thereby lead to the introduction of an actual execution problem. I assume that if you agree that this is a reasonable solution, you'll want to apply the change not only to mxDateTime_FromDateAndTime, but to all similar constructors in mxDateTime.c. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From rj at maxxian.com Thu May 5 01:57:40 2005 From: rj at maxxian.com (RJ Juneau) Date: Fri Jan 13 16:00:56 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c5512e$f72798c0$6505a8c0@rjlaptop> I'm on the 30 day evaluation for mxodbc_zope_da. I'm getting the following error when I submit some queries: Error Type: KeyError Error Value: 'query' I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 with UCS4. The error seems to be caused by multiple rows being returned. I did see an earlier posting with the same error message. The response suggested a template error, but this is clearly not the case here. The additional evidence I've gathered so far: - I'm running the test directly from the ZSQL method, so there's no template involved. - If I use the same query with an additional "where" clause to ensure that only one row is returned, it works - If I use a value in the 'where' clause with no rows returned, it works - The same ZSQL query is being used on a Windows machine running Zope and the free ZODBC module without a problem - The query has been verified directly in mysql-client-browser Other info: - The database is MySQL 4.1.10A-0 - iODBC is the DB driver RJ Juneau -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050505/68d278bf/attachment-0003.htm From mal at egenix.com Thu May 5 12:37:43 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 13 16:00:56 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c5512e$f72798c0$6505a8c0@rjlaptop> References: <000301c5512e$f72798c0$6505a8c0@rjlaptop> Message-ID: <4279E967.6010904@egenix.com> RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 > with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 09:37:42 2005 From: rj at maxxian.com (RJ Juneau) Date: Fri Jan 13 16:00:56 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000101c5516f$3b96de90$6505a8c0@rjlaptop> More interesting info on the problem: If I execute the query directly in the "test" window of the base eGenix mxODBC Database Connection window, it works fine and returns the 20 lines expected. That could point to a problem in the rendering, which seems to be where the traceback ends. Note that within the same Zope system I also have an ODBC connection to a Sybase database, and I have successfully tested multi-line ZSQL queries there. This is the traceback: Time 2005/05/05 07:55:15.294 GMT-4 Exception Type KeyError Exception Value 'query' Traceback (innermost last): Module ZPublisher.Publish, line 101, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 39, in call_object Module Shared.DC.ZRDB.DA, line 337, in manage_test Module DocumentTemplate.DT_String, line 474, in __call__ Module DocumentTemplate.DT_In, line 602, in renderwb Module DocumentTemplate.DT_Var, line 219, in render KeyError: 'query' I don't think the following is an issue, but I'll include it for completeness.I am also getting the following iODBC warnings and errors in the Zope console log, which are related to the ODBC parameters being passed by iODBC. Note that these errors also appear for all of the successful queries. [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (Setup). [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (UsageCount). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Timeout). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Reuse). As for the ZSQL snippet from the template... Since there's no template involved yet (I'm still testing directly from the ZSQL method), I assume you mean the SQL code? select h.host_name, s.system_name, s.system_handle, count(*) from terminal t, system_map s, host h where t.system_index = s.system_index and s.host_index = h.host_index group by s.system_name order by h.host_name Nothing complicated here. There are no parameters passed to the query. RJ -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: May 5, 2005 5:38 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: Re: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is > 2.3.4 with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ---------------------------------------------------------------------- > -- > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 16:00:32 2005 From: charlie at egenix.com (Charlie Clark) Date: Fri Jan 13 16:00:56 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000101c5516f$3b96de90$6505a8c0@rjlaptop> References: <000101c5516f$3b96de90$6505a8c0@rjlaptop> Message-ID: <20050505150032.644.1@bepc.1115296715.fake> On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base eGenix > mxODBC Database Connection window, it works fine and returns the 20 > lines expected. That could point to a problem in the rendering, which > seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection to > a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 10:22:17 2005 From: rj at maxxian.com (RJ Juneau) Date: Fri Jan 13 16:00:56 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505150032.644.1@bepc.1115296715.fake> Message-ID: <000201c55175$75bcad10$6505a8c0@rjlaptop> At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 11:47:14 2005 From: rj at maxxian.com (RJ Juneau) Date: Fri Jan 13 16:00:56 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c55181$549be0e0$6505a8c0@rjlaptop> Charlie, I found a fix. Here it is in case anyone else runs into this. You were correct - the problem is in another part of Zope. Based on your feedback, I did a bit more searching and found something here: http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. html The problem appears to be in Zope versions after 2.7.0. I'm running 2.7.6, and the post indicates that it also happens in 2.7.4. The solution: Edit file /lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. There are two lines in the file that start with . Edit them as follows: Change first line to: Change second line to: Just to be after, I shut down Zope before I made the changes and restarted it after. Thanks for the help! RJ -----Original Message----- From: RJ Juneau [mailto:rj@maxxian.com] Sent: May 5, 2005 9:22 AM To: 'Charlie Clark' Cc: 'egenix-users@lists.egenix.com' Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 17:57:25 2005 From: charlie at egenix.com (Charlie Clark) Date: Fri Jan 13 16:00:56 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <20050505165725.3380.2@bepc.1115296715.fake> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Thu May 5 09:15:21 2005 From: charlie at egenix.com (Charlie Clark) Date: Fri Jan 13 16:00:56 2006 Subject: [Zope-DB] RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <000001c55185$41477730$6b00a8c0@fonacier.local> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________ Zope-DB mailing list Zope-DB@zope.org http://mail.zope.org/mailman/listinfo/zope-db From rj at maxxian.com Thu May 5 12:38:00 2005 From: rj at maxxian.com (RJ Juneau) Date: Fri Jan 13 16:00:56 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000001c55188$6b841eb0$6505a8c0@rjlaptop> I just double-checked. Zope-2.7.6-final. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 12:49:16 2005 From: rj at maxxian.com (RJ Juneau) Date: Fri Jan 13 16:00:56 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000501c55189$fe149ba0$6505a8c0@rjlaptop> Charlie, The fix has only been applied for 2.7.7, 2.8b2. The info is in the original bug report which is closed and can be found here: http://www.zope.org/Collectors/Zope/1745 RJ -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Fri May 6 11:50:09 2005 From: rj at maxxian.com (RJ Juneau) Date: Fri Jan 13 16:00:56 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC Message-ID: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Still on eval for the product. I cannot get a stable connection to Sybase via the iODBC drivers. - The Sybase ODBC connection - including a query - have been verified at the iODBC level. - The setup is already working well for ODBC connection to MySQL. Symptoms include: - If I click on "Open Connection", it still comes back with "Connection Closed" when I go to a ZSQL method - Using 'Connect on Demand' is not working either. - Clicking "Open Connection" gives me the following error: Connection string: DSN=lixbox_sybase; UID=sa; PWD=XXXXXXX Connection pool entry: 0 Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection rejected by data source', 7952) The odbc.ini definition for DSN "lixbox_sybase" is as follows: [lixbox_sybase] JetFix = No NoRowSetSizeLimit = No Description = Test connection to listbox Options = LIXBOX DSQUERY = SQLSERVER TDSHOST = lixbox TDSPORT = 5000 TDSVER = 5.0 SQLSERVER_CATALOG = N CURSOR_SENSITIVITY = LOW UserName = sa Password = XXXXXXXX ServerType = Sybase 10/11/12 Driver = /opt/openlink/lib/sql_mt_lt.so Database = pubs2 ReadOnly = no NoAutoCommit = No NoLoginBox = No FetchBufferSize = 60 Other relevant data: - Connecting via OpenLink's iODBC - Zope 2.7.6-final - Python 2.3.4 - Connection to Sybase has been successfully tested with iODBC, including issuing a query - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC connection RJ Juneau Chief Technology Officer Maxxian Integration Inc. 155 Westhampton Drive Thornhill, Ontario Canada L4J 7X2 E-mail: rj@maxxian.com Phone: +1 905 482 9429 Cell: +1 416 897 6682 Toll free: +1 866 758 9161 Fax: +1 647 722 2038 -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050506/aef33361/attachment-0003.htm From mal at egenix.com Fri May 6 18:27:37 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 13 16:00:56 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC In-Reply-To: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> References: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Message-ID: <427B8CE9.1010601@egenix.com> RJ Juneau wrote: > Still on eval for the product. > > I cannot get a stable connection to Sybase via the iODBC drivers. > > - The Sybase ODBC connection - including a query - have been verified at > the iODBC level. > - The setup is already working well for ODBC connection to MySQL. > > Symptoms include: > > - If I click on "Open Connection", it still comes back with "Connection > Closed" when I go to a ZSQL method > - Using 'Connect on Demand' is not working either. > - Clicking "Open Connection" gives me the following error: > > Connection string: DSN=lixbox_sybase; > UID=sa; > PWD=XXXXXXX Try writing the connection string on one line and without whitespace. ODBC drivers sometimes have problems with this. > Connection pool entry: 0 > Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection > rejected by data source', 7952) This is a generic error that relates to authentication or firewall problems. It is possible that turning on ODBC tracing the ODBC manager will give more clues as to the real cause of the problem. > The odbc.ini definition for DSN "lixbox_sybase" is as follows: > > [lixbox_sybase] > JetFix = No > NoRowSetSizeLimit = No > Description = Test connection to listbox > Options = LIXBOX > DSQUERY = SQLSERVER > TDSHOST = lixbox > TDSPORT = 5000 > TDSVER = 5.0 > SQLSERVER_CATALOG = N > CURSOR_SENSITIVITY = LOW > UserName = sa > Password = XXXXXXXX > ServerType = Sybase 10/11/12 > Driver = /opt/openlink/lib/sql_mt_lt.so > Database = pubs2 > ReadOnly = no > NoAutoCommit = No > NoLoginBox = No > FetchBufferSize = 60 > > > Other relevant data: > - Connecting via OpenLink's iODBC > - Zope 2.7.6-final > - Python 2.3.4 > - Connection to Sybase has been successfully tested with iODBC, > including issuing a query > - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC > connection > > > > RJ Juneau > Chief Technology Officer > Maxxian Integration Inc. > 155 Westhampton Drive > Thornhill, Ontario > Canada L4J 7X2 > E-mail: rj@maxxian.com > Phone: +1 905 482 9429 > Cell: +1 416 897 6682 > Toll free: +1 866 758 9161 > Fax: +1 647 722 2038 > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 06 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From calisp at gmail.com Sun May 15 23:49:03 2005 From: calisp at gmail.com (calisp@gmail.com) Date: Fri Jan 13 16:00:57 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK Message-ID: Hi, I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the following error... 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the last phase of a two-phase commit. This shouldn't happen. Traceback (most recent call last): File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one jar.tpc_finish(self) File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish try: self._finish() File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could not perform COMMIT or ROLLBACK', 1023) What could be causing this? Can I get the mxODBCZopeDA source from somewhere? It would make debugging this much easier. Thanks, Calisp. From mal at egenix.com Mon May 16 13:52:12 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 13 16:00:57 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK In-Reply-To: References: Message-ID: <42887B5C.4010109@egenix.com> calisp@gmail.com wrote: > Hi, > > I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with > unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the > following error... > > 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the > last phase of a two-phase commit. This shouldn't happen. > Traceback (most recent call last): > File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one > jar.tpc_finish(self) > File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish > try: self._finish() > File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish > File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler > ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could > not perform COMMIT or ROLLBACK', 1023) You should have a look at the database logs to see what prevented the commit from being completed. > What could be causing this? Hard to say: mxODBCZopeDA is trying to commit the transaction, but the driver or database failed to complete the request. The above error was generated by the ODBC driver. This could be network or DNS problems, or be related to a bug in FreeTDS (which is getting more stable with every new release, but should still be considered beta quality software at the moment). > Can I get the mxODBCZopeDA source from > somewhere? It would make debugging this much easier. Getting the source is not an option and won't help much either since the source of the problem is not mxODBCZopeDA. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 16 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Sun May 1 21:29:25 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 13 20:01:56 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <427259F3.4090806@egenix.com> References: <20050427130906.52878.qmail@web30008.mail.mud.yahoo.com> <427259F3.4090806@egenix.com> Message-ID: <42752005.7080904@egenix.com> M.-A. Lemburg wrote: > David Rushby wrote: > >> --- "M.-A. Lemburg" wrote: >> >>> Are you using the standard mxDateTime build or one >>> with WANT_SUBCLASSABLE_TYPES defined... >> >> >> >> Presumably "the standard", since I just built with 'py24d setup.py >> build', making no attempt to enable special directives. >> >> >>> ... (mxDateTime_Deallocate is only used by the latter)? >> >> >> >> That's true in 2.1.0-2005-04-15, but not in 2.1.0b5. >> >> >>> In any case, please try our latest snapshot: >>> >>> >> >> http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-04-15.zip >> >>> to see if that makes any difference. >> >> >> >> I can't build it out of the box: > > > Hmm, looks like distutils' sdist command doesn't like our new > repository layout which uses symlinks (after we've switched to > subversion). > > We'll have to debug distutils first, I guess :-( Ok, we've found the problem and fixed it. Here's the new release (which does build out of the box at least on our boxes ;-): http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 01 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From davidrushby at yahoo.com Mon May 2 15:49:53 2005 From: davidrushby at yahoo.com (David Rushby) Date: Fri Jan 13 20:01:56 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Ok, we've found the problem and fixed it. Here's the new > release (which does build out of the box at least on our > boxes ;-): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip It does build now, but: py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" still behaves as it did when I submitted my original message: Fatal Python error: UNREF invalid object Aborted This is the same debug build of Python 2.4.1 that I was previously using, running the same configuration (CentOS Linux 4.0/i386, everything compiled with GCC 3.4.3). Have you examined my original claim as to the cause of the bug? __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 10:21:55 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 13 20:01:56 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> References: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> Message-ID: <42772693.8050306@egenix.com> David Rushby wrote: > --- "M.-A. Lemburg" wrote: > >>Ok, we've found the problem and fixed it. Here's the new >>release (which does build out of the box at least on our >>boxes ;-): >> >> > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip > > It does build now, but: > py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" > still behaves as it did when I submitted my original message: > Fatal Python error: UNREF invalid object > Aborted > > This is the same debug build of Python 2.4.1 that I was previously > using, running the same configuration (CentOS Linux 4.0/i386, > everything compiled with GCC 3.4.3). > > Have you examined my original claim as to the cause of the bug? No. We haven't had time for looking into it. I'm not sure whether your analysis of the problem is correct: if you don't define WANT_SUBCLASSABLE_TYPES, the API mxDateTime_Deallocate() is neither defined nor used. Furthermore, PyObject_Del() is only called by mxDateTime_Free() if you have explicitely edited mxDateTime.c to disabled the free list #defines. In a standard build, PyObject_Del() is only called at module finalization time. Note that the reason we call mxDateTime_Free() in the constructor is that we don't want the destructor of the object to be called. Py_DECREF() would call the destructor (mxDateTime_Deallocate). It is possible that the debug code in Python complains about the refcount in the object not being 0 at the time the object is finalized (module finalization time), but I don't see any such checks in PyObject_Free() (which is what PyObject_Del() maps to). Again, all of this does not happen in regular non-debug Python builds. Please be aware that we don't support debug builds, so fixing the problem (if there is one - gcc has some serious optimization problems on some combinations of platform and version) will take a while. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 09:27:37 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Fri Jan 13 20:01:56 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 Message-ID: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Hi all- I am trying to build the mx-base package, v.2.0.6. This will be used with postgresql 7.3.9, psycopg 1.1.18, and Roundup 0.8.2. RHEL 3.0 Python 2.3 egenix-mx-base-2.0.6.tar.gz I performed a: /usr/local/bin/python2.3 setup.py install Everything looks proper with the exeception of this series of warning statements: ----------------- gcc -pthread -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fno-strict-aliasing -fPIC -Imx/BeeBase/mxBeeBase -I/usr/local/incl ude/python2.3 -I/usr/local/include -c mx/BeeBase/mxBeeBase/btr.c -o build/temp.linux-i686-2.3/mx/BeeBase/mxBeeBase/mxBeeBa se/mx/BeeBase/mxBeeBase/btr.o mx/BeeBase/mxBeeBase/btr.c: In function `dumpBuf': mx/BeeBase/mxBeeBase/btr.c:249: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:250: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:255: warning: unsigned int format, long unsigned int arg (arg 4) mx/BeeBase/mxBeeBase/btr.c:256: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c: In function `_validateTree': mx/BeeBase/mxBeeBase/btr.c:330: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:337: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:339: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:349: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:351: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 3) creating build/lib.linux-i686-2.3/mx/BeeBase creating build/lib.linux-i686-2.3/mx/BeeBase/mxBeeBase -------------- Would someone be kind enough to let me know whether these messages were expected, and if not, how I might resolve these? Thanks! DC __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 22:06:33 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 13 20:01:56 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> References: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Message-ID: <4277CBB9.8020302@egenix.com> Dianne Chen wrote: > Hi all- > > I am trying to build the mx-base package, v.2.0.6. > This will be used with postgresql 7.3.9, psycopg > 1.1.18, and Roundup 0.8.2. > > RHEL 3.0 > Python 2.3 > egenix-mx-base-2.0.6.tar.gz > > I performed a: > > /usr/local/bin/python2.3 setup.py install > > Everything looks proper with the exeception of this > series of warning statements: > > ----------------- > ... > -------------- > > Would someone be kind enough to let me know whether > these messages were expected, and if not, how I might > resolve these? These warning can safely be ignored. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 13:41:14 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Fri Jan 13 20:01:56 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: 6667 Message-ID: <20050503194114.72091.qmail@web31414.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Dianne Chen wrote: > > Hi all- > > > > I am trying to build the mx-base package, v.2.0.6. > > This will be used with postgresql 7.3.9, psycopg > > 1.1.18, and Roundup 0.8.2. > > > > RHEL 3.0 > > Python 2.3 > > egenix-mx-base-2.0.6.tar.gz > > > > I performed a: > > > > /usr/local/bin/python2.3 setup.py install > > > > Everything looks proper with the exeception of > this > > series of warning statements: > > > > ----------------- > > ... > > -------------- > > > > Would someone be kind enough to let me know > whether > > these messages were expected, and if not, how I > might > > resolve these? > > These warning can safely be ignored. > > -- > Marc-Andre Lemburg > eGenix.com > Marc- Thank you very much for the reply. It helps greatly. With kind regards, DC __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From davidrushby at yahoo.com Tue May 3 17:18:46 2005 From: davidrushby at yahoo.com (David Rushby) Date: Fri Jan 13 20:01:56 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050503231846.35012.qmail@web30009.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > I'm not sure whether your analysis of the problem is correct... Indeed, my original analysis wasn't correct; I think this one is. The fatal error I'm complaining about only arises if the arguments to DateTime.DateTime are invalid, so that the object is deallocated in the onError block of mxDateTime_FromDateAndTime. If the object is created successfully, and later deallocated by Python's garbage collector, the fatal error doesn't arise. Here's my analysis of the problem: --- If the debugging directive Py_TRACE_REFS is enabled, as it is in my case, the Python interpreter maintains a doubly linked list of all Python objects (named refchain) via the _ob_next and _ob_prev pointers added to PyObject via _PyObject_HEAD_EXTRA. Each object is inserted into refchain by the _Py_AddToAllObjects call in _Py_NewReference, and removed from refchain by the _Py_ForgetReference call in _Py_Dealloc. _Py_ForgetReference performs an integrity check on the object being deallocated (op) to make sure that its neighbors in refchain recognize it. Specifically, _Py_ForgetReference verifies that the _ob_next pointer of the previous object in refchain (op->_ob_prev->_ob_next) points to op, and that the _ob_prev pointer of the next object in refchain (op->_ob_next->_ob_prev) points to op. If either of those conditions is false, the interpreter raises the fatal error I'm seeing. After mxDateTime_New pulls an mxDateTimeObject out of the free list, it calls _Py_NewReference on that object to transform it from a "conceptually deallocated" object to a "conceptually allocated" one. _Py_NewReference inserts the object into refchain. Later, when the object is being "conceptually deallocated", it should be removed from refchain with _Py_ForgetReference. The version of _Py_Dealloc that's active when Py_TRACE_REFS is enabled does this (_Py_Dealloc is the element of Py_DECREF that performs the actual destruction). _Py_Dealloc first calls _Py_ForgetReference to remove the object from refchain, then calls the object's destructor (op->ob_type->tp_dealloc). If WANT_SUBCLASSABLE_TYPES is not defined (it is not in my case), the destructor for mxDateTime_Type is mxDateTime_Free. So, if a DateTime object is deallocated normally, as a result of its reference count falling to zero, _Py_Dealloc is called on the object, which first removes it from refchain, then passes it to mxDateTime_Free. If a DateTime object is destroyed prematurely, as a result of invalid arguments to its destructor, the onError handler calls mxDateTime_Free, so the object is "conceptually deallocated" (placed in the free list), *but* the object is not removed from refchain. So if a refchain-membership-integrity-check is performed on the object in question or one of its immediate neighbors in refchain, that integrity check fails, leading to the fatal error. --- The solution is to 'Py_DECREF(...)' the object in the onError handler of its constructor, instead of passing the object directly to mxDateTime_Free. That change solves two problems: 1) It causes _Py_Dealloc to execute, which in turn executes _Py_ForgetReference, so the object is removed from refchain, as it should be. 2) At present, objects that are created successfully and later deallocated by normal reference count mechanics have a reference count of 0 when they enter the free list, whereas objects whose constructors abort their creation due to invalid arguments have a reference count of 1 when they enter the free list. Although AFAIK this doesn't cause an actual execution problem (because the object's reference count is *explicitly set to 1* rather than *incremented by 1* when the object is later "conceptually allocated" by _Py_NewReference), it is likely to confuse future maintainers and thereby lead to the introduction of an actual execution problem. I assume that if you agree that this is a reasonable solution, you'll want to apply the change not only to mxDateTime_FromDateAndTime, but to all similar constructors in mxDateTime.c. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From rj at maxxian.com Thu May 5 01:57:40 2005 From: rj at maxxian.com (RJ Juneau) Date: Fri Jan 13 20:01:56 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c5512e$f72798c0$6505a8c0@rjlaptop> I'm on the 30 day evaluation for mxodbc_zope_da. I'm getting the following error when I submit some queries: Error Type: KeyError Error Value: 'query' I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 with UCS4. The error seems to be caused by multiple rows being returned. I did see an earlier posting with the same error message. The response suggested a template error, but this is clearly not the case here. The additional evidence I've gathered so far: - I'm running the test directly from the ZSQL method, so there's no template involved. - If I use the same query with an additional "where" clause to ensure that only one row is returned, it works - If I use a value in the 'where' clause with no rows returned, it works - The same ZSQL query is being used on a Windows machine running Zope and the free ZODBC module without a problem - The query has been verified directly in mysql-client-browser Other info: - The database is MySQL 4.1.10A-0 - iODBC is the DB driver RJ Juneau -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050505/68d278bf/attachment-0004.htm From mal at egenix.com Thu May 5 12:37:43 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 13 20:01:56 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c5512e$f72798c0$6505a8c0@rjlaptop> References: <000301c5512e$f72798c0$6505a8c0@rjlaptop> Message-ID: <4279E967.6010904@egenix.com> RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 > with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 09:37:42 2005 From: rj at maxxian.com (RJ Juneau) Date: Fri Jan 13 20:01:56 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000101c5516f$3b96de90$6505a8c0@rjlaptop> More interesting info on the problem: If I execute the query directly in the "test" window of the base eGenix mxODBC Database Connection window, it works fine and returns the 20 lines expected. That could point to a problem in the rendering, which seems to be where the traceback ends. Note that within the same Zope system I also have an ODBC connection to a Sybase database, and I have successfully tested multi-line ZSQL queries there. This is the traceback: Time 2005/05/05 07:55:15.294 GMT-4 Exception Type KeyError Exception Value 'query' Traceback (innermost last): Module ZPublisher.Publish, line 101, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 39, in call_object Module Shared.DC.ZRDB.DA, line 337, in manage_test Module DocumentTemplate.DT_String, line 474, in __call__ Module DocumentTemplate.DT_In, line 602, in renderwb Module DocumentTemplate.DT_Var, line 219, in render KeyError: 'query' I don't think the following is an issue, but I'll include it for completeness.I am also getting the following iODBC warnings and errors in the Zope console log, which are related to the ODBC parameters being passed by iODBC. Note that these errors also appear for all of the successful queries. [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (Setup). [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (UsageCount). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Timeout). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Reuse). As for the ZSQL snippet from the template... Since there's no template involved yet (I'm still testing directly from the ZSQL method), I assume you mean the SQL code? select h.host_name, s.system_name, s.system_handle, count(*) from terminal t, system_map s, host h where t.system_index = s.system_index and s.host_index = h.host_index group by s.system_name order by h.host_name Nothing complicated here. There are no parameters passed to the query. RJ -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: May 5, 2005 5:38 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: Re: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is > 2.3.4 with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ---------------------------------------------------------------------- > -- > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 16:00:32 2005 From: charlie at egenix.com (Charlie Clark) Date: Fri Jan 13 20:01:56 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000101c5516f$3b96de90$6505a8c0@rjlaptop> References: <000101c5516f$3b96de90$6505a8c0@rjlaptop> Message-ID: <20050505150032.644.1@bepc.1115296715.fake> On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base eGenix > mxODBC Database Connection window, it works fine and returns the 20 > lines expected. That could point to a problem in the rendering, which > seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection to > a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 10:22:17 2005 From: rj at maxxian.com (RJ Juneau) Date: Fri Jan 13 20:01:57 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505150032.644.1@bepc.1115296715.fake> Message-ID: <000201c55175$75bcad10$6505a8c0@rjlaptop> At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 11:47:14 2005 From: rj at maxxian.com (RJ Juneau) Date: Fri Jan 13 20:01:57 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c55181$549be0e0$6505a8c0@rjlaptop> Charlie, I found a fix. Here it is in case anyone else runs into this. You were correct - the problem is in another part of Zope. Based on your feedback, I did a bit more searching and found something here: http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. html The problem appears to be in Zope versions after 2.7.0. I'm running 2.7.6, and the post indicates that it also happens in 2.7.4. The solution: Edit file /lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. There are two lines in the file that start with . Edit them as follows: Change first line to: Change second line to: Just to be after, I shut down Zope before I made the changes and restarted it after. Thanks for the help! RJ -----Original Message----- From: RJ Juneau [mailto:rj@maxxian.com] Sent: May 5, 2005 9:22 AM To: 'Charlie Clark' Cc: 'egenix-users@lists.egenix.com' Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 17:57:25 2005 From: charlie at egenix.com (Charlie Clark) Date: Fri Jan 13 20:01:57 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <20050505165725.3380.2@bepc.1115296715.fake> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Thu May 5 09:15:21 2005 From: charlie at egenix.com (Charlie Clark) Date: Fri Jan 13 20:01:57 2006 Subject: [Zope-DB] RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <000001c55185$41477730$6b00a8c0@fonacier.local> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________ Zope-DB mailing list Zope-DB@zope.org http://mail.zope.org/mailman/listinfo/zope-db From rj at maxxian.com Thu May 5 12:38:00 2005 From: rj at maxxian.com (RJ Juneau) Date: Fri Jan 13 20:01:57 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000001c55188$6b841eb0$6505a8c0@rjlaptop> I just double-checked. Zope-2.7.6-final. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 12:49:16 2005 From: rj at maxxian.com (RJ Juneau) Date: Fri Jan 13 20:01:57 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000501c55189$fe149ba0$6505a8c0@rjlaptop> Charlie, The fix has only been applied for 2.7.7, 2.8b2. The info is in the original bug report which is closed and can be found here: http://www.zope.org/Collectors/Zope/1745 RJ -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Fri May 6 11:50:09 2005 From: rj at maxxian.com (RJ Juneau) Date: Fri Jan 13 20:01:57 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC Message-ID: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Still on eval for the product. I cannot get a stable connection to Sybase via the iODBC drivers. - The Sybase ODBC connection - including a query - have been verified at the iODBC level. - The setup is already working well for ODBC connection to MySQL. Symptoms include: - If I click on "Open Connection", it still comes back with "Connection Closed" when I go to a ZSQL method - Using 'Connect on Demand' is not working either. - Clicking "Open Connection" gives me the following error: Connection string: DSN=lixbox_sybase; UID=sa; PWD=XXXXXXX Connection pool entry: 0 Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection rejected by data source', 7952) The odbc.ini definition for DSN "lixbox_sybase" is as follows: [lixbox_sybase] JetFix = No NoRowSetSizeLimit = No Description = Test connection to listbox Options = LIXBOX DSQUERY = SQLSERVER TDSHOST = lixbox TDSPORT = 5000 TDSVER = 5.0 SQLSERVER_CATALOG = N CURSOR_SENSITIVITY = LOW UserName = sa Password = XXXXXXXX ServerType = Sybase 10/11/12 Driver = /opt/openlink/lib/sql_mt_lt.so Database = pubs2 ReadOnly = no NoAutoCommit = No NoLoginBox = No FetchBufferSize = 60 Other relevant data: - Connecting via OpenLink's iODBC - Zope 2.7.6-final - Python 2.3.4 - Connection to Sybase has been successfully tested with iODBC, including issuing a query - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC connection RJ Juneau Chief Technology Officer Maxxian Integration Inc. 155 Westhampton Drive Thornhill, Ontario Canada L4J 7X2 E-mail: rj@maxxian.com Phone: +1 905 482 9429 Cell: +1 416 897 6682 Toll free: +1 866 758 9161 Fax: +1 647 722 2038 -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050506/aef33361/attachment-0004.htm From mal at egenix.com Fri May 6 18:27:37 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 13 20:01:57 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC In-Reply-To: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> References: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Message-ID: <427B8CE9.1010601@egenix.com> RJ Juneau wrote: > Still on eval for the product. > > I cannot get a stable connection to Sybase via the iODBC drivers. > > - The Sybase ODBC connection - including a query - have been verified at > the iODBC level. > - The setup is already working well for ODBC connection to MySQL. > > Symptoms include: > > - If I click on "Open Connection", it still comes back with "Connection > Closed" when I go to a ZSQL method > - Using 'Connect on Demand' is not working either. > - Clicking "Open Connection" gives me the following error: > > Connection string: DSN=lixbox_sybase; > UID=sa; > PWD=XXXXXXX Try writing the connection string on one line and without whitespace. ODBC drivers sometimes have problems with this. > Connection pool entry: 0 > Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection > rejected by data source', 7952) This is a generic error that relates to authentication or firewall problems. It is possible that turning on ODBC tracing the ODBC manager will give more clues as to the real cause of the problem. > The odbc.ini definition for DSN "lixbox_sybase" is as follows: > > [lixbox_sybase] > JetFix = No > NoRowSetSizeLimit = No > Description = Test connection to listbox > Options = LIXBOX > DSQUERY = SQLSERVER > TDSHOST = lixbox > TDSPORT = 5000 > TDSVER = 5.0 > SQLSERVER_CATALOG = N > CURSOR_SENSITIVITY = LOW > UserName = sa > Password = XXXXXXXX > ServerType = Sybase 10/11/12 > Driver = /opt/openlink/lib/sql_mt_lt.so > Database = pubs2 > ReadOnly = no > NoAutoCommit = No > NoLoginBox = No > FetchBufferSize = 60 > > > Other relevant data: > - Connecting via OpenLink's iODBC > - Zope 2.7.6-final > - Python 2.3.4 > - Connection to Sybase has been successfully tested with iODBC, > including issuing a query > - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC > connection > > > > RJ Juneau > Chief Technology Officer > Maxxian Integration Inc. > 155 Westhampton Drive > Thornhill, Ontario > Canada L4J 7X2 > E-mail: rj@maxxian.com > Phone: +1 905 482 9429 > Cell: +1 416 897 6682 > Toll free: +1 866 758 9161 > Fax: +1 647 722 2038 > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 06 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From calisp at gmail.com Sun May 15 23:49:03 2005 From: calisp at gmail.com (calisp@gmail.com) Date: Fri Jan 13 20:01:57 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK Message-ID: Hi, I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the following error... 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the last phase of a two-phase commit. This shouldn't happen. Traceback (most recent call last): File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one jar.tpc_finish(self) File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish try: self._finish() File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could not perform COMMIT or ROLLBACK', 1023) What could be causing this? Can I get the mxODBCZopeDA source from somewhere? It would make debugging this much easier. Thanks, Calisp. From mal at egenix.com Mon May 16 13:52:12 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 13 20:01:57 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK In-Reply-To: References: Message-ID: <42887B5C.4010109@egenix.com> calisp@gmail.com wrote: > Hi, > > I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with > unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the > following error... > > 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the > last phase of a two-phase commit. This shouldn't happen. > Traceback (most recent call last): > File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one > jar.tpc_finish(self) > File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish > try: self._finish() > File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish > File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler > ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could > not perform COMMIT or ROLLBACK', 1023) You should have a look at the database logs to see what prevented the commit from being completed. > What could be causing this? Hard to say: mxODBCZopeDA is trying to commit the transaction, but the driver or database failed to complete the request. The above error was generated by the ODBC driver. This could be network or DNS problems, or be related to a bug in FreeTDS (which is getting more stable with every new release, but should still be considered beta quality software at the moment). > Can I get the mxODBCZopeDA source from > somewhere? It would make debugging this much easier. Getting the source is not an option and won't help much either since the source of the problem is not mxODBCZopeDA. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 16 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Sun May 1 21:29:25 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 14 08:02:31 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <427259F3.4090806@egenix.com> References: <20050427130906.52878.qmail@web30008.mail.mud.yahoo.com> <427259F3.4090806@egenix.com> Message-ID: <42752005.7080904@egenix.com> M.-A. Lemburg wrote: > David Rushby wrote: > >> --- "M.-A. Lemburg" wrote: >> >>> Are you using the standard mxDateTime build or one >>> with WANT_SUBCLASSABLE_TYPES defined... >> >> >> >> Presumably "the standard", since I just built with 'py24d setup.py >> build', making no attempt to enable special directives. >> >> >>> ... (mxDateTime_Deallocate is only used by the latter)? >> >> >> >> That's true in 2.1.0-2005-04-15, but not in 2.1.0b5. >> >> >>> In any case, please try our latest snapshot: >>> >>> >> >> http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-04-15.zip >> >>> to see if that makes any difference. >> >> >> >> I can't build it out of the box: > > > Hmm, looks like distutils' sdist command doesn't like our new > repository layout which uses symlinks (after we've switched to > subversion). > > We'll have to debug distutils first, I guess :-( Ok, we've found the problem and fixed it. Here's the new release (which does build out of the box at least on our boxes ;-): http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 01 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From davidrushby at yahoo.com Mon May 2 15:49:53 2005 From: davidrushby at yahoo.com (David Rushby) Date: Sat Jan 14 08:02:31 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Ok, we've found the problem and fixed it. Here's the new > release (which does build out of the box at least on our > boxes ;-): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip It does build now, but: py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" still behaves as it did when I submitted my original message: Fatal Python error: UNREF invalid object Aborted This is the same debug build of Python 2.4.1 that I was previously using, running the same configuration (CentOS Linux 4.0/i386, everything compiled with GCC 3.4.3). Have you examined my original claim as to the cause of the bug? __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 10:21:55 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 14 08:02:31 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> References: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> Message-ID: <42772693.8050306@egenix.com> David Rushby wrote: > --- "M.-A. Lemburg" wrote: > >>Ok, we've found the problem and fixed it. Here's the new >>release (which does build out of the box at least on our >>boxes ;-): >> >> > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip > > It does build now, but: > py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" > still behaves as it did when I submitted my original message: > Fatal Python error: UNREF invalid object > Aborted > > This is the same debug build of Python 2.4.1 that I was previously > using, running the same configuration (CentOS Linux 4.0/i386, > everything compiled with GCC 3.4.3). > > Have you examined my original claim as to the cause of the bug? No. We haven't had time for looking into it. I'm not sure whether your analysis of the problem is correct: if you don't define WANT_SUBCLASSABLE_TYPES, the API mxDateTime_Deallocate() is neither defined nor used. Furthermore, PyObject_Del() is only called by mxDateTime_Free() if you have explicitely edited mxDateTime.c to disabled the free list #defines. In a standard build, PyObject_Del() is only called at module finalization time. Note that the reason we call mxDateTime_Free() in the constructor is that we don't want the destructor of the object to be called. Py_DECREF() would call the destructor (mxDateTime_Deallocate). It is possible that the debug code in Python complains about the refcount in the object not being 0 at the time the object is finalized (module finalization time), but I don't see any such checks in PyObject_Free() (which is what PyObject_Del() maps to). Again, all of this does not happen in regular non-debug Python builds. Please be aware that we don't support debug builds, so fixing the problem (if there is one - gcc has some serious optimization problems on some combinations of platform and version) will take a while. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 09:27:37 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Sat Jan 14 08:02:31 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 Message-ID: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Hi all- I am trying to build the mx-base package, v.2.0.6. This will be used with postgresql 7.3.9, psycopg 1.1.18, and Roundup 0.8.2. RHEL 3.0 Python 2.3 egenix-mx-base-2.0.6.tar.gz I performed a: /usr/local/bin/python2.3 setup.py install Everything looks proper with the exeception of this series of warning statements: ----------------- gcc -pthread -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fno-strict-aliasing -fPIC -Imx/BeeBase/mxBeeBase -I/usr/local/incl ude/python2.3 -I/usr/local/include -c mx/BeeBase/mxBeeBase/btr.c -o build/temp.linux-i686-2.3/mx/BeeBase/mxBeeBase/mxBeeBa se/mx/BeeBase/mxBeeBase/btr.o mx/BeeBase/mxBeeBase/btr.c: In function `dumpBuf': mx/BeeBase/mxBeeBase/btr.c:249: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:250: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:255: warning: unsigned int format, long unsigned int arg (arg 4) mx/BeeBase/mxBeeBase/btr.c:256: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c: In function `_validateTree': mx/BeeBase/mxBeeBase/btr.c:330: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:337: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:339: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:349: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:351: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 3) creating build/lib.linux-i686-2.3/mx/BeeBase creating build/lib.linux-i686-2.3/mx/BeeBase/mxBeeBase -------------- Would someone be kind enough to let me know whether these messages were expected, and if not, how I might resolve these? Thanks! DC __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 22:06:33 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 14 08:02:31 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> References: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Message-ID: <4277CBB9.8020302@egenix.com> Dianne Chen wrote: > Hi all- > > I am trying to build the mx-base package, v.2.0.6. > This will be used with postgresql 7.3.9, psycopg > 1.1.18, and Roundup 0.8.2. > > RHEL 3.0 > Python 2.3 > egenix-mx-base-2.0.6.tar.gz > > I performed a: > > /usr/local/bin/python2.3 setup.py install > > Everything looks proper with the exeception of this > series of warning statements: > > ----------------- > ... > -------------- > > Would someone be kind enough to let me know whether > these messages were expected, and if not, how I might > resolve these? These warning can safely be ignored. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 13:41:14 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Sat Jan 14 08:02:31 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: 6667 Message-ID: <20050503194114.72091.qmail@web31414.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Dianne Chen wrote: > > Hi all- > > > > I am trying to build the mx-base package, v.2.0.6. > > This will be used with postgresql 7.3.9, psycopg > > 1.1.18, and Roundup 0.8.2. > > > > RHEL 3.0 > > Python 2.3 > > egenix-mx-base-2.0.6.tar.gz > > > > I performed a: > > > > /usr/local/bin/python2.3 setup.py install > > > > Everything looks proper with the exeception of > this > > series of warning statements: > > > > ----------------- > > ... > > -------------- > > > > Would someone be kind enough to let me know > whether > > these messages were expected, and if not, how I > might > > resolve these? > > These warning can safely be ignored. > > -- > Marc-Andre Lemburg > eGenix.com > Marc- Thank you very much for the reply. It helps greatly. With kind regards, DC __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From davidrushby at yahoo.com Tue May 3 17:18:46 2005 From: davidrushby at yahoo.com (David Rushby) Date: Sat Jan 14 08:02:31 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050503231846.35012.qmail@web30009.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > I'm not sure whether your analysis of the problem is correct... Indeed, my original analysis wasn't correct; I think this one is. The fatal error I'm complaining about only arises if the arguments to DateTime.DateTime are invalid, so that the object is deallocated in the onError block of mxDateTime_FromDateAndTime. If the object is created successfully, and later deallocated by Python's garbage collector, the fatal error doesn't arise. Here's my analysis of the problem: --- If the debugging directive Py_TRACE_REFS is enabled, as it is in my case, the Python interpreter maintains a doubly linked list of all Python objects (named refchain) via the _ob_next and _ob_prev pointers added to PyObject via _PyObject_HEAD_EXTRA. Each object is inserted into refchain by the _Py_AddToAllObjects call in _Py_NewReference, and removed from refchain by the _Py_ForgetReference call in _Py_Dealloc. _Py_ForgetReference performs an integrity check on the object being deallocated (op) to make sure that its neighbors in refchain recognize it. Specifically, _Py_ForgetReference verifies that the _ob_next pointer of the previous object in refchain (op->_ob_prev->_ob_next) points to op, and that the _ob_prev pointer of the next object in refchain (op->_ob_next->_ob_prev) points to op. If either of those conditions is false, the interpreter raises the fatal error I'm seeing. After mxDateTime_New pulls an mxDateTimeObject out of the free list, it calls _Py_NewReference on that object to transform it from a "conceptually deallocated" object to a "conceptually allocated" one. _Py_NewReference inserts the object into refchain. Later, when the object is being "conceptually deallocated", it should be removed from refchain with _Py_ForgetReference. The version of _Py_Dealloc that's active when Py_TRACE_REFS is enabled does this (_Py_Dealloc is the element of Py_DECREF that performs the actual destruction). _Py_Dealloc first calls _Py_ForgetReference to remove the object from refchain, then calls the object's destructor (op->ob_type->tp_dealloc). If WANT_SUBCLASSABLE_TYPES is not defined (it is not in my case), the destructor for mxDateTime_Type is mxDateTime_Free. So, if a DateTime object is deallocated normally, as a result of its reference count falling to zero, _Py_Dealloc is called on the object, which first removes it from refchain, then passes it to mxDateTime_Free. If a DateTime object is destroyed prematurely, as a result of invalid arguments to its destructor, the onError handler calls mxDateTime_Free, so the object is "conceptually deallocated" (placed in the free list), *but* the object is not removed from refchain. So if a refchain-membership-integrity-check is performed on the object in question or one of its immediate neighbors in refchain, that integrity check fails, leading to the fatal error. --- The solution is to 'Py_DECREF(...)' the object in the onError handler of its constructor, instead of passing the object directly to mxDateTime_Free. That change solves two problems: 1) It causes _Py_Dealloc to execute, which in turn executes _Py_ForgetReference, so the object is removed from refchain, as it should be. 2) At present, objects that are created successfully and later deallocated by normal reference count mechanics have a reference count of 0 when they enter the free list, whereas objects whose constructors abort their creation due to invalid arguments have a reference count of 1 when they enter the free list. Although AFAIK this doesn't cause an actual execution problem (because the object's reference count is *explicitly set to 1* rather than *incremented by 1* when the object is later "conceptually allocated" by _Py_NewReference), it is likely to confuse future maintainers and thereby lead to the introduction of an actual execution problem. I assume that if you agree that this is a reasonable solution, you'll want to apply the change not only to mxDateTime_FromDateAndTime, but to all similar constructors in mxDateTime.c. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From rj at maxxian.com Thu May 5 01:57:40 2005 From: rj at maxxian.com (RJ Juneau) Date: Sat Jan 14 08:02:31 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c5512e$f72798c0$6505a8c0@rjlaptop> I'm on the 30 day evaluation for mxodbc_zope_da. I'm getting the following error when I submit some queries: Error Type: KeyError Error Value: 'query' I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 with UCS4. The error seems to be caused by multiple rows being returned. I did see an earlier posting with the same error message. The response suggested a template error, but this is clearly not the case here. The additional evidence I've gathered so far: - I'm running the test directly from the ZSQL method, so there's no template involved. - If I use the same query with an additional "where" clause to ensure that only one row is returned, it works - If I use a value in the 'where' clause with no rows returned, it works - The same ZSQL query is being used on a Windows machine running Zope and the free ZODBC module without a problem - The query has been verified directly in mysql-client-browser Other info: - The database is MySQL 4.1.10A-0 - iODBC is the DB driver RJ Juneau -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050505/68d278bf/attachment-0005.htm From mal at egenix.com Thu May 5 12:37:43 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 14 08:02:32 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c5512e$f72798c0$6505a8c0@rjlaptop> References: <000301c5512e$f72798c0$6505a8c0@rjlaptop> Message-ID: <4279E967.6010904@egenix.com> RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 > with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 09:37:42 2005 From: rj at maxxian.com (RJ Juneau) Date: Sat Jan 14 08:02:32 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000101c5516f$3b96de90$6505a8c0@rjlaptop> More interesting info on the problem: If I execute the query directly in the "test" window of the base eGenix mxODBC Database Connection window, it works fine and returns the 20 lines expected. That could point to a problem in the rendering, which seems to be where the traceback ends. Note that within the same Zope system I also have an ODBC connection to a Sybase database, and I have successfully tested multi-line ZSQL queries there. This is the traceback: Time 2005/05/05 07:55:15.294 GMT-4 Exception Type KeyError Exception Value 'query' Traceback (innermost last): Module ZPublisher.Publish, line 101, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 39, in call_object Module Shared.DC.ZRDB.DA, line 337, in manage_test Module DocumentTemplate.DT_String, line 474, in __call__ Module DocumentTemplate.DT_In, line 602, in renderwb Module DocumentTemplate.DT_Var, line 219, in render KeyError: 'query' I don't think the following is an issue, but I'll include it for completeness.I am also getting the following iODBC warnings and errors in the Zope console log, which are related to the ODBC parameters being passed by iODBC. Note that these errors also appear for all of the successful queries. [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (Setup). [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (UsageCount). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Timeout). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Reuse). As for the ZSQL snippet from the template... Since there's no template involved yet (I'm still testing directly from the ZSQL method), I assume you mean the SQL code? select h.host_name, s.system_name, s.system_handle, count(*) from terminal t, system_map s, host h where t.system_index = s.system_index and s.host_index = h.host_index group by s.system_name order by h.host_name Nothing complicated here. There are no parameters passed to the query. RJ -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: May 5, 2005 5:38 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: Re: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is > 2.3.4 with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ---------------------------------------------------------------------- > -- > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 16:00:32 2005 From: charlie at egenix.com (Charlie Clark) Date: Sat Jan 14 08:02:32 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000101c5516f$3b96de90$6505a8c0@rjlaptop> References: <000101c5516f$3b96de90$6505a8c0@rjlaptop> Message-ID: <20050505150032.644.1@bepc.1115296715.fake> On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base eGenix > mxODBC Database Connection window, it works fine and returns the 20 > lines expected. That could point to a problem in the rendering, which > seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection to > a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 10:22:17 2005 From: rj at maxxian.com (RJ Juneau) Date: Sat Jan 14 08:02:32 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505150032.644.1@bepc.1115296715.fake> Message-ID: <000201c55175$75bcad10$6505a8c0@rjlaptop> At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 11:47:14 2005 From: rj at maxxian.com (RJ Juneau) Date: Sat Jan 14 08:02:32 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c55181$549be0e0$6505a8c0@rjlaptop> Charlie, I found a fix. Here it is in case anyone else runs into this. You were correct - the problem is in another part of Zope. Based on your feedback, I did a bit more searching and found something here: http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. html The problem appears to be in Zope versions after 2.7.0. I'm running 2.7.6, and the post indicates that it also happens in 2.7.4. The solution: Edit file /lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. There are two lines in the file that start with . Edit them as follows: Change first line to: Change second line to: Just to be after, I shut down Zope before I made the changes and restarted it after. Thanks for the help! RJ -----Original Message----- From: RJ Juneau [mailto:rj@maxxian.com] Sent: May 5, 2005 9:22 AM To: 'Charlie Clark' Cc: 'egenix-users@lists.egenix.com' Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 17:57:25 2005 From: charlie at egenix.com (Charlie Clark) Date: Sat Jan 14 08:02:32 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <20050505165725.3380.2@bepc.1115296715.fake> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Thu May 5 09:15:21 2005 From: charlie at egenix.com (Charlie Clark) Date: Sat Jan 14 08:02:32 2006 Subject: [Zope-DB] RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <000001c55185$41477730$6b00a8c0@fonacier.local> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________ Zope-DB mailing list Zope-DB@zope.org http://mail.zope.org/mailman/listinfo/zope-db From rj at maxxian.com Thu May 5 12:38:00 2005 From: rj at maxxian.com (RJ Juneau) Date: Sat Jan 14 08:02:32 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000001c55188$6b841eb0$6505a8c0@rjlaptop> I just double-checked. Zope-2.7.6-final. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 12:49:16 2005 From: rj at maxxian.com (RJ Juneau) Date: Sat Jan 14 08:02:32 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000501c55189$fe149ba0$6505a8c0@rjlaptop> Charlie, The fix has only been applied for 2.7.7, 2.8b2. The info is in the original bug report which is closed and can be found here: http://www.zope.org/Collectors/Zope/1745 RJ -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Fri May 6 11:50:09 2005 From: rj at maxxian.com (RJ Juneau) Date: Sat Jan 14 08:02:32 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC Message-ID: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Still on eval for the product. I cannot get a stable connection to Sybase via the iODBC drivers. - The Sybase ODBC connection - including a query - have been verified at the iODBC level. - The setup is already working well for ODBC connection to MySQL. Symptoms include: - If I click on "Open Connection", it still comes back with "Connection Closed" when I go to a ZSQL method - Using 'Connect on Demand' is not working either. - Clicking "Open Connection" gives me the following error: Connection string: DSN=lixbox_sybase; UID=sa; PWD=XXXXXXX Connection pool entry: 0 Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection rejected by data source', 7952) The odbc.ini definition for DSN "lixbox_sybase" is as follows: [lixbox_sybase] JetFix = No NoRowSetSizeLimit = No Description = Test connection to listbox Options = LIXBOX DSQUERY = SQLSERVER TDSHOST = lixbox TDSPORT = 5000 TDSVER = 5.0 SQLSERVER_CATALOG = N CURSOR_SENSITIVITY = LOW UserName = sa Password = XXXXXXXX ServerType = Sybase 10/11/12 Driver = /opt/openlink/lib/sql_mt_lt.so Database = pubs2 ReadOnly = no NoAutoCommit = No NoLoginBox = No FetchBufferSize = 60 Other relevant data: - Connecting via OpenLink's iODBC - Zope 2.7.6-final - Python 2.3.4 - Connection to Sybase has been successfully tested with iODBC, including issuing a query - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC connection RJ Juneau Chief Technology Officer Maxxian Integration Inc. 155 Westhampton Drive Thornhill, Ontario Canada L4J 7X2 E-mail: rj@maxxian.com Phone: +1 905 482 9429 Cell: +1 416 897 6682 Toll free: +1 866 758 9161 Fax: +1 647 722 2038 -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050506/aef33361/attachment-0005.htm From mal at egenix.com Fri May 6 18:27:37 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 14 08:02:32 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC In-Reply-To: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> References: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Message-ID: <427B8CE9.1010601@egenix.com> RJ Juneau wrote: > Still on eval for the product. > > I cannot get a stable connection to Sybase via the iODBC drivers. > > - The Sybase ODBC connection - including a query - have been verified at > the iODBC level. > - The setup is already working well for ODBC connection to MySQL. > > Symptoms include: > > - If I click on "Open Connection", it still comes back with "Connection > Closed" when I go to a ZSQL method > - Using 'Connect on Demand' is not working either. > - Clicking "Open Connection" gives me the following error: > > Connection string: DSN=lixbox_sybase; > UID=sa; > PWD=XXXXXXX Try writing the connection string on one line and without whitespace. ODBC drivers sometimes have problems with this. > Connection pool entry: 0 > Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection > rejected by data source', 7952) This is a generic error that relates to authentication or firewall problems. It is possible that turning on ODBC tracing the ODBC manager will give more clues as to the real cause of the problem. > The odbc.ini definition for DSN "lixbox_sybase" is as follows: > > [lixbox_sybase] > JetFix = No > NoRowSetSizeLimit = No > Description = Test connection to listbox > Options = LIXBOX > DSQUERY = SQLSERVER > TDSHOST = lixbox > TDSPORT = 5000 > TDSVER = 5.0 > SQLSERVER_CATALOG = N > CURSOR_SENSITIVITY = LOW > UserName = sa > Password = XXXXXXXX > ServerType = Sybase 10/11/12 > Driver = /opt/openlink/lib/sql_mt_lt.so > Database = pubs2 > ReadOnly = no > NoAutoCommit = No > NoLoginBox = No > FetchBufferSize = 60 > > > Other relevant data: > - Connecting via OpenLink's iODBC > - Zope 2.7.6-final > - Python 2.3.4 > - Connection to Sybase has been successfully tested with iODBC, > including issuing a query > - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC > connection > > > > RJ Juneau > Chief Technology Officer > Maxxian Integration Inc. > 155 Westhampton Drive > Thornhill, Ontario > Canada L4J 7X2 > E-mail: rj@maxxian.com > Phone: +1 905 482 9429 > Cell: +1 416 897 6682 > Toll free: +1 866 758 9161 > Fax: +1 647 722 2038 > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 06 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From calisp at gmail.com Sun May 15 23:49:03 2005 From: calisp at gmail.com (calisp@gmail.com) Date: Sat Jan 14 08:02:32 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK Message-ID: Hi, I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the following error... 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the last phase of a two-phase commit. This shouldn't happen. Traceback (most recent call last): File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one jar.tpc_finish(self) File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish try: self._finish() File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could not perform COMMIT or ROLLBACK', 1023) What could be causing this? Can I get the mxODBCZopeDA source from somewhere? It would make debugging this much easier. Thanks, Calisp. From mal at egenix.com Mon May 16 13:52:12 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 14 08:02:32 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK In-Reply-To: References: Message-ID: <42887B5C.4010109@egenix.com> calisp@gmail.com wrote: > Hi, > > I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with > unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the > following error... > > 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the > last phase of a two-phase commit. This shouldn't happen. > Traceback (most recent call last): > File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one > jar.tpc_finish(self) > File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish > try: self._finish() > File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish > File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler > ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could > not perform COMMIT or ROLLBACK', 1023) You should have a look at the database logs to see what prevented the commit from being completed. > What could be causing this? Hard to say: mxODBCZopeDA is trying to commit the transaction, but the driver or database failed to complete the request. The above error was generated by the ODBC driver. This could be network or DNS problems, or be related to a bug in FreeTDS (which is getting more stable with every new release, but should still be considered beta quality software at the moment). > Can I get the mxODBCZopeDA source from > somewhere? It would make debugging this much easier. Getting the source is not an option and won't help much either since the source of the problem is not mxODBCZopeDA. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 16 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Sun May 1 21:29:25 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 14 12:00:55 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <427259F3.4090806@egenix.com> References: <20050427130906.52878.qmail@web30008.mail.mud.yahoo.com> <427259F3.4090806@egenix.com> Message-ID: <42752005.7080904@egenix.com> M.-A. Lemburg wrote: > David Rushby wrote: > >> --- "M.-A. Lemburg" wrote: >> >>> Are you using the standard mxDateTime build or one >>> with WANT_SUBCLASSABLE_TYPES defined... >> >> >> >> Presumably "the standard", since I just built with 'py24d setup.py >> build', making no attempt to enable special directives. >> >> >>> ... (mxDateTime_Deallocate is only used by the latter)? >> >> >> >> That's true in 2.1.0-2005-04-15, but not in 2.1.0b5. >> >> >>> In any case, please try our latest snapshot: >>> >>> >> >> http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-04-15.zip >> >>> to see if that makes any difference. >> >> >> >> I can't build it out of the box: > > > Hmm, looks like distutils' sdist command doesn't like our new > repository layout which uses symlinks (after we've switched to > subversion). > > We'll have to debug distutils first, I guess :-( Ok, we've found the problem and fixed it. Here's the new release (which does build out of the box at least on our boxes ;-): http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 01 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From davidrushby at yahoo.com Mon May 2 15:49:53 2005 From: davidrushby at yahoo.com (David Rushby) Date: Sat Jan 14 12:00:55 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Ok, we've found the problem and fixed it. Here's the new > release (which does build out of the box at least on our > boxes ;-): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip It does build now, but: py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" still behaves as it did when I submitted my original message: Fatal Python error: UNREF invalid object Aborted This is the same debug build of Python 2.4.1 that I was previously using, running the same configuration (CentOS Linux 4.0/i386, everything compiled with GCC 3.4.3). Have you examined my original claim as to the cause of the bug? __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 10:21:55 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 14 12:00:55 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> References: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> Message-ID: <42772693.8050306@egenix.com> David Rushby wrote: > --- "M.-A. Lemburg" wrote: > >>Ok, we've found the problem and fixed it. Here's the new >>release (which does build out of the box at least on our >>boxes ;-): >> >> > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip > > It does build now, but: > py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" > still behaves as it did when I submitted my original message: > Fatal Python error: UNREF invalid object > Aborted > > This is the same debug build of Python 2.4.1 that I was previously > using, running the same configuration (CentOS Linux 4.0/i386, > everything compiled with GCC 3.4.3). > > Have you examined my original claim as to the cause of the bug? No. We haven't had time for looking into it. I'm not sure whether your analysis of the problem is correct: if you don't define WANT_SUBCLASSABLE_TYPES, the API mxDateTime_Deallocate() is neither defined nor used. Furthermore, PyObject_Del() is only called by mxDateTime_Free() if you have explicitely edited mxDateTime.c to disabled the free list #defines. In a standard build, PyObject_Del() is only called at module finalization time. Note that the reason we call mxDateTime_Free() in the constructor is that we don't want the destructor of the object to be called. Py_DECREF() would call the destructor (mxDateTime_Deallocate). It is possible that the debug code in Python complains about the refcount in the object not being 0 at the time the object is finalized (module finalization time), but I don't see any such checks in PyObject_Free() (which is what PyObject_Del() maps to). Again, all of this does not happen in regular non-debug Python builds. Please be aware that we don't support debug builds, so fixing the problem (if there is one - gcc has some serious optimization problems on some combinations of platform and version) will take a while. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 09:27:37 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Sat Jan 14 12:00:55 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 Message-ID: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Hi all- I am trying to build the mx-base package, v.2.0.6. This will be used with postgresql 7.3.9, psycopg 1.1.18, and Roundup 0.8.2. RHEL 3.0 Python 2.3 egenix-mx-base-2.0.6.tar.gz I performed a: /usr/local/bin/python2.3 setup.py install Everything looks proper with the exeception of this series of warning statements: ----------------- gcc -pthread -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fno-strict-aliasing -fPIC -Imx/BeeBase/mxBeeBase -I/usr/local/incl ude/python2.3 -I/usr/local/include -c mx/BeeBase/mxBeeBase/btr.c -o build/temp.linux-i686-2.3/mx/BeeBase/mxBeeBase/mxBeeBa se/mx/BeeBase/mxBeeBase/btr.o mx/BeeBase/mxBeeBase/btr.c: In function `dumpBuf': mx/BeeBase/mxBeeBase/btr.c:249: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:250: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:255: warning: unsigned int format, long unsigned int arg (arg 4) mx/BeeBase/mxBeeBase/btr.c:256: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c: In function `_validateTree': mx/BeeBase/mxBeeBase/btr.c:330: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:337: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:339: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:349: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:351: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 3) creating build/lib.linux-i686-2.3/mx/BeeBase creating build/lib.linux-i686-2.3/mx/BeeBase/mxBeeBase -------------- Would someone be kind enough to let me know whether these messages were expected, and if not, how I might resolve these? Thanks! DC __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 22:06:33 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 14 12:00:55 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> References: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Message-ID: <4277CBB9.8020302@egenix.com> Dianne Chen wrote: > Hi all- > > I am trying to build the mx-base package, v.2.0.6. > This will be used with postgresql 7.3.9, psycopg > 1.1.18, and Roundup 0.8.2. > > RHEL 3.0 > Python 2.3 > egenix-mx-base-2.0.6.tar.gz > > I performed a: > > /usr/local/bin/python2.3 setup.py install > > Everything looks proper with the exeception of this > series of warning statements: > > ----------------- > ... > -------------- > > Would someone be kind enough to let me know whether > these messages were expected, and if not, how I might > resolve these? These warning can safely be ignored. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 13:41:14 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Sat Jan 14 12:00:55 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: 6667 Message-ID: <20050503194114.72091.qmail@web31414.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Dianne Chen wrote: > > Hi all- > > > > I am trying to build the mx-base package, v.2.0.6. > > This will be used with postgresql 7.3.9, psycopg > > 1.1.18, and Roundup 0.8.2. > > > > RHEL 3.0 > > Python 2.3 > > egenix-mx-base-2.0.6.tar.gz > > > > I performed a: > > > > /usr/local/bin/python2.3 setup.py install > > > > Everything looks proper with the exeception of > this > > series of warning statements: > > > > ----------------- > > ... > > -------------- > > > > Would someone be kind enough to let me know > whether > > these messages were expected, and if not, how I > might > > resolve these? > > These warning can safely be ignored. > > -- > Marc-Andre Lemburg > eGenix.com > Marc- Thank you very much for the reply. It helps greatly. With kind regards, DC __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From davidrushby at yahoo.com Tue May 3 17:18:46 2005 From: davidrushby at yahoo.com (David Rushby) Date: Sat Jan 14 12:00:55 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050503231846.35012.qmail@web30009.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > I'm not sure whether your analysis of the problem is correct... Indeed, my original analysis wasn't correct; I think this one is. The fatal error I'm complaining about only arises if the arguments to DateTime.DateTime are invalid, so that the object is deallocated in the onError block of mxDateTime_FromDateAndTime. If the object is created successfully, and later deallocated by Python's garbage collector, the fatal error doesn't arise. Here's my analysis of the problem: --- If the debugging directive Py_TRACE_REFS is enabled, as it is in my case, the Python interpreter maintains a doubly linked list of all Python objects (named refchain) via the _ob_next and _ob_prev pointers added to PyObject via _PyObject_HEAD_EXTRA. Each object is inserted into refchain by the _Py_AddToAllObjects call in _Py_NewReference, and removed from refchain by the _Py_ForgetReference call in _Py_Dealloc. _Py_ForgetReference performs an integrity check on the object being deallocated (op) to make sure that its neighbors in refchain recognize it. Specifically, _Py_ForgetReference verifies that the _ob_next pointer of the previous object in refchain (op->_ob_prev->_ob_next) points to op, and that the _ob_prev pointer of the next object in refchain (op->_ob_next->_ob_prev) points to op. If either of those conditions is false, the interpreter raises the fatal error I'm seeing. After mxDateTime_New pulls an mxDateTimeObject out of the free list, it calls _Py_NewReference on that object to transform it from a "conceptually deallocated" object to a "conceptually allocated" one. _Py_NewReference inserts the object into refchain. Later, when the object is being "conceptually deallocated", it should be removed from refchain with _Py_ForgetReference. The version of _Py_Dealloc that's active when Py_TRACE_REFS is enabled does this (_Py_Dealloc is the element of Py_DECREF that performs the actual destruction). _Py_Dealloc first calls _Py_ForgetReference to remove the object from refchain, then calls the object's destructor (op->ob_type->tp_dealloc). If WANT_SUBCLASSABLE_TYPES is not defined (it is not in my case), the destructor for mxDateTime_Type is mxDateTime_Free. So, if a DateTime object is deallocated normally, as a result of its reference count falling to zero, _Py_Dealloc is called on the object, which first removes it from refchain, then passes it to mxDateTime_Free. If a DateTime object is destroyed prematurely, as a result of invalid arguments to its destructor, the onError handler calls mxDateTime_Free, so the object is "conceptually deallocated" (placed in the free list), *but* the object is not removed from refchain. So if a refchain-membership-integrity-check is performed on the object in question or one of its immediate neighbors in refchain, that integrity check fails, leading to the fatal error. --- The solution is to 'Py_DECREF(...)' the object in the onError handler of its constructor, instead of passing the object directly to mxDateTime_Free. That change solves two problems: 1) It causes _Py_Dealloc to execute, which in turn executes _Py_ForgetReference, so the object is removed from refchain, as it should be. 2) At present, objects that are created successfully and later deallocated by normal reference count mechanics have a reference count of 0 when they enter the free list, whereas objects whose constructors abort their creation due to invalid arguments have a reference count of 1 when they enter the free list. Although AFAIK this doesn't cause an actual execution problem (because the object's reference count is *explicitly set to 1* rather than *incremented by 1* when the object is later "conceptually allocated" by _Py_NewReference), it is likely to confuse future maintainers and thereby lead to the introduction of an actual execution problem. I assume that if you agree that this is a reasonable solution, you'll want to apply the change not only to mxDateTime_FromDateAndTime, but to all similar constructors in mxDateTime.c. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From rj at maxxian.com Thu May 5 01:57:40 2005 From: rj at maxxian.com (RJ Juneau) Date: Sat Jan 14 12:00:55 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c5512e$f72798c0$6505a8c0@rjlaptop> I'm on the 30 day evaluation for mxodbc_zope_da. I'm getting the following error when I submit some queries: Error Type: KeyError Error Value: 'query' I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 with UCS4. The error seems to be caused by multiple rows being returned. I did see an earlier posting with the same error message. The response suggested a template error, but this is clearly not the case here. The additional evidence I've gathered so far: - I'm running the test directly from the ZSQL method, so there's no template involved. - If I use the same query with an additional "where" clause to ensure that only one row is returned, it works - If I use a value in the 'where' clause with no rows returned, it works - The same ZSQL query is being used on a Windows machine running Zope and the free ZODBC module without a problem - The query has been verified directly in mysql-client-browser Other info: - The database is MySQL 4.1.10A-0 - iODBC is the DB driver RJ Juneau -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050505/68d278bf/attachment-0006.htm From mal at egenix.com Thu May 5 12:37:43 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 14 12:00:55 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c5512e$f72798c0$6505a8c0@rjlaptop> References: <000301c5512e$f72798c0$6505a8c0@rjlaptop> Message-ID: <4279E967.6010904@egenix.com> RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 > with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 09:37:42 2005 From: rj at maxxian.com (RJ Juneau) Date: Sat Jan 14 12:00:55 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000101c5516f$3b96de90$6505a8c0@rjlaptop> More interesting info on the problem: If I execute the query directly in the "test" window of the base eGenix mxODBC Database Connection window, it works fine and returns the 20 lines expected. That could point to a problem in the rendering, which seems to be where the traceback ends. Note that within the same Zope system I also have an ODBC connection to a Sybase database, and I have successfully tested multi-line ZSQL queries there. This is the traceback: Time 2005/05/05 07:55:15.294 GMT-4 Exception Type KeyError Exception Value 'query' Traceback (innermost last): Module ZPublisher.Publish, line 101, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 39, in call_object Module Shared.DC.ZRDB.DA, line 337, in manage_test Module DocumentTemplate.DT_String, line 474, in __call__ Module DocumentTemplate.DT_In, line 602, in renderwb Module DocumentTemplate.DT_Var, line 219, in render KeyError: 'query' I don't think the following is an issue, but I'll include it for completeness.I am also getting the following iODBC warnings and errors in the Zope console log, which are related to the ODBC parameters being passed by iODBC. Note that these errors also appear for all of the successful queries. [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (Setup). [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (UsageCount). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Timeout). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Reuse). As for the ZSQL snippet from the template... Since there's no template involved yet (I'm still testing directly from the ZSQL method), I assume you mean the SQL code? select h.host_name, s.system_name, s.system_handle, count(*) from terminal t, system_map s, host h where t.system_index = s.system_index and s.host_index = h.host_index group by s.system_name order by h.host_name Nothing complicated here. There are no parameters passed to the query. RJ -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: May 5, 2005 5:38 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: Re: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is > 2.3.4 with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ---------------------------------------------------------------------- > -- > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 16:00:32 2005 From: charlie at egenix.com (Charlie Clark) Date: Sat Jan 14 12:00:55 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000101c5516f$3b96de90$6505a8c0@rjlaptop> References: <000101c5516f$3b96de90$6505a8c0@rjlaptop> Message-ID: <20050505150032.644.1@bepc.1115296715.fake> On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base eGenix > mxODBC Database Connection window, it works fine and returns the 20 > lines expected. That could point to a problem in the rendering, which > seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection to > a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 10:22:17 2005 From: rj at maxxian.com (RJ Juneau) Date: Sat Jan 14 12:00:55 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505150032.644.1@bepc.1115296715.fake> Message-ID: <000201c55175$75bcad10$6505a8c0@rjlaptop> At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 11:47:14 2005 From: rj at maxxian.com (RJ Juneau) Date: Sat Jan 14 12:00:55 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c55181$549be0e0$6505a8c0@rjlaptop> Charlie, I found a fix. Here it is in case anyone else runs into this. You were correct - the problem is in another part of Zope. Based on your feedback, I did a bit more searching and found something here: http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. html The problem appears to be in Zope versions after 2.7.0. I'm running 2.7.6, and the post indicates that it also happens in 2.7.4. The solution: Edit file /lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. There are two lines in the file that start with . Edit them as follows: Change first line to: Change second line to: Just to be after, I shut down Zope before I made the changes and restarted it after. Thanks for the help! RJ -----Original Message----- From: RJ Juneau [mailto:rj@maxxian.com] Sent: May 5, 2005 9:22 AM To: 'Charlie Clark' Cc: 'egenix-users@lists.egenix.com' Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 17:57:25 2005 From: charlie at egenix.com (Charlie Clark) Date: Sat Jan 14 12:00:55 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <20050505165725.3380.2@bepc.1115296715.fake> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Thu May 5 09:15:21 2005 From: charlie at egenix.com (Charlie Clark) Date: Sat Jan 14 12:00:55 2006 Subject: [Zope-DB] RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <000001c55185$41477730$6b00a8c0@fonacier.local> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________ Zope-DB mailing list Zope-DB@zope.org http://mail.zope.org/mailman/listinfo/zope-db From rj at maxxian.com Thu May 5 12:38:00 2005 From: rj at maxxian.com (RJ Juneau) Date: Sat Jan 14 12:00:55 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000001c55188$6b841eb0$6505a8c0@rjlaptop> I just double-checked. Zope-2.7.6-final. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 12:49:16 2005 From: rj at maxxian.com (RJ Juneau) Date: Sat Jan 14 12:00:55 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000501c55189$fe149ba0$6505a8c0@rjlaptop> Charlie, The fix has only been applied for 2.7.7, 2.8b2. The info is in the original bug report which is closed and can be found here: http://www.zope.org/Collectors/Zope/1745 RJ -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Fri May 6 11:50:09 2005 From: rj at maxxian.com (RJ Juneau) Date: Sat Jan 14 12:00:55 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC Message-ID: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Still on eval for the product. I cannot get a stable connection to Sybase via the iODBC drivers. - The Sybase ODBC connection - including a query - have been verified at the iODBC level. - The setup is already working well for ODBC connection to MySQL. Symptoms include: - If I click on "Open Connection", it still comes back with "Connection Closed" when I go to a ZSQL method - Using 'Connect on Demand' is not working either. - Clicking "Open Connection" gives me the following error: Connection string: DSN=lixbox_sybase; UID=sa; PWD=XXXXXXX Connection pool entry: 0 Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection rejected by data source', 7952) The odbc.ini definition for DSN "lixbox_sybase" is as follows: [lixbox_sybase] JetFix = No NoRowSetSizeLimit = No Description = Test connection to listbox Options = LIXBOX DSQUERY = SQLSERVER TDSHOST = lixbox TDSPORT = 5000 TDSVER = 5.0 SQLSERVER_CATALOG = N CURSOR_SENSITIVITY = LOW UserName = sa Password = XXXXXXXX ServerType = Sybase 10/11/12 Driver = /opt/openlink/lib/sql_mt_lt.so Database = pubs2 ReadOnly = no NoAutoCommit = No NoLoginBox = No FetchBufferSize = 60 Other relevant data: - Connecting via OpenLink's iODBC - Zope 2.7.6-final - Python 2.3.4 - Connection to Sybase has been successfully tested with iODBC, including issuing a query - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC connection RJ Juneau Chief Technology Officer Maxxian Integration Inc. 155 Westhampton Drive Thornhill, Ontario Canada L4J 7X2 E-mail: rj@maxxian.com Phone: +1 905 482 9429 Cell: +1 416 897 6682 Toll free: +1 866 758 9161 Fax: +1 647 722 2038 -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050506/aef33361/attachment-0006.htm From mal at egenix.com Fri May 6 18:27:37 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 14 12:00:55 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC In-Reply-To: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> References: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Message-ID: <427B8CE9.1010601@egenix.com> RJ Juneau wrote: > Still on eval for the product. > > I cannot get a stable connection to Sybase via the iODBC drivers. > > - The Sybase ODBC connection - including a query - have been verified at > the iODBC level. > - The setup is already working well for ODBC connection to MySQL. > > Symptoms include: > > - If I click on "Open Connection", it still comes back with "Connection > Closed" when I go to a ZSQL method > - Using 'Connect on Demand' is not working either. > - Clicking "Open Connection" gives me the following error: > > Connection string: DSN=lixbox_sybase; > UID=sa; > PWD=XXXXXXX Try writing the connection string on one line and without whitespace. ODBC drivers sometimes have problems with this. > Connection pool entry: 0 > Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection > rejected by data source', 7952) This is a generic error that relates to authentication or firewall problems. It is possible that turning on ODBC tracing the ODBC manager will give more clues as to the real cause of the problem. > The odbc.ini definition for DSN "lixbox_sybase" is as follows: > > [lixbox_sybase] > JetFix = No > NoRowSetSizeLimit = No > Description = Test connection to listbox > Options = LIXBOX > DSQUERY = SQLSERVER > TDSHOST = lixbox > TDSPORT = 5000 > TDSVER = 5.0 > SQLSERVER_CATALOG = N > CURSOR_SENSITIVITY = LOW > UserName = sa > Password = XXXXXXXX > ServerType = Sybase 10/11/12 > Driver = /opt/openlink/lib/sql_mt_lt.so > Database = pubs2 > ReadOnly = no > NoAutoCommit = No > NoLoginBox = No > FetchBufferSize = 60 > > > Other relevant data: > - Connecting via OpenLink's iODBC > - Zope 2.7.6-final > - Python 2.3.4 > - Connection to Sybase has been successfully tested with iODBC, > including issuing a query > - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC > connection > > > > RJ Juneau > Chief Technology Officer > Maxxian Integration Inc. > 155 Westhampton Drive > Thornhill, Ontario > Canada L4J 7X2 > E-mail: rj@maxxian.com > Phone: +1 905 482 9429 > Cell: +1 416 897 6682 > Toll free: +1 866 758 9161 > Fax: +1 647 722 2038 > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 06 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From calisp at gmail.com Sun May 15 23:49:03 2005 From: calisp at gmail.com (calisp@gmail.com) Date: Sat Jan 14 12:00:55 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK Message-ID: Hi, I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the following error... 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the last phase of a two-phase commit. This shouldn't happen. Traceback (most recent call last): File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one jar.tpc_finish(self) File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish try: self._finish() File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could not perform COMMIT or ROLLBACK', 1023) What could be causing this? Can I get the mxODBCZopeDA source from somewhere? It would make debugging this much easier. Thanks, Calisp. From mal at egenix.com Mon May 16 13:52:12 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 14 12:00:55 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK In-Reply-To: References: Message-ID: <42887B5C.4010109@egenix.com> calisp@gmail.com wrote: > Hi, > > I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with > unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the > following error... > > 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the > last phase of a two-phase commit. This shouldn't happen. > Traceback (most recent call last): > File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one > jar.tpc_finish(self) > File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish > try: self._finish() > File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish > File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler > ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could > not perform COMMIT or ROLLBACK', 1023) You should have a look at the database logs to see what prevented the commit from being completed. > What could be causing this? Hard to say: mxODBCZopeDA is trying to commit the transaction, but the driver or database failed to complete the request. The above error was generated by the ODBC driver. This could be network or DNS problems, or be related to a bug in FreeTDS (which is getting more stable with every new release, but should still be considered beta quality software at the moment). > Can I get the mxODBCZopeDA source from > somewhere? It would make debugging this much easier. Getting the source is not an option and won't help much either since the source of the problem is not mxODBCZopeDA. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 16 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Sun May 1 21:29:25 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 14 16:00:52 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <427259F3.4090806@egenix.com> References: <20050427130906.52878.qmail@web30008.mail.mud.yahoo.com> <427259F3.4090806@egenix.com> Message-ID: <42752005.7080904@egenix.com> M.-A. Lemburg wrote: > David Rushby wrote: > >> --- "M.-A. Lemburg" wrote: >> >>> Are you using the standard mxDateTime build or one >>> with WANT_SUBCLASSABLE_TYPES defined... >> >> >> >> Presumably "the standard", since I just built with 'py24d setup.py >> build', making no attempt to enable special directives. >> >> >>> ... (mxDateTime_Deallocate is only used by the latter)? >> >> >> >> That's true in 2.1.0-2005-04-15, but not in 2.1.0b5. >> >> >>> In any case, please try our latest snapshot: >>> >>> >> >> http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-04-15.zip >> >>> to see if that makes any difference. >> >> >> >> I can't build it out of the box: > > > Hmm, looks like distutils' sdist command doesn't like our new > repository layout which uses symlinks (after we've switched to > subversion). > > We'll have to debug distutils first, I guess :-( Ok, we've found the problem and fixed it. Here's the new release (which does build out of the box at least on our boxes ;-): http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 01 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From davidrushby at yahoo.com Mon May 2 15:49:53 2005 From: davidrushby at yahoo.com (David Rushby) Date: Sat Jan 14 16:00:52 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Ok, we've found the problem and fixed it. Here's the new > release (which does build out of the box at least on our > boxes ;-): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip It does build now, but: py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" still behaves as it did when I submitted my original message: Fatal Python error: UNREF invalid object Aborted This is the same debug build of Python 2.4.1 that I was previously using, running the same configuration (CentOS Linux 4.0/i386, everything compiled with GCC 3.4.3). Have you examined my original claim as to the cause of the bug? __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 10:21:55 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 14 16:00:52 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> References: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> Message-ID: <42772693.8050306@egenix.com> David Rushby wrote: > --- "M.-A. Lemburg" wrote: > >>Ok, we've found the problem and fixed it. Here's the new >>release (which does build out of the box at least on our >>boxes ;-): >> >> > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip > > It does build now, but: > py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" > still behaves as it did when I submitted my original message: > Fatal Python error: UNREF invalid object > Aborted > > This is the same debug build of Python 2.4.1 that I was previously > using, running the same configuration (CentOS Linux 4.0/i386, > everything compiled with GCC 3.4.3). > > Have you examined my original claim as to the cause of the bug? No. We haven't had time for looking into it. I'm not sure whether your analysis of the problem is correct: if you don't define WANT_SUBCLASSABLE_TYPES, the API mxDateTime_Deallocate() is neither defined nor used. Furthermore, PyObject_Del() is only called by mxDateTime_Free() if you have explicitely edited mxDateTime.c to disabled the free list #defines. In a standard build, PyObject_Del() is only called at module finalization time. Note that the reason we call mxDateTime_Free() in the constructor is that we don't want the destructor of the object to be called. Py_DECREF() would call the destructor (mxDateTime_Deallocate). It is possible that the debug code in Python complains about the refcount in the object not being 0 at the time the object is finalized (module finalization time), but I don't see any such checks in PyObject_Free() (which is what PyObject_Del() maps to). Again, all of this does not happen in regular non-debug Python builds. Please be aware that we don't support debug builds, so fixing the problem (if there is one - gcc has some serious optimization problems on some combinations of platform and version) will take a while. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 09:27:37 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Sat Jan 14 16:00:52 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 Message-ID: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Hi all- I am trying to build the mx-base package, v.2.0.6. This will be used with postgresql 7.3.9, psycopg 1.1.18, and Roundup 0.8.2. RHEL 3.0 Python 2.3 egenix-mx-base-2.0.6.tar.gz I performed a: /usr/local/bin/python2.3 setup.py install Everything looks proper with the exeception of this series of warning statements: ----------------- gcc -pthread -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fno-strict-aliasing -fPIC -Imx/BeeBase/mxBeeBase -I/usr/local/incl ude/python2.3 -I/usr/local/include -c mx/BeeBase/mxBeeBase/btr.c -o build/temp.linux-i686-2.3/mx/BeeBase/mxBeeBase/mxBeeBa se/mx/BeeBase/mxBeeBase/btr.o mx/BeeBase/mxBeeBase/btr.c: In function `dumpBuf': mx/BeeBase/mxBeeBase/btr.c:249: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:250: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:255: warning: unsigned int format, long unsigned int arg (arg 4) mx/BeeBase/mxBeeBase/btr.c:256: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c: In function `_validateTree': mx/BeeBase/mxBeeBase/btr.c:330: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:337: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:339: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:349: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:351: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 3) creating build/lib.linux-i686-2.3/mx/BeeBase creating build/lib.linux-i686-2.3/mx/BeeBase/mxBeeBase -------------- Would someone be kind enough to let me know whether these messages were expected, and if not, how I might resolve these? Thanks! DC __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 22:06:33 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 14 16:00:52 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> References: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Message-ID: <4277CBB9.8020302@egenix.com> Dianne Chen wrote: > Hi all- > > I am trying to build the mx-base package, v.2.0.6. > This will be used with postgresql 7.3.9, psycopg > 1.1.18, and Roundup 0.8.2. > > RHEL 3.0 > Python 2.3 > egenix-mx-base-2.0.6.tar.gz > > I performed a: > > /usr/local/bin/python2.3 setup.py install > > Everything looks proper with the exeception of this > series of warning statements: > > ----------------- > ... > -------------- > > Would someone be kind enough to let me know whether > these messages were expected, and if not, how I might > resolve these? These warning can safely be ignored. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 13:41:14 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Sat Jan 14 16:00:52 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: 6667 Message-ID: <20050503194114.72091.qmail@web31414.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Dianne Chen wrote: > > Hi all- > > > > I am trying to build the mx-base package, v.2.0.6. > > This will be used with postgresql 7.3.9, psycopg > > 1.1.18, and Roundup 0.8.2. > > > > RHEL 3.0 > > Python 2.3 > > egenix-mx-base-2.0.6.tar.gz > > > > I performed a: > > > > /usr/local/bin/python2.3 setup.py install > > > > Everything looks proper with the exeception of > this > > series of warning statements: > > > > ----------------- > > ... > > -------------- > > > > Would someone be kind enough to let me know > whether > > these messages were expected, and if not, how I > might > > resolve these? > > These warning can safely be ignored. > > -- > Marc-Andre Lemburg > eGenix.com > Marc- Thank you very much for the reply. It helps greatly. With kind regards, DC __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From davidrushby at yahoo.com Tue May 3 17:18:46 2005 From: davidrushby at yahoo.com (David Rushby) Date: Sat Jan 14 16:00:52 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050503231846.35012.qmail@web30009.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > I'm not sure whether your analysis of the problem is correct... Indeed, my original analysis wasn't correct; I think this one is. The fatal error I'm complaining about only arises if the arguments to DateTime.DateTime are invalid, so that the object is deallocated in the onError block of mxDateTime_FromDateAndTime. If the object is created successfully, and later deallocated by Python's garbage collector, the fatal error doesn't arise. Here's my analysis of the problem: --- If the debugging directive Py_TRACE_REFS is enabled, as it is in my case, the Python interpreter maintains a doubly linked list of all Python objects (named refchain) via the _ob_next and _ob_prev pointers added to PyObject via _PyObject_HEAD_EXTRA. Each object is inserted into refchain by the _Py_AddToAllObjects call in _Py_NewReference, and removed from refchain by the _Py_ForgetReference call in _Py_Dealloc. _Py_ForgetReference performs an integrity check on the object being deallocated (op) to make sure that its neighbors in refchain recognize it. Specifically, _Py_ForgetReference verifies that the _ob_next pointer of the previous object in refchain (op->_ob_prev->_ob_next) points to op, and that the _ob_prev pointer of the next object in refchain (op->_ob_next->_ob_prev) points to op. If either of those conditions is false, the interpreter raises the fatal error I'm seeing. After mxDateTime_New pulls an mxDateTimeObject out of the free list, it calls _Py_NewReference on that object to transform it from a "conceptually deallocated" object to a "conceptually allocated" one. _Py_NewReference inserts the object into refchain. Later, when the object is being "conceptually deallocated", it should be removed from refchain with _Py_ForgetReference. The version of _Py_Dealloc that's active when Py_TRACE_REFS is enabled does this (_Py_Dealloc is the element of Py_DECREF that performs the actual destruction). _Py_Dealloc first calls _Py_ForgetReference to remove the object from refchain, then calls the object's destructor (op->ob_type->tp_dealloc). If WANT_SUBCLASSABLE_TYPES is not defined (it is not in my case), the destructor for mxDateTime_Type is mxDateTime_Free. So, if a DateTime object is deallocated normally, as a result of its reference count falling to zero, _Py_Dealloc is called on the object, which first removes it from refchain, then passes it to mxDateTime_Free. If a DateTime object is destroyed prematurely, as a result of invalid arguments to its destructor, the onError handler calls mxDateTime_Free, so the object is "conceptually deallocated" (placed in the free list), *but* the object is not removed from refchain. So if a refchain-membership-integrity-check is performed on the object in question or one of its immediate neighbors in refchain, that integrity check fails, leading to the fatal error. --- The solution is to 'Py_DECREF(...)' the object in the onError handler of its constructor, instead of passing the object directly to mxDateTime_Free. That change solves two problems: 1) It causes _Py_Dealloc to execute, which in turn executes _Py_ForgetReference, so the object is removed from refchain, as it should be. 2) At present, objects that are created successfully and later deallocated by normal reference count mechanics have a reference count of 0 when they enter the free list, whereas objects whose constructors abort their creation due to invalid arguments have a reference count of 1 when they enter the free list. Although AFAIK this doesn't cause an actual execution problem (because the object's reference count is *explicitly set to 1* rather than *incremented by 1* when the object is later "conceptually allocated" by _Py_NewReference), it is likely to confuse future maintainers and thereby lead to the introduction of an actual execution problem. I assume that if you agree that this is a reasonable solution, you'll want to apply the change not only to mxDateTime_FromDateAndTime, but to all similar constructors in mxDateTime.c. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From rj at maxxian.com Thu May 5 01:57:40 2005 From: rj at maxxian.com (RJ Juneau) Date: Sat Jan 14 16:00:52 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c5512e$f72798c0$6505a8c0@rjlaptop> I'm on the 30 day evaluation for mxodbc_zope_da. I'm getting the following error when I submit some queries: Error Type: KeyError Error Value: 'query' I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 with UCS4. The error seems to be caused by multiple rows being returned. I did see an earlier posting with the same error message. The response suggested a template error, but this is clearly not the case here. The additional evidence I've gathered so far: - I'm running the test directly from the ZSQL method, so there's no template involved. - If I use the same query with an additional "where" clause to ensure that only one row is returned, it works - If I use a value in the 'where' clause with no rows returned, it works - The same ZSQL query is being used on a Windows machine running Zope and the free ZODBC module without a problem - The query has been verified directly in mysql-client-browser Other info: - The database is MySQL 4.1.10A-0 - iODBC is the DB driver RJ Juneau -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050505/68d278bf/attachment-0007.htm From mal at egenix.com Thu May 5 12:37:43 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 14 16:00:52 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c5512e$f72798c0$6505a8c0@rjlaptop> References: <000301c5512e$f72798c0$6505a8c0@rjlaptop> Message-ID: <4279E967.6010904@egenix.com> RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 > with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 09:37:42 2005 From: rj at maxxian.com (RJ Juneau) Date: Sat Jan 14 16:00:52 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000101c5516f$3b96de90$6505a8c0@rjlaptop> More interesting info on the problem: If I execute the query directly in the "test" window of the base eGenix mxODBC Database Connection window, it works fine and returns the 20 lines expected. That could point to a problem in the rendering, which seems to be where the traceback ends. Note that within the same Zope system I also have an ODBC connection to a Sybase database, and I have successfully tested multi-line ZSQL queries there. This is the traceback: Time 2005/05/05 07:55:15.294 GMT-4 Exception Type KeyError Exception Value 'query' Traceback (innermost last): Module ZPublisher.Publish, line 101, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 39, in call_object Module Shared.DC.ZRDB.DA, line 337, in manage_test Module DocumentTemplate.DT_String, line 474, in __call__ Module DocumentTemplate.DT_In, line 602, in renderwb Module DocumentTemplate.DT_Var, line 219, in render KeyError: 'query' I don't think the following is an issue, but I'll include it for completeness.I am also getting the following iODBC warnings and errors in the Zope console log, which are related to the ODBC parameters being passed by iODBC. Note that these errors also appear for all of the successful queries. [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (Setup). [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (UsageCount). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Timeout). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Reuse). As for the ZSQL snippet from the template... Since there's no template involved yet (I'm still testing directly from the ZSQL method), I assume you mean the SQL code? select h.host_name, s.system_name, s.system_handle, count(*) from terminal t, system_map s, host h where t.system_index = s.system_index and s.host_index = h.host_index group by s.system_name order by h.host_name Nothing complicated here. There are no parameters passed to the query. RJ -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: May 5, 2005 5:38 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: Re: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is > 2.3.4 with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ---------------------------------------------------------------------- > -- > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 16:00:32 2005 From: charlie at egenix.com (Charlie Clark) Date: Sat Jan 14 16:00:52 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000101c5516f$3b96de90$6505a8c0@rjlaptop> References: <000101c5516f$3b96de90$6505a8c0@rjlaptop> Message-ID: <20050505150032.644.1@bepc.1115296715.fake> On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base eGenix > mxODBC Database Connection window, it works fine and returns the 20 > lines expected. That could point to a problem in the rendering, which > seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection to > a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 10:22:17 2005 From: rj at maxxian.com (RJ Juneau) Date: Sat Jan 14 16:00:52 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505150032.644.1@bepc.1115296715.fake> Message-ID: <000201c55175$75bcad10$6505a8c0@rjlaptop> At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 11:47:14 2005 From: rj at maxxian.com (RJ Juneau) Date: Sat Jan 14 16:00:52 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c55181$549be0e0$6505a8c0@rjlaptop> Charlie, I found a fix. Here it is in case anyone else runs into this. You were correct - the problem is in another part of Zope. Based on your feedback, I did a bit more searching and found something here: http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. html The problem appears to be in Zope versions after 2.7.0. I'm running 2.7.6, and the post indicates that it also happens in 2.7.4. The solution: Edit file /lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. There are two lines in the file that start with . Edit them as follows: Change first line to: Change second line to: Just to be after, I shut down Zope before I made the changes and restarted it after. Thanks for the help! RJ -----Original Message----- From: RJ Juneau [mailto:rj@maxxian.com] Sent: May 5, 2005 9:22 AM To: 'Charlie Clark' Cc: 'egenix-users@lists.egenix.com' Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 17:57:25 2005 From: charlie at egenix.com (Charlie Clark) Date: Sat Jan 14 16:00:52 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <20050505165725.3380.2@bepc.1115296715.fake> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Thu May 5 09:15:21 2005 From: charlie at egenix.com (Charlie Clark) Date: Sat Jan 14 16:00:52 2006 Subject: [Zope-DB] RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <000001c55185$41477730$6b00a8c0@fonacier.local> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________ Zope-DB mailing list Zope-DB@zope.org http://mail.zope.org/mailman/listinfo/zope-db From rj at maxxian.com Thu May 5 12:38:00 2005 From: rj at maxxian.com (RJ Juneau) Date: Sat Jan 14 16:00:52 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000001c55188$6b841eb0$6505a8c0@rjlaptop> I just double-checked. Zope-2.7.6-final. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 12:49:16 2005 From: rj at maxxian.com (RJ Juneau) Date: Sat Jan 14 16:00:52 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000501c55189$fe149ba0$6505a8c0@rjlaptop> Charlie, The fix has only been applied for 2.7.7, 2.8b2. The info is in the original bug report which is closed and can be found here: http://www.zope.org/Collectors/Zope/1745 RJ -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Fri May 6 11:50:09 2005 From: rj at maxxian.com (RJ Juneau) Date: Sat Jan 14 16:00:52 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC Message-ID: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Still on eval for the product. I cannot get a stable connection to Sybase via the iODBC drivers. - The Sybase ODBC connection - including a query - have been verified at the iODBC level. - The setup is already working well for ODBC connection to MySQL. Symptoms include: - If I click on "Open Connection", it still comes back with "Connection Closed" when I go to a ZSQL method - Using 'Connect on Demand' is not working either. - Clicking "Open Connection" gives me the following error: Connection string: DSN=lixbox_sybase; UID=sa; PWD=XXXXXXX Connection pool entry: 0 Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection rejected by data source', 7952) The odbc.ini definition for DSN "lixbox_sybase" is as follows: [lixbox_sybase] JetFix = No NoRowSetSizeLimit = No Description = Test connection to listbox Options = LIXBOX DSQUERY = SQLSERVER TDSHOST = lixbox TDSPORT = 5000 TDSVER = 5.0 SQLSERVER_CATALOG = N CURSOR_SENSITIVITY = LOW UserName = sa Password = XXXXXXXX ServerType = Sybase 10/11/12 Driver = /opt/openlink/lib/sql_mt_lt.so Database = pubs2 ReadOnly = no NoAutoCommit = No NoLoginBox = No FetchBufferSize = 60 Other relevant data: - Connecting via OpenLink's iODBC - Zope 2.7.6-final - Python 2.3.4 - Connection to Sybase has been successfully tested with iODBC, including issuing a query - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC connection RJ Juneau Chief Technology Officer Maxxian Integration Inc. 155 Westhampton Drive Thornhill, Ontario Canada L4J 7X2 E-mail: rj@maxxian.com Phone: +1 905 482 9429 Cell: +1 416 897 6682 Toll free: +1 866 758 9161 Fax: +1 647 722 2038 -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050506/aef33361/attachment-0007.htm From mal at egenix.com Fri May 6 18:27:37 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 14 16:00:52 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC In-Reply-To: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> References: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Message-ID: <427B8CE9.1010601@egenix.com> RJ Juneau wrote: > Still on eval for the product. > > I cannot get a stable connection to Sybase via the iODBC drivers. > > - The Sybase ODBC connection - including a query - have been verified at > the iODBC level. > - The setup is already working well for ODBC connection to MySQL. > > Symptoms include: > > - If I click on "Open Connection", it still comes back with "Connection > Closed" when I go to a ZSQL method > - Using 'Connect on Demand' is not working either. > - Clicking "Open Connection" gives me the following error: > > Connection string: DSN=lixbox_sybase; > UID=sa; > PWD=XXXXXXX Try writing the connection string on one line and without whitespace. ODBC drivers sometimes have problems with this. > Connection pool entry: 0 > Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection > rejected by data source', 7952) This is a generic error that relates to authentication or firewall problems. It is possible that turning on ODBC tracing the ODBC manager will give more clues as to the real cause of the problem. > The odbc.ini definition for DSN "lixbox_sybase" is as follows: > > [lixbox_sybase] > JetFix = No > NoRowSetSizeLimit = No > Description = Test connection to listbox > Options = LIXBOX > DSQUERY = SQLSERVER > TDSHOST = lixbox > TDSPORT = 5000 > TDSVER = 5.0 > SQLSERVER_CATALOG = N > CURSOR_SENSITIVITY = LOW > UserName = sa > Password = XXXXXXXX > ServerType = Sybase 10/11/12 > Driver = /opt/openlink/lib/sql_mt_lt.so > Database = pubs2 > ReadOnly = no > NoAutoCommit = No > NoLoginBox = No > FetchBufferSize = 60 > > > Other relevant data: > - Connecting via OpenLink's iODBC > - Zope 2.7.6-final > - Python 2.3.4 > - Connection to Sybase has been successfully tested with iODBC, > including issuing a query > - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC > connection > > > > RJ Juneau > Chief Technology Officer > Maxxian Integration Inc. > 155 Westhampton Drive > Thornhill, Ontario > Canada L4J 7X2 > E-mail: rj@maxxian.com > Phone: +1 905 482 9429 > Cell: +1 416 897 6682 > Toll free: +1 866 758 9161 > Fax: +1 647 722 2038 > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 06 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From calisp at gmail.com Sun May 15 23:49:03 2005 From: calisp at gmail.com (calisp@gmail.com) Date: Sat Jan 14 16:00:52 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK Message-ID: Hi, I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the following error... 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the last phase of a two-phase commit. This shouldn't happen. Traceback (most recent call last): File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one jar.tpc_finish(self) File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish try: self._finish() File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could not perform COMMIT or ROLLBACK', 1023) What could be causing this? Can I get the mxODBCZopeDA source from somewhere? It would make debugging this much easier. Thanks, Calisp. From mal at egenix.com Mon May 16 13:52:12 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 14 16:00:52 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK In-Reply-To: References: Message-ID: <42887B5C.4010109@egenix.com> calisp@gmail.com wrote: > Hi, > > I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with > unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the > following error... > > 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the > last phase of a two-phase commit. This shouldn't happen. > Traceback (most recent call last): > File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one > jar.tpc_finish(self) > File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish > try: self._finish() > File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish > File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler > ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could > not perform COMMIT or ROLLBACK', 1023) You should have a look at the database logs to see what prevented the commit from being completed. > What could be causing this? Hard to say: mxODBCZopeDA is trying to commit the transaction, but the driver or database failed to complete the request. The above error was generated by the ODBC driver. This could be network or DNS problems, or be related to a bug in FreeTDS (which is getting more stable with every new release, but should still be considered beta quality software at the moment). > Can I get the mxODBCZopeDA source from > somewhere? It would make debugging this much easier. Getting the source is not an option and won't help much either since the source of the problem is not mxODBCZopeDA. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 16 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Sun May 1 21:29:25 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 14 20:00:52 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <427259F3.4090806@egenix.com> References: <20050427130906.52878.qmail@web30008.mail.mud.yahoo.com> <427259F3.4090806@egenix.com> Message-ID: <42752005.7080904@egenix.com> M.-A. Lemburg wrote: > David Rushby wrote: > >> --- "M.-A. Lemburg" wrote: >> >>> Are you using the standard mxDateTime build or one >>> with WANT_SUBCLASSABLE_TYPES defined... >> >> >> >> Presumably "the standard", since I just built with 'py24d setup.py >> build', making no attempt to enable special directives. >> >> >>> ... (mxDateTime_Deallocate is only used by the latter)? >> >> >> >> That's true in 2.1.0-2005-04-15, but not in 2.1.0b5. >> >> >>> In any case, please try our latest snapshot: >>> >>> >> >> http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-04-15.zip >> >>> to see if that makes any difference. >> >> >> >> I can't build it out of the box: > > > Hmm, looks like distutils' sdist command doesn't like our new > repository layout which uses symlinks (after we've switched to > subversion). > > We'll have to debug distutils first, I guess :-( Ok, we've found the problem and fixed it. Here's the new release (which does build out of the box at least on our boxes ;-): http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 01 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From davidrushby at yahoo.com Mon May 2 15:49:53 2005 From: davidrushby at yahoo.com (David Rushby) Date: Sat Jan 14 20:00:52 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Ok, we've found the problem and fixed it. Here's the new > release (which does build out of the box at least on our > boxes ;-): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip It does build now, but: py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" still behaves as it did when I submitted my original message: Fatal Python error: UNREF invalid object Aborted This is the same debug build of Python 2.4.1 that I was previously using, running the same configuration (CentOS Linux 4.0/i386, everything compiled with GCC 3.4.3). Have you examined my original claim as to the cause of the bug? __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 10:21:55 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 14 20:00:52 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> References: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> Message-ID: <42772693.8050306@egenix.com> David Rushby wrote: > --- "M.-A. Lemburg" wrote: > >>Ok, we've found the problem and fixed it. Here's the new >>release (which does build out of the box at least on our >>boxes ;-): >> >> > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip > > It does build now, but: > py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" > still behaves as it did when I submitted my original message: > Fatal Python error: UNREF invalid object > Aborted > > This is the same debug build of Python 2.4.1 that I was previously > using, running the same configuration (CentOS Linux 4.0/i386, > everything compiled with GCC 3.4.3). > > Have you examined my original claim as to the cause of the bug? No. We haven't had time for looking into it. I'm not sure whether your analysis of the problem is correct: if you don't define WANT_SUBCLASSABLE_TYPES, the API mxDateTime_Deallocate() is neither defined nor used. Furthermore, PyObject_Del() is only called by mxDateTime_Free() if you have explicitely edited mxDateTime.c to disabled the free list #defines. In a standard build, PyObject_Del() is only called at module finalization time. Note that the reason we call mxDateTime_Free() in the constructor is that we don't want the destructor of the object to be called. Py_DECREF() would call the destructor (mxDateTime_Deallocate). It is possible that the debug code in Python complains about the refcount in the object not being 0 at the time the object is finalized (module finalization time), but I don't see any such checks in PyObject_Free() (which is what PyObject_Del() maps to). Again, all of this does not happen in regular non-debug Python builds. Please be aware that we don't support debug builds, so fixing the problem (if there is one - gcc has some serious optimization problems on some combinations of platform and version) will take a while. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 09:27:37 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Sat Jan 14 20:00:52 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 Message-ID: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Hi all- I am trying to build the mx-base package, v.2.0.6. This will be used with postgresql 7.3.9, psycopg 1.1.18, and Roundup 0.8.2. RHEL 3.0 Python 2.3 egenix-mx-base-2.0.6.tar.gz I performed a: /usr/local/bin/python2.3 setup.py install Everything looks proper with the exeception of this series of warning statements: ----------------- gcc -pthread -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fno-strict-aliasing -fPIC -Imx/BeeBase/mxBeeBase -I/usr/local/incl ude/python2.3 -I/usr/local/include -c mx/BeeBase/mxBeeBase/btr.c -o build/temp.linux-i686-2.3/mx/BeeBase/mxBeeBase/mxBeeBa se/mx/BeeBase/mxBeeBase/btr.o mx/BeeBase/mxBeeBase/btr.c: In function `dumpBuf': mx/BeeBase/mxBeeBase/btr.c:249: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:250: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:255: warning: unsigned int format, long unsigned int arg (arg 4) mx/BeeBase/mxBeeBase/btr.c:256: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c: In function `_validateTree': mx/BeeBase/mxBeeBase/btr.c:330: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:337: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:339: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:349: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:351: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 3) creating build/lib.linux-i686-2.3/mx/BeeBase creating build/lib.linux-i686-2.3/mx/BeeBase/mxBeeBase -------------- Would someone be kind enough to let me know whether these messages were expected, and if not, how I might resolve these? Thanks! DC __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 22:06:33 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 14 20:00:52 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> References: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Message-ID: <4277CBB9.8020302@egenix.com> Dianne Chen wrote: > Hi all- > > I am trying to build the mx-base package, v.2.0.6. > This will be used with postgresql 7.3.9, psycopg > 1.1.18, and Roundup 0.8.2. > > RHEL 3.0 > Python 2.3 > egenix-mx-base-2.0.6.tar.gz > > I performed a: > > /usr/local/bin/python2.3 setup.py install > > Everything looks proper with the exeception of this > series of warning statements: > > ----------------- > ... > -------------- > > Would someone be kind enough to let me know whether > these messages were expected, and if not, how I might > resolve these? These warning can safely be ignored. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 13:41:14 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Sat Jan 14 20:00:53 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: 6667 Message-ID: <20050503194114.72091.qmail@web31414.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Dianne Chen wrote: > > Hi all- > > > > I am trying to build the mx-base package, v.2.0.6. > > This will be used with postgresql 7.3.9, psycopg > > 1.1.18, and Roundup 0.8.2. > > > > RHEL 3.0 > > Python 2.3 > > egenix-mx-base-2.0.6.tar.gz > > > > I performed a: > > > > /usr/local/bin/python2.3 setup.py install > > > > Everything looks proper with the exeception of > this > > series of warning statements: > > > > ----------------- > > ... > > -------------- > > > > Would someone be kind enough to let me know > whether > > these messages were expected, and if not, how I > might > > resolve these? > > These warning can safely be ignored. > > -- > Marc-Andre Lemburg > eGenix.com > Marc- Thank you very much for the reply. It helps greatly. With kind regards, DC __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From davidrushby at yahoo.com Tue May 3 17:18:46 2005 From: davidrushby at yahoo.com (David Rushby) Date: Sat Jan 14 20:00:53 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050503231846.35012.qmail@web30009.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > I'm not sure whether your analysis of the problem is correct... Indeed, my original analysis wasn't correct; I think this one is. The fatal error I'm complaining about only arises if the arguments to DateTime.DateTime are invalid, so that the object is deallocated in the onError block of mxDateTime_FromDateAndTime. If the object is created successfully, and later deallocated by Python's garbage collector, the fatal error doesn't arise. Here's my analysis of the problem: --- If the debugging directive Py_TRACE_REFS is enabled, as it is in my case, the Python interpreter maintains a doubly linked list of all Python objects (named refchain) via the _ob_next and _ob_prev pointers added to PyObject via _PyObject_HEAD_EXTRA. Each object is inserted into refchain by the _Py_AddToAllObjects call in _Py_NewReference, and removed from refchain by the _Py_ForgetReference call in _Py_Dealloc. _Py_ForgetReference performs an integrity check on the object being deallocated (op) to make sure that its neighbors in refchain recognize it. Specifically, _Py_ForgetReference verifies that the _ob_next pointer of the previous object in refchain (op->_ob_prev->_ob_next) points to op, and that the _ob_prev pointer of the next object in refchain (op->_ob_next->_ob_prev) points to op. If either of those conditions is false, the interpreter raises the fatal error I'm seeing. After mxDateTime_New pulls an mxDateTimeObject out of the free list, it calls _Py_NewReference on that object to transform it from a "conceptually deallocated" object to a "conceptually allocated" one. _Py_NewReference inserts the object into refchain. Later, when the object is being "conceptually deallocated", it should be removed from refchain with _Py_ForgetReference. The version of _Py_Dealloc that's active when Py_TRACE_REFS is enabled does this (_Py_Dealloc is the element of Py_DECREF that performs the actual destruction). _Py_Dealloc first calls _Py_ForgetReference to remove the object from refchain, then calls the object's destructor (op->ob_type->tp_dealloc). If WANT_SUBCLASSABLE_TYPES is not defined (it is not in my case), the destructor for mxDateTime_Type is mxDateTime_Free. So, if a DateTime object is deallocated normally, as a result of its reference count falling to zero, _Py_Dealloc is called on the object, which first removes it from refchain, then passes it to mxDateTime_Free. If a DateTime object is destroyed prematurely, as a result of invalid arguments to its destructor, the onError handler calls mxDateTime_Free, so the object is "conceptually deallocated" (placed in the free list), *but* the object is not removed from refchain. So if a refchain-membership-integrity-check is performed on the object in question or one of its immediate neighbors in refchain, that integrity check fails, leading to the fatal error. --- The solution is to 'Py_DECREF(...)' the object in the onError handler of its constructor, instead of passing the object directly to mxDateTime_Free. That change solves two problems: 1) It causes _Py_Dealloc to execute, which in turn executes _Py_ForgetReference, so the object is removed from refchain, as it should be. 2) At present, objects that are created successfully and later deallocated by normal reference count mechanics have a reference count of 0 when they enter the free list, whereas objects whose constructors abort their creation due to invalid arguments have a reference count of 1 when they enter the free list. Although AFAIK this doesn't cause an actual execution problem (because the object's reference count is *explicitly set to 1* rather than *incremented by 1* when the object is later "conceptually allocated" by _Py_NewReference), it is likely to confuse future maintainers and thereby lead to the introduction of an actual execution problem. I assume that if you agree that this is a reasonable solution, you'll want to apply the change not only to mxDateTime_FromDateAndTime, but to all similar constructors in mxDateTime.c. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From rj at maxxian.com Thu May 5 01:57:40 2005 From: rj at maxxian.com (RJ Juneau) Date: Sat Jan 14 20:00:53 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c5512e$f72798c0$6505a8c0@rjlaptop> I'm on the 30 day evaluation for mxodbc_zope_da. I'm getting the following error when I submit some queries: Error Type: KeyError Error Value: 'query' I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 with UCS4. The error seems to be caused by multiple rows being returned. I did see an earlier posting with the same error message. The response suggested a template error, but this is clearly not the case here. The additional evidence I've gathered so far: - I'm running the test directly from the ZSQL method, so there's no template involved. - If I use the same query with an additional "where" clause to ensure that only one row is returned, it works - If I use a value in the 'where' clause with no rows returned, it works - The same ZSQL query is being used on a Windows machine running Zope and the free ZODBC module without a problem - The query has been verified directly in mysql-client-browser Other info: - The database is MySQL 4.1.10A-0 - iODBC is the DB driver RJ Juneau -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050505/68d278bf/attachment-0008.htm From mal at egenix.com Thu May 5 12:37:43 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 14 20:00:53 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c5512e$f72798c0$6505a8c0@rjlaptop> References: <000301c5512e$f72798c0$6505a8c0@rjlaptop> Message-ID: <4279E967.6010904@egenix.com> RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 > with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 09:37:42 2005 From: rj at maxxian.com (RJ Juneau) Date: Sat Jan 14 20:00:53 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000101c5516f$3b96de90$6505a8c0@rjlaptop> More interesting info on the problem: If I execute the query directly in the "test" window of the base eGenix mxODBC Database Connection window, it works fine and returns the 20 lines expected. That could point to a problem in the rendering, which seems to be where the traceback ends. Note that within the same Zope system I also have an ODBC connection to a Sybase database, and I have successfully tested multi-line ZSQL queries there. This is the traceback: Time 2005/05/05 07:55:15.294 GMT-4 Exception Type KeyError Exception Value 'query' Traceback (innermost last): Module ZPublisher.Publish, line 101, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 39, in call_object Module Shared.DC.ZRDB.DA, line 337, in manage_test Module DocumentTemplate.DT_String, line 474, in __call__ Module DocumentTemplate.DT_In, line 602, in renderwb Module DocumentTemplate.DT_Var, line 219, in render KeyError: 'query' I don't think the following is an issue, but I'll include it for completeness.I am also getting the following iODBC warnings and errors in the Zope console log, which are related to the ODBC parameters being passed by iODBC. Note that these errors also appear for all of the successful queries. [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (Setup). [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (UsageCount). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Timeout). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Reuse). As for the ZSQL snippet from the template... Since there's no template involved yet (I'm still testing directly from the ZSQL method), I assume you mean the SQL code? select h.host_name, s.system_name, s.system_handle, count(*) from terminal t, system_map s, host h where t.system_index = s.system_index and s.host_index = h.host_index group by s.system_name order by h.host_name Nothing complicated here. There are no parameters passed to the query. RJ -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: May 5, 2005 5:38 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: Re: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is > 2.3.4 with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ---------------------------------------------------------------------- > -- > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 16:00:32 2005 From: charlie at egenix.com (Charlie Clark) Date: Sat Jan 14 20:00:53 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000101c5516f$3b96de90$6505a8c0@rjlaptop> References: <000101c5516f$3b96de90$6505a8c0@rjlaptop> Message-ID: <20050505150032.644.1@bepc.1115296715.fake> On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base eGenix > mxODBC Database Connection window, it works fine and returns the 20 > lines expected. That could point to a problem in the rendering, which > seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection to > a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 10:22:17 2005 From: rj at maxxian.com (RJ Juneau) Date: Sat Jan 14 20:00:53 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505150032.644.1@bepc.1115296715.fake> Message-ID: <000201c55175$75bcad10$6505a8c0@rjlaptop> At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 11:47:14 2005 From: rj at maxxian.com (RJ Juneau) Date: Sat Jan 14 20:00:53 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c55181$549be0e0$6505a8c0@rjlaptop> Charlie, I found a fix. Here it is in case anyone else runs into this. You were correct - the problem is in another part of Zope. Based on your feedback, I did a bit more searching and found something here: http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. html The problem appears to be in Zope versions after 2.7.0. I'm running 2.7.6, and the post indicates that it also happens in 2.7.4. The solution: Edit file /lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. There are two lines in the file that start with . Edit them as follows: Change first line to: Change second line to: Just to be after, I shut down Zope before I made the changes and restarted it after. Thanks for the help! RJ -----Original Message----- From: RJ Juneau [mailto:rj@maxxian.com] Sent: May 5, 2005 9:22 AM To: 'Charlie Clark' Cc: 'egenix-users@lists.egenix.com' Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 17:57:25 2005 From: charlie at egenix.com (Charlie Clark) Date: Sat Jan 14 20:00:53 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <20050505165725.3380.2@bepc.1115296715.fake> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Thu May 5 09:15:21 2005 From: charlie at egenix.com (Charlie Clark) Date: Sat Jan 14 20:00:53 2006 Subject: [Zope-DB] RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <000001c55185$41477730$6b00a8c0@fonacier.local> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________ Zope-DB mailing list Zope-DB@zope.org http://mail.zope.org/mailman/listinfo/zope-db From rj at maxxian.com Thu May 5 12:38:00 2005 From: rj at maxxian.com (RJ Juneau) Date: Sat Jan 14 20:00:53 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000001c55188$6b841eb0$6505a8c0@rjlaptop> I just double-checked. Zope-2.7.6-final. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 12:49:16 2005 From: rj at maxxian.com (RJ Juneau) Date: Sat Jan 14 20:00:53 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000501c55189$fe149ba0$6505a8c0@rjlaptop> Charlie, The fix has only been applied for 2.7.7, 2.8b2. The info is in the original bug report which is closed and can be found here: http://www.zope.org/Collectors/Zope/1745 RJ -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Fri May 6 11:50:09 2005 From: rj at maxxian.com (RJ Juneau) Date: Sat Jan 14 20:00:53 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC Message-ID: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Still on eval for the product. I cannot get a stable connection to Sybase via the iODBC drivers. - The Sybase ODBC connection - including a query - have been verified at the iODBC level. - The setup is already working well for ODBC connection to MySQL. Symptoms include: - If I click on "Open Connection", it still comes back with "Connection Closed" when I go to a ZSQL method - Using 'Connect on Demand' is not working either. - Clicking "Open Connection" gives me the following error: Connection string: DSN=lixbox_sybase; UID=sa; PWD=XXXXXXX Connection pool entry: 0 Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection rejected by data source', 7952) The odbc.ini definition for DSN "lixbox_sybase" is as follows: [lixbox_sybase] JetFix = No NoRowSetSizeLimit = No Description = Test connection to listbox Options = LIXBOX DSQUERY = SQLSERVER TDSHOST = lixbox TDSPORT = 5000 TDSVER = 5.0 SQLSERVER_CATALOG = N CURSOR_SENSITIVITY = LOW UserName = sa Password = XXXXXXXX ServerType = Sybase 10/11/12 Driver = /opt/openlink/lib/sql_mt_lt.so Database = pubs2 ReadOnly = no NoAutoCommit = No NoLoginBox = No FetchBufferSize = 60 Other relevant data: - Connecting via OpenLink's iODBC - Zope 2.7.6-final - Python 2.3.4 - Connection to Sybase has been successfully tested with iODBC, including issuing a query - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC connection RJ Juneau Chief Technology Officer Maxxian Integration Inc. 155 Westhampton Drive Thornhill, Ontario Canada L4J 7X2 E-mail: rj@maxxian.com Phone: +1 905 482 9429 Cell: +1 416 897 6682 Toll free: +1 866 758 9161 Fax: +1 647 722 2038 -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050506/aef33361/attachment-0008.htm From mal at egenix.com Fri May 6 18:27:37 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 14 20:00:53 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC In-Reply-To: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> References: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Message-ID: <427B8CE9.1010601@egenix.com> RJ Juneau wrote: > Still on eval for the product. > > I cannot get a stable connection to Sybase via the iODBC drivers. > > - The Sybase ODBC connection - including a query - have been verified at > the iODBC level. > - The setup is already working well for ODBC connection to MySQL. > > Symptoms include: > > - If I click on "Open Connection", it still comes back with "Connection > Closed" when I go to a ZSQL method > - Using 'Connect on Demand' is not working either. > - Clicking "Open Connection" gives me the following error: > > Connection string: DSN=lixbox_sybase; > UID=sa; > PWD=XXXXXXX Try writing the connection string on one line and without whitespace. ODBC drivers sometimes have problems with this. > Connection pool entry: 0 > Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection > rejected by data source', 7952) This is a generic error that relates to authentication or firewall problems. It is possible that turning on ODBC tracing the ODBC manager will give more clues as to the real cause of the problem. > The odbc.ini definition for DSN "lixbox_sybase" is as follows: > > [lixbox_sybase] > JetFix = No > NoRowSetSizeLimit = No > Description = Test connection to listbox > Options = LIXBOX > DSQUERY = SQLSERVER > TDSHOST = lixbox > TDSPORT = 5000 > TDSVER = 5.0 > SQLSERVER_CATALOG = N > CURSOR_SENSITIVITY = LOW > UserName = sa > Password = XXXXXXXX > ServerType = Sybase 10/11/12 > Driver = /opt/openlink/lib/sql_mt_lt.so > Database = pubs2 > ReadOnly = no > NoAutoCommit = No > NoLoginBox = No > FetchBufferSize = 60 > > > Other relevant data: > - Connecting via OpenLink's iODBC > - Zope 2.7.6-final > - Python 2.3.4 > - Connection to Sybase has been successfully tested with iODBC, > including issuing a query > - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC > connection > > > > RJ Juneau > Chief Technology Officer > Maxxian Integration Inc. > 155 Westhampton Drive > Thornhill, Ontario > Canada L4J 7X2 > E-mail: rj@maxxian.com > Phone: +1 905 482 9429 > Cell: +1 416 897 6682 > Toll free: +1 866 758 9161 > Fax: +1 647 722 2038 > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 06 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From calisp at gmail.com Sun May 15 23:49:03 2005 From: calisp at gmail.com (calisp@gmail.com) Date: Sat Jan 14 20:00:53 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK Message-ID: Hi, I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the following error... 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the last phase of a two-phase commit. This shouldn't happen. Traceback (most recent call last): File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one jar.tpc_finish(self) File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish try: self._finish() File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could not perform COMMIT or ROLLBACK', 1023) What could be causing this? Can I get the mxODBCZopeDA source from somewhere? It would make debugging this much easier. Thanks, Calisp. From mal at egenix.com Mon May 16 13:52:12 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 14 20:00:53 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK In-Reply-To: References: Message-ID: <42887B5C.4010109@egenix.com> calisp@gmail.com wrote: > Hi, > > I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with > unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the > following error... > > 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the > last phase of a two-phase commit. This shouldn't happen. > Traceback (most recent call last): > File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one > jar.tpc_finish(self) > File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish > try: self._finish() > File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish > File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler > ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could > not perform COMMIT or ROLLBACK', 1023) You should have a look at the database logs to see what prevented the commit from being completed. > What could be causing this? Hard to say: mxODBCZopeDA is trying to commit the transaction, but the driver or database failed to complete the request. The above error was generated by the ODBC driver. This could be network or DNS problems, or be related to a bug in FreeTDS (which is getting more stable with every new release, but should still be considered beta quality software at the moment). > Can I get the mxODBCZopeDA source from > somewhere? It would make debugging this much easier. Getting the source is not an option and won't help much either since the source of the problem is not mxODBCZopeDA. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 16 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Sun May 1 21:29:25 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 15 08:02:20 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <427259F3.4090806@egenix.com> References: <20050427130906.52878.qmail@web30008.mail.mud.yahoo.com> <427259F3.4090806@egenix.com> Message-ID: <42752005.7080904@egenix.com> M.-A. Lemburg wrote: > David Rushby wrote: > >> --- "M.-A. Lemburg" wrote: >> >>> Are you using the standard mxDateTime build or one >>> with WANT_SUBCLASSABLE_TYPES defined... >> >> >> >> Presumably "the standard", since I just built with 'py24d setup.py >> build', making no attempt to enable special directives. >> >> >>> ... (mxDateTime_Deallocate is only used by the latter)? >> >> >> >> That's true in 2.1.0-2005-04-15, but not in 2.1.0b5. >> >> >>> In any case, please try our latest snapshot: >>> >>> >> >> http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-04-15.zip >> >>> to see if that makes any difference. >> >> >> >> I can't build it out of the box: > > > Hmm, looks like distutils' sdist command doesn't like our new > repository layout which uses symlinks (after we've switched to > subversion). > > We'll have to debug distutils first, I guess :-( Ok, we've found the problem and fixed it. Here's the new release (which does build out of the box at least on our boxes ;-): http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 01 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From davidrushby at yahoo.com Mon May 2 15:49:53 2005 From: davidrushby at yahoo.com (David Rushby) Date: Sun Jan 15 08:02:20 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Ok, we've found the problem and fixed it. Here's the new > release (which does build out of the box at least on our > boxes ;-): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip It does build now, but: py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" still behaves as it did when I submitted my original message: Fatal Python error: UNREF invalid object Aborted This is the same debug build of Python 2.4.1 that I was previously using, running the same configuration (CentOS Linux 4.0/i386, everything compiled with GCC 3.4.3). Have you examined my original claim as to the cause of the bug? __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 10:21:55 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 15 08:02:20 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> References: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> Message-ID: <42772693.8050306@egenix.com> David Rushby wrote: > --- "M.-A. Lemburg" wrote: > >>Ok, we've found the problem and fixed it. Here's the new >>release (which does build out of the box at least on our >>boxes ;-): >> >> > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip > > It does build now, but: > py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" > still behaves as it did when I submitted my original message: > Fatal Python error: UNREF invalid object > Aborted > > This is the same debug build of Python 2.4.1 that I was previously > using, running the same configuration (CentOS Linux 4.0/i386, > everything compiled with GCC 3.4.3). > > Have you examined my original claim as to the cause of the bug? No. We haven't had time for looking into it. I'm not sure whether your analysis of the problem is correct: if you don't define WANT_SUBCLASSABLE_TYPES, the API mxDateTime_Deallocate() is neither defined nor used. Furthermore, PyObject_Del() is only called by mxDateTime_Free() if you have explicitely edited mxDateTime.c to disabled the free list #defines. In a standard build, PyObject_Del() is only called at module finalization time. Note that the reason we call mxDateTime_Free() in the constructor is that we don't want the destructor of the object to be called. Py_DECREF() would call the destructor (mxDateTime_Deallocate). It is possible that the debug code in Python complains about the refcount in the object not being 0 at the time the object is finalized (module finalization time), but I don't see any such checks in PyObject_Free() (which is what PyObject_Del() maps to). Again, all of this does not happen in regular non-debug Python builds. Please be aware that we don't support debug builds, so fixing the problem (if there is one - gcc has some serious optimization problems on some combinations of platform and version) will take a while. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 09:27:37 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Sun Jan 15 08:02:20 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 Message-ID: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Hi all- I am trying to build the mx-base package, v.2.0.6. This will be used with postgresql 7.3.9, psycopg 1.1.18, and Roundup 0.8.2. RHEL 3.0 Python 2.3 egenix-mx-base-2.0.6.tar.gz I performed a: /usr/local/bin/python2.3 setup.py install Everything looks proper with the exeception of this series of warning statements: ----------------- gcc -pthread -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fno-strict-aliasing -fPIC -Imx/BeeBase/mxBeeBase -I/usr/local/incl ude/python2.3 -I/usr/local/include -c mx/BeeBase/mxBeeBase/btr.c -o build/temp.linux-i686-2.3/mx/BeeBase/mxBeeBase/mxBeeBa se/mx/BeeBase/mxBeeBase/btr.o mx/BeeBase/mxBeeBase/btr.c: In function `dumpBuf': mx/BeeBase/mxBeeBase/btr.c:249: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:250: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:255: warning: unsigned int format, long unsigned int arg (arg 4) mx/BeeBase/mxBeeBase/btr.c:256: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c: In function `_validateTree': mx/BeeBase/mxBeeBase/btr.c:330: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:337: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:339: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:349: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:351: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 3) creating build/lib.linux-i686-2.3/mx/BeeBase creating build/lib.linux-i686-2.3/mx/BeeBase/mxBeeBase -------------- Would someone be kind enough to let me know whether these messages were expected, and if not, how I might resolve these? Thanks! DC __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 22:06:33 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 15 08:02:20 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> References: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Message-ID: <4277CBB9.8020302@egenix.com> Dianne Chen wrote: > Hi all- > > I am trying to build the mx-base package, v.2.0.6. > This will be used with postgresql 7.3.9, psycopg > 1.1.18, and Roundup 0.8.2. > > RHEL 3.0 > Python 2.3 > egenix-mx-base-2.0.6.tar.gz > > I performed a: > > /usr/local/bin/python2.3 setup.py install > > Everything looks proper with the exeception of this > series of warning statements: > > ----------------- > ... > -------------- > > Would someone be kind enough to let me know whether > these messages were expected, and if not, how I might > resolve these? These warning can safely be ignored. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 13:41:14 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Sun Jan 15 08:02:20 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: 6667 Message-ID: <20050503194114.72091.qmail@web31414.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Dianne Chen wrote: > > Hi all- > > > > I am trying to build the mx-base package, v.2.0.6. > > This will be used with postgresql 7.3.9, psycopg > > 1.1.18, and Roundup 0.8.2. > > > > RHEL 3.0 > > Python 2.3 > > egenix-mx-base-2.0.6.tar.gz > > > > I performed a: > > > > /usr/local/bin/python2.3 setup.py install > > > > Everything looks proper with the exeception of > this > > series of warning statements: > > > > ----------------- > > ... > > -------------- > > > > Would someone be kind enough to let me know > whether > > these messages were expected, and if not, how I > might > > resolve these? > > These warning can safely be ignored. > > -- > Marc-Andre Lemburg > eGenix.com > Marc- Thank you very much for the reply. It helps greatly. With kind regards, DC __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From davidrushby at yahoo.com Tue May 3 17:18:46 2005 From: davidrushby at yahoo.com (David Rushby) Date: Sun Jan 15 08:02:20 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050503231846.35012.qmail@web30009.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > I'm not sure whether your analysis of the problem is correct... Indeed, my original analysis wasn't correct; I think this one is. The fatal error I'm complaining about only arises if the arguments to DateTime.DateTime are invalid, so that the object is deallocated in the onError block of mxDateTime_FromDateAndTime. If the object is created successfully, and later deallocated by Python's garbage collector, the fatal error doesn't arise. Here's my analysis of the problem: --- If the debugging directive Py_TRACE_REFS is enabled, as it is in my case, the Python interpreter maintains a doubly linked list of all Python objects (named refchain) via the _ob_next and _ob_prev pointers added to PyObject via _PyObject_HEAD_EXTRA. Each object is inserted into refchain by the _Py_AddToAllObjects call in _Py_NewReference, and removed from refchain by the _Py_ForgetReference call in _Py_Dealloc. _Py_ForgetReference performs an integrity check on the object being deallocated (op) to make sure that its neighbors in refchain recognize it. Specifically, _Py_ForgetReference verifies that the _ob_next pointer of the previous object in refchain (op->_ob_prev->_ob_next) points to op, and that the _ob_prev pointer of the next object in refchain (op->_ob_next->_ob_prev) points to op. If either of those conditions is false, the interpreter raises the fatal error I'm seeing. After mxDateTime_New pulls an mxDateTimeObject out of the free list, it calls _Py_NewReference on that object to transform it from a "conceptually deallocated" object to a "conceptually allocated" one. _Py_NewReference inserts the object into refchain. Later, when the object is being "conceptually deallocated", it should be removed from refchain with _Py_ForgetReference. The version of _Py_Dealloc that's active when Py_TRACE_REFS is enabled does this (_Py_Dealloc is the element of Py_DECREF that performs the actual destruction). _Py_Dealloc first calls _Py_ForgetReference to remove the object from refchain, then calls the object's destructor (op->ob_type->tp_dealloc). If WANT_SUBCLASSABLE_TYPES is not defined (it is not in my case), the destructor for mxDateTime_Type is mxDateTime_Free. So, if a DateTime object is deallocated normally, as a result of its reference count falling to zero, _Py_Dealloc is called on the object, which first removes it from refchain, then passes it to mxDateTime_Free. If a DateTime object is destroyed prematurely, as a result of invalid arguments to its destructor, the onError handler calls mxDateTime_Free, so the object is "conceptually deallocated" (placed in the free list), *but* the object is not removed from refchain. So if a refchain-membership-integrity-check is performed on the object in question or one of its immediate neighbors in refchain, that integrity check fails, leading to the fatal error. --- The solution is to 'Py_DECREF(...)' the object in the onError handler of its constructor, instead of passing the object directly to mxDateTime_Free. That change solves two problems: 1) It causes _Py_Dealloc to execute, which in turn executes _Py_ForgetReference, so the object is removed from refchain, as it should be. 2) At present, objects that are created successfully and later deallocated by normal reference count mechanics have a reference count of 0 when they enter the free list, whereas objects whose constructors abort their creation due to invalid arguments have a reference count of 1 when they enter the free list. Although AFAIK this doesn't cause an actual execution problem (because the object's reference count is *explicitly set to 1* rather than *incremented by 1* when the object is later "conceptually allocated" by _Py_NewReference), it is likely to confuse future maintainers and thereby lead to the introduction of an actual execution problem. I assume that if you agree that this is a reasonable solution, you'll want to apply the change not only to mxDateTime_FromDateAndTime, but to all similar constructors in mxDateTime.c. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From rj at maxxian.com Thu May 5 01:57:40 2005 From: rj at maxxian.com (RJ Juneau) Date: Sun Jan 15 08:02:20 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c5512e$f72798c0$6505a8c0@rjlaptop> I'm on the 30 day evaluation for mxodbc_zope_da. I'm getting the following error when I submit some queries: Error Type: KeyError Error Value: 'query' I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 with UCS4. The error seems to be caused by multiple rows being returned. I did see an earlier posting with the same error message. The response suggested a template error, but this is clearly not the case here. The additional evidence I've gathered so far: - I'm running the test directly from the ZSQL method, so there's no template involved. - If I use the same query with an additional "where" clause to ensure that only one row is returned, it works - If I use a value in the 'where' clause with no rows returned, it works - The same ZSQL query is being used on a Windows machine running Zope and the free ZODBC module without a problem - The query has been verified directly in mysql-client-browser Other info: - The database is MySQL 4.1.10A-0 - iODBC is the DB driver RJ Juneau -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050505/68d278bf/attachment-0009.htm From mal at egenix.com Thu May 5 12:37:43 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 15 08:02:20 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c5512e$f72798c0$6505a8c0@rjlaptop> References: <000301c5512e$f72798c0$6505a8c0@rjlaptop> Message-ID: <4279E967.6010904@egenix.com> RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 > with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 09:37:42 2005 From: rj at maxxian.com (RJ Juneau) Date: Sun Jan 15 08:02:20 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000101c5516f$3b96de90$6505a8c0@rjlaptop> More interesting info on the problem: If I execute the query directly in the "test" window of the base eGenix mxODBC Database Connection window, it works fine and returns the 20 lines expected. That could point to a problem in the rendering, which seems to be where the traceback ends. Note that within the same Zope system I also have an ODBC connection to a Sybase database, and I have successfully tested multi-line ZSQL queries there. This is the traceback: Time 2005/05/05 07:55:15.294 GMT-4 Exception Type KeyError Exception Value 'query' Traceback (innermost last): Module ZPublisher.Publish, line 101, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 39, in call_object Module Shared.DC.ZRDB.DA, line 337, in manage_test Module DocumentTemplate.DT_String, line 474, in __call__ Module DocumentTemplate.DT_In, line 602, in renderwb Module DocumentTemplate.DT_Var, line 219, in render KeyError: 'query' I don't think the following is an issue, but I'll include it for completeness.I am also getting the following iODBC warnings and errors in the Zope console log, which are related to the ODBC parameters being passed by iODBC. Note that these errors also appear for all of the successful queries. [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (Setup). [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (UsageCount). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Timeout). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Reuse). As for the ZSQL snippet from the template... Since there's no template involved yet (I'm still testing directly from the ZSQL method), I assume you mean the SQL code? select h.host_name, s.system_name, s.system_handle, count(*) from terminal t, system_map s, host h where t.system_index = s.system_index and s.host_index = h.host_index group by s.system_name order by h.host_name Nothing complicated here. There are no parameters passed to the query. RJ -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: May 5, 2005 5:38 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: Re: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is > 2.3.4 with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ---------------------------------------------------------------------- > -- > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 16:00:32 2005 From: charlie at egenix.com (Charlie Clark) Date: Sun Jan 15 08:02:20 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000101c5516f$3b96de90$6505a8c0@rjlaptop> References: <000101c5516f$3b96de90$6505a8c0@rjlaptop> Message-ID: <20050505150032.644.1@bepc.1115296715.fake> On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base eGenix > mxODBC Database Connection window, it works fine and returns the 20 > lines expected. That could point to a problem in the rendering, which > seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection to > a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 10:22:17 2005 From: rj at maxxian.com (RJ Juneau) Date: Sun Jan 15 08:02:20 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505150032.644.1@bepc.1115296715.fake> Message-ID: <000201c55175$75bcad10$6505a8c0@rjlaptop> At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 11:47:14 2005 From: rj at maxxian.com (RJ Juneau) Date: Sun Jan 15 08:02:20 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c55181$549be0e0$6505a8c0@rjlaptop> Charlie, I found a fix. Here it is in case anyone else runs into this. You were correct - the problem is in another part of Zope. Based on your feedback, I did a bit more searching and found something here: http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. html The problem appears to be in Zope versions after 2.7.0. I'm running 2.7.6, and the post indicates that it also happens in 2.7.4. The solution: Edit file /lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. There are two lines in the file that start with . Edit them as follows: Change first line to: Change second line to: Just to be after, I shut down Zope before I made the changes and restarted it after. Thanks for the help! RJ -----Original Message----- From: RJ Juneau [mailto:rj@maxxian.com] Sent: May 5, 2005 9:22 AM To: 'Charlie Clark' Cc: 'egenix-users@lists.egenix.com' Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 17:57:25 2005 From: charlie at egenix.com (Charlie Clark) Date: Sun Jan 15 08:02:20 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <20050505165725.3380.2@bepc.1115296715.fake> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Thu May 5 09:15:21 2005 From: charlie at egenix.com (Charlie Clark) Date: Sun Jan 15 08:02:20 2006 Subject: [Zope-DB] RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <000001c55185$41477730$6b00a8c0@fonacier.local> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________ Zope-DB mailing list Zope-DB@zope.org http://mail.zope.org/mailman/listinfo/zope-db From rj at maxxian.com Thu May 5 12:38:00 2005 From: rj at maxxian.com (RJ Juneau) Date: Sun Jan 15 08:02:20 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000001c55188$6b841eb0$6505a8c0@rjlaptop> I just double-checked. Zope-2.7.6-final. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 12:49:16 2005 From: rj at maxxian.com (RJ Juneau) Date: Sun Jan 15 08:02:20 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000501c55189$fe149ba0$6505a8c0@rjlaptop> Charlie, The fix has only been applied for 2.7.7, 2.8b2. The info is in the original bug report which is closed and can be found here: http://www.zope.org/Collectors/Zope/1745 RJ -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Fri May 6 11:50:09 2005 From: rj at maxxian.com (RJ Juneau) Date: Sun Jan 15 08:02:20 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC Message-ID: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Still on eval for the product. I cannot get a stable connection to Sybase via the iODBC drivers. - The Sybase ODBC connection - including a query - have been verified at the iODBC level. - The setup is already working well for ODBC connection to MySQL. Symptoms include: - If I click on "Open Connection", it still comes back with "Connection Closed" when I go to a ZSQL method - Using 'Connect on Demand' is not working either. - Clicking "Open Connection" gives me the following error: Connection string: DSN=lixbox_sybase; UID=sa; PWD=XXXXXXX Connection pool entry: 0 Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection rejected by data source', 7952) The odbc.ini definition for DSN "lixbox_sybase" is as follows: [lixbox_sybase] JetFix = No NoRowSetSizeLimit = No Description = Test connection to listbox Options = LIXBOX DSQUERY = SQLSERVER TDSHOST = lixbox TDSPORT = 5000 TDSVER = 5.0 SQLSERVER_CATALOG = N CURSOR_SENSITIVITY = LOW UserName = sa Password = XXXXXXXX ServerType = Sybase 10/11/12 Driver = /opt/openlink/lib/sql_mt_lt.so Database = pubs2 ReadOnly = no NoAutoCommit = No NoLoginBox = No FetchBufferSize = 60 Other relevant data: - Connecting via OpenLink's iODBC - Zope 2.7.6-final - Python 2.3.4 - Connection to Sybase has been successfully tested with iODBC, including issuing a query - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC connection RJ Juneau Chief Technology Officer Maxxian Integration Inc. 155 Westhampton Drive Thornhill, Ontario Canada L4J 7X2 E-mail: rj@maxxian.com Phone: +1 905 482 9429 Cell: +1 416 897 6682 Toll free: +1 866 758 9161 Fax: +1 647 722 2038 -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050506/aef33361/attachment-0009.htm From mal at egenix.com Fri May 6 18:27:37 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 15 08:02:20 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC In-Reply-To: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> References: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Message-ID: <427B8CE9.1010601@egenix.com> RJ Juneau wrote: > Still on eval for the product. > > I cannot get a stable connection to Sybase via the iODBC drivers. > > - The Sybase ODBC connection - including a query - have been verified at > the iODBC level. > - The setup is already working well for ODBC connection to MySQL. > > Symptoms include: > > - If I click on "Open Connection", it still comes back with "Connection > Closed" when I go to a ZSQL method > - Using 'Connect on Demand' is not working either. > - Clicking "Open Connection" gives me the following error: > > Connection string: DSN=lixbox_sybase; > UID=sa; > PWD=XXXXXXX Try writing the connection string on one line and without whitespace. ODBC drivers sometimes have problems with this. > Connection pool entry: 0 > Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection > rejected by data source', 7952) This is a generic error that relates to authentication or firewall problems. It is possible that turning on ODBC tracing the ODBC manager will give more clues as to the real cause of the problem. > The odbc.ini definition for DSN "lixbox_sybase" is as follows: > > [lixbox_sybase] > JetFix = No > NoRowSetSizeLimit = No > Description = Test connection to listbox > Options = LIXBOX > DSQUERY = SQLSERVER > TDSHOST = lixbox > TDSPORT = 5000 > TDSVER = 5.0 > SQLSERVER_CATALOG = N > CURSOR_SENSITIVITY = LOW > UserName = sa > Password = XXXXXXXX > ServerType = Sybase 10/11/12 > Driver = /opt/openlink/lib/sql_mt_lt.so > Database = pubs2 > ReadOnly = no > NoAutoCommit = No > NoLoginBox = No > FetchBufferSize = 60 > > > Other relevant data: > - Connecting via OpenLink's iODBC > - Zope 2.7.6-final > - Python 2.3.4 > - Connection to Sybase has been successfully tested with iODBC, > including issuing a query > - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC > connection > > > > RJ Juneau > Chief Technology Officer > Maxxian Integration Inc. > 155 Westhampton Drive > Thornhill, Ontario > Canada L4J 7X2 > E-mail: rj@maxxian.com > Phone: +1 905 482 9429 > Cell: +1 416 897 6682 > Toll free: +1 866 758 9161 > Fax: +1 647 722 2038 > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 06 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From calisp at gmail.com Sun May 15 23:49:03 2005 From: calisp at gmail.com (calisp@gmail.com) Date: Sun Jan 15 08:02:20 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK Message-ID: Hi, I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the following error... 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the last phase of a two-phase commit. This shouldn't happen. Traceback (most recent call last): File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one jar.tpc_finish(self) File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish try: self._finish() File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could not perform COMMIT or ROLLBACK', 1023) What could be causing this? Can I get the mxODBCZopeDA source from somewhere? It would make debugging this much easier. Thanks, Calisp. From mal at egenix.com Mon May 16 13:52:12 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 15 08:02:20 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK In-Reply-To: References: Message-ID: <42887B5C.4010109@egenix.com> calisp@gmail.com wrote: > Hi, > > I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with > unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the > following error... > > 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the > last phase of a two-phase commit. This shouldn't happen. > Traceback (most recent call last): > File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one > jar.tpc_finish(self) > File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish > try: self._finish() > File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish > File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler > ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could > not perform COMMIT or ROLLBACK', 1023) You should have a look at the database logs to see what prevented the commit from being completed. > What could be causing this? Hard to say: mxODBCZopeDA is trying to commit the transaction, but the driver or database failed to complete the request. The above error was generated by the ODBC driver. This could be network or DNS problems, or be related to a bug in FreeTDS (which is getting more stable with every new release, but should still be considered beta quality software at the moment). > Can I get the mxODBCZopeDA source from > somewhere? It would make debugging this much easier. Getting the source is not an option and won't help much either since the source of the problem is not mxODBCZopeDA. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 16 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Sun May 1 21:29:25 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 15 12:01:00 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <427259F3.4090806@egenix.com> References: <20050427130906.52878.qmail@web30008.mail.mud.yahoo.com> <427259F3.4090806@egenix.com> Message-ID: <42752005.7080904@egenix.com> M.-A. Lemburg wrote: > David Rushby wrote: > >> --- "M.-A. Lemburg" wrote: >> >>> Are you using the standard mxDateTime build or one >>> with WANT_SUBCLASSABLE_TYPES defined... >> >> >> >> Presumably "the standard", since I just built with 'py24d setup.py >> build', making no attempt to enable special directives. >> >> >>> ... (mxDateTime_Deallocate is only used by the latter)? >> >> >> >> That's true in 2.1.0-2005-04-15, but not in 2.1.0b5. >> >> >>> In any case, please try our latest snapshot: >>> >>> >> >> http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-04-15.zip >> >>> to see if that makes any difference. >> >> >> >> I can't build it out of the box: > > > Hmm, looks like distutils' sdist command doesn't like our new > repository layout which uses symlinks (after we've switched to > subversion). > > We'll have to debug distutils first, I guess :-( Ok, we've found the problem and fixed it. Here's the new release (which does build out of the box at least on our boxes ;-): http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 01 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From davidrushby at yahoo.com Mon May 2 15:49:53 2005 From: davidrushby at yahoo.com (David Rushby) Date: Sun Jan 15 12:01:00 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Ok, we've found the problem and fixed it. Here's the new > release (which does build out of the box at least on our > boxes ;-): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip It does build now, but: py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" still behaves as it did when I submitted my original message: Fatal Python error: UNREF invalid object Aborted This is the same debug build of Python 2.4.1 that I was previously using, running the same configuration (CentOS Linux 4.0/i386, everything compiled with GCC 3.4.3). Have you examined my original claim as to the cause of the bug? __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 10:21:55 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 15 12:01:00 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> References: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> Message-ID: <42772693.8050306@egenix.com> David Rushby wrote: > --- "M.-A. Lemburg" wrote: > >>Ok, we've found the problem and fixed it. Here's the new >>release (which does build out of the box at least on our >>boxes ;-): >> >> > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip > > It does build now, but: > py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" > still behaves as it did when I submitted my original message: > Fatal Python error: UNREF invalid object > Aborted > > This is the same debug build of Python 2.4.1 that I was previously > using, running the same configuration (CentOS Linux 4.0/i386, > everything compiled with GCC 3.4.3). > > Have you examined my original claim as to the cause of the bug? No. We haven't had time for looking into it. I'm not sure whether your analysis of the problem is correct: if you don't define WANT_SUBCLASSABLE_TYPES, the API mxDateTime_Deallocate() is neither defined nor used. Furthermore, PyObject_Del() is only called by mxDateTime_Free() if you have explicitely edited mxDateTime.c to disabled the free list #defines. In a standard build, PyObject_Del() is only called at module finalization time. Note that the reason we call mxDateTime_Free() in the constructor is that we don't want the destructor of the object to be called. Py_DECREF() would call the destructor (mxDateTime_Deallocate). It is possible that the debug code in Python complains about the refcount in the object not being 0 at the time the object is finalized (module finalization time), but I don't see any such checks in PyObject_Free() (which is what PyObject_Del() maps to). Again, all of this does not happen in regular non-debug Python builds. Please be aware that we don't support debug builds, so fixing the problem (if there is one - gcc has some serious optimization problems on some combinations of platform and version) will take a while. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 09:27:37 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Sun Jan 15 12:01:00 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 Message-ID: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Hi all- I am trying to build the mx-base package, v.2.0.6. This will be used with postgresql 7.3.9, psycopg 1.1.18, and Roundup 0.8.2. RHEL 3.0 Python 2.3 egenix-mx-base-2.0.6.tar.gz I performed a: /usr/local/bin/python2.3 setup.py install Everything looks proper with the exeception of this series of warning statements: ----------------- gcc -pthread -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fno-strict-aliasing -fPIC -Imx/BeeBase/mxBeeBase -I/usr/local/incl ude/python2.3 -I/usr/local/include -c mx/BeeBase/mxBeeBase/btr.c -o build/temp.linux-i686-2.3/mx/BeeBase/mxBeeBase/mxBeeBa se/mx/BeeBase/mxBeeBase/btr.o mx/BeeBase/mxBeeBase/btr.c: In function `dumpBuf': mx/BeeBase/mxBeeBase/btr.c:249: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:250: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:255: warning: unsigned int format, long unsigned int arg (arg 4) mx/BeeBase/mxBeeBase/btr.c:256: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c: In function `_validateTree': mx/BeeBase/mxBeeBase/btr.c:330: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:337: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:339: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:349: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:351: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 3) creating build/lib.linux-i686-2.3/mx/BeeBase creating build/lib.linux-i686-2.3/mx/BeeBase/mxBeeBase -------------- Would someone be kind enough to let me know whether these messages were expected, and if not, how I might resolve these? Thanks! DC __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 22:06:33 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 15 12:01:00 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> References: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Message-ID: <4277CBB9.8020302@egenix.com> Dianne Chen wrote: > Hi all- > > I am trying to build the mx-base package, v.2.0.6. > This will be used with postgresql 7.3.9, psycopg > 1.1.18, and Roundup 0.8.2. > > RHEL 3.0 > Python 2.3 > egenix-mx-base-2.0.6.tar.gz > > I performed a: > > /usr/local/bin/python2.3 setup.py install > > Everything looks proper with the exeception of this > series of warning statements: > > ----------------- > ... > -------------- > > Would someone be kind enough to let me know whether > these messages were expected, and if not, how I might > resolve these? These warning can safely be ignored. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 13:41:14 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Sun Jan 15 12:01:00 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: 6667 Message-ID: <20050503194114.72091.qmail@web31414.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Dianne Chen wrote: > > Hi all- > > > > I am trying to build the mx-base package, v.2.0.6. > > This will be used with postgresql 7.3.9, psycopg > > 1.1.18, and Roundup 0.8.2. > > > > RHEL 3.0 > > Python 2.3 > > egenix-mx-base-2.0.6.tar.gz > > > > I performed a: > > > > /usr/local/bin/python2.3 setup.py install > > > > Everything looks proper with the exeception of > this > > series of warning statements: > > > > ----------------- > > ... > > -------------- > > > > Would someone be kind enough to let me know > whether > > these messages were expected, and if not, how I > might > > resolve these? > > These warning can safely be ignored. > > -- > Marc-Andre Lemburg > eGenix.com > Marc- Thank you very much for the reply. It helps greatly. With kind regards, DC __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From davidrushby at yahoo.com Tue May 3 17:18:46 2005 From: davidrushby at yahoo.com (David Rushby) Date: Sun Jan 15 12:01:00 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050503231846.35012.qmail@web30009.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > I'm not sure whether your analysis of the problem is correct... Indeed, my original analysis wasn't correct; I think this one is. The fatal error I'm complaining about only arises if the arguments to DateTime.DateTime are invalid, so that the object is deallocated in the onError block of mxDateTime_FromDateAndTime. If the object is created successfully, and later deallocated by Python's garbage collector, the fatal error doesn't arise. Here's my analysis of the problem: --- If the debugging directive Py_TRACE_REFS is enabled, as it is in my case, the Python interpreter maintains a doubly linked list of all Python objects (named refchain) via the _ob_next and _ob_prev pointers added to PyObject via _PyObject_HEAD_EXTRA. Each object is inserted into refchain by the _Py_AddToAllObjects call in _Py_NewReference, and removed from refchain by the _Py_ForgetReference call in _Py_Dealloc. _Py_ForgetReference performs an integrity check on the object being deallocated (op) to make sure that its neighbors in refchain recognize it. Specifically, _Py_ForgetReference verifies that the _ob_next pointer of the previous object in refchain (op->_ob_prev->_ob_next) points to op, and that the _ob_prev pointer of the next object in refchain (op->_ob_next->_ob_prev) points to op. If either of those conditions is false, the interpreter raises the fatal error I'm seeing. After mxDateTime_New pulls an mxDateTimeObject out of the free list, it calls _Py_NewReference on that object to transform it from a "conceptually deallocated" object to a "conceptually allocated" one. _Py_NewReference inserts the object into refchain. Later, when the object is being "conceptually deallocated", it should be removed from refchain with _Py_ForgetReference. The version of _Py_Dealloc that's active when Py_TRACE_REFS is enabled does this (_Py_Dealloc is the element of Py_DECREF that performs the actual destruction). _Py_Dealloc first calls _Py_ForgetReference to remove the object from refchain, then calls the object's destructor (op->ob_type->tp_dealloc). If WANT_SUBCLASSABLE_TYPES is not defined (it is not in my case), the destructor for mxDateTime_Type is mxDateTime_Free. So, if a DateTime object is deallocated normally, as a result of its reference count falling to zero, _Py_Dealloc is called on the object, which first removes it from refchain, then passes it to mxDateTime_Free. If a DateTime object is destroyed prematurely, as a result of invalid arguments to its destructor, the onError handler calls mxDateTime_Free, so the object is "conceptually deallocated" (placed in the free list), *but* the object is not removed from refchain. So if a refchain-membership-integrity-check is performed on the object in question or one of its immediate neighbors in refchain, that integrity check fails, leading to the fatal error. --- The solution is to 'Py_DECREF(...)' the object in the onError handler of its constructor, instead of passing the object directly to mxDateTime_Free. That change solves two problems: 1) It causes _Py_Dealloc to execute, which in turn executes _Py_ForgetReference, so the object is removed from refchain, as it should be. 2) At present, objects that are created successfully and later deallocated by normal reference count mechanics have a reference count of 0 when they enter the free list, whereas objects whose constructors abort their creation due to invalid arguments have a reference count of 1 when they enter the free list. Although AFAIK this doesn't cause an actual execution problem (because the object's reference count is *explicitly set to 1* rather than *incremented by 1* when the object is later "conceptually allocated" by _Py_NewReference), it is likely to confuse future maintainers and thereby lead to the introduction of an actual execution problem. I assume that if you agree that this is a reasonable solution, you'll want to apply the change not only to mxDateTime_FromDateAndTime, but to all similar constructors in mxDateTime.c. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From rj at maxxian.com Thu May 5 01:57:40 2005 From: rj at maxxian.com (RJ Juneau) Date: Sun Jan 15 12:01:00 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c5512e$f72798c0$6505a8c0@rjlaptop> I'm on the 30 day evaluation for mxodbc_zope_da. I'm getting the following error when I submit some queries: Error Type: KeyError Error Value: 'query' I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 with UCS4. The error seems to be caused by multiple rows being returned. I did see an earlier posting with the same error message. The response suggested a template error, but this is clearly not the case here. The additional evidence I've gathered so far: - I'm running the test directly from the ZSQL method, so there's no template involved. - If I use the same query with an additional "where" clause to ensure that only one row is returned, it works - If I use a value in the 'where' clause with no rows returned, it works - The same ZSQL query is being used on a Windows machine running Zope and the free ZODBC module without a problem - The query has been verified directly in mysql-client-browser Other info: - The database is MySQL 4.1.10A-0 - iODBC is the DB driver RJ Juneau -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050505/68d278bf/attachment-0010.htm From mal at egenix.com Thu May 5 12:37:43 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 15 12:01:00 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c5512e$f72798c0$6505a8c0@rjlaptop> References: <000301c5512e$f72798c0$6505a8c0@rjlaptop> Message-ID: <4279E967.6010904@egenix.com> RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 > with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 09:37:42 2005 From: rj at maxxian.com (RJ Juneau) Date: Sun Jan 15 12:01:00 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000101c5516f$3b96de90$6505a8c0@rjlaptop> More interesting info on the problem: If I execute the query directly in the "test" window of the base eGenix mxODBC Database Connection window, it works fine and returns the 20 lines expected. That could point to a problem in the rendering, which seems to be where the traceback ends. Note that within the same Zope system I also have an ODBC connection to a Sybase database, and I have successfully tested multi-line ZSQL queries there. This is the traceback: Time 2005/05/05 07:55:15.294 GMT-4 Exception Type KeyError Exception Value 'query' Traceback (innermost last): Module ZPublisher.Publish, line 101, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 39, in call_object Module Shared.DC.ZRDB.DA, line 337, in manage_test Module DocumentTemplate.DT_String, line 474, in __call__ Module DocumentTemplate.DT_In, line 602, in renderwb Module DocumentTemplate.DT_Var, line 219, in render KeyError: 'query' I don't think the following is an issue, but I'll include it for completeness.I am also getting the following iODBC warnings and errors in the Zope console log, which are related to the ODBC parameters being passed by iODBC. Note that these errors also appear for all of the successful queries. [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (Setup). [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (UsageCount). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Timeout). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Reuse). As for the ZSQL snippet from the template... Since there's no template involved yet (I'm still testing directly from the ZSQL method), I assume you mean the SQL code? select h.host_name, s.system_name, s.system_handle, count(*) from terminal t, system_map s, host h where t.system_index = s.system_index and s.host_index = h.host_index group by s.system_name order by h.host_name Nothing complicated here. There are no parameters passed to the query. RJ -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: May 5, 2005 5:38 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: Re: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is > 2.3.4 with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ---------------------------------------------------------------------- > -- > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 16:00:32 2005 From: charlie at egenix.com (Charlie Clark) Date: Sun Jan 15 12:01:00 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000101c5516f$3b96de90$6505a8c0@rjlaptop> References: <000101c5516f$3b96de90$6505a8c0@rjlaptop> Message-ID: <20050505150032.644.1@bepc.1115296715.fake> On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base eGenix > mxODBC Database Connection window, it works fine and returns the 20 > lines expected. That could point to a problem in the rendering, which > seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection to > a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 10:22:17 2005 From: rj at maxxian.com (RJ Juneau) Date: Sun Jan 15 12:01:00 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505150032.644.1@bepc.1115296715.fake> Message-ID: <000201c55175$75bcad10$6505a8c0@rjlaptop> At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 11:47:14 2005 From: rj at maxxian.com (RJ Juneau) Date: Sun Jan 15 12:01:00 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c55181$549be0e0$6505a8c0@rjlaptop> Charlie, I found a fix. Here it is in case anyone else runs into this. You were correct - the problem is in another part of Zope. Based on your feedback, I did a bit more searching and found something here: http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. html The problem appears to be in Zope versions after 2.7.0. I'm running 2.7.6, and the post indicates that it also happens in 2.7.4. The solution: Edit file /lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. There are two lines in the file that start with . Edit them as follows: Change first line to: Change second line to: Just to be after, I shut down Zope before I made the changes and restarted it after. Thanks for the help! RJ -----Original Message----- From: RJ Juneau [mailto:rj@maxxian.com] Sent: May 5, 2005 9:22 AM To: 'Charlie Clark' Cc: 'egenix-users@lists.egenix.com' Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 17:57:25 2005 From: charlie at egenix.com (Charlie Clark) Date: Sun Jan 15 12:01:00 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <20050505165725.3380.2@bepc.1115296715.fake> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Thu May 5 09:15:21 2005 From: charlie at egenix.com (Charlie Clark) Date: Sun Jan 15 12:01:00 2006 Subject: [Zope-DB] RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <000001c55185$41477730$6b00a8c0@fonacier.local> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________ Zope-DB mailing list Zope-DB@zope.org http://mail.zope.org/mailman/listinfo/zope-db From rj at maxxian.com Thu May 5 12:38:00 2005 From: rj at maxxian.com (RJ Juneau) Date: Sun Jan 15 12:01:00 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000001c55188$6b841eb0$6505a8c0@rjlaptop> I just double-checked. Zope-2.7.6-final. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 12:49:16 2005 From: rj at maxxian.com (RJ Juneau) Date: Sun Jan 15 12:01:00 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000501c55189$fe149ba0$6505a8c0@rjlaptop> Charlie, The fix has only been applied for 2.7.7, 2.8b2. The info is in the original bug report which is closed and can be found here: http://www.zope.org/Collectors/Zope/1745 RJ -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Fri May 6 11:50:09 2005 From: rj at maxxian.com (RJ Juneau) Date: Sun Jan 15 12:01:00 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC Message-ID: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Still on eval for the product. I cannot get a stable connection to Sybase via the iODBC drivers. - The Sybase ODBC connection - including a query - have been verified at the iODBC level. - The setup is already working well for ODBC connection to MySQL. Symptoms include: - If I click on "Open Connection", it still comes back with "Connection Closed" when I go to a ZSQL method - Using 'Connect on Demand' is not working either. - Clicking "Open Connection" gives me the following error: Connection string: DSN=lixbox_sybase; UID=sa; PWD=XXXXXXX Connection pool entry: 0 Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection rejected by data source', 7952) The odbc.ini definition for DSN "lixbox_sybase" is as follows: [lixbox_sybase] JetFix = No NoRowSetSizeLimit = No Description = Test connection to listbox Options = LIXBOX DSQUERY = SQLSERVER TDSHOST = lixbox TDSPORT = 5000 TDSVER = 5.0 SQLSERVER_CATALOG = N CURSOR_SENSITIVITY = LOW UserName = sa Password = XXXXXXXX ServerType = Sybase 10/11/12 Driver = /opt/openlink/lib/sql_mt_lt.so Database = pubs2 ReadOnly = no NoAutoCommit = No NoLoginBox = No FetchBufferSize = 60 Other relevant data: - Connecting via OpenLink's iODBC - Zope 2.7.6-final - Python 2.3.4 - Connection to Sybase has been successfully tested with iODBC, including issuing a query - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC connection RJ Juneau Chief Technology Officer Maxxian Integration Inc. 155 Westhampton Drive Thornhill, Ontario Canada L4J 7X2 E-mail: rj@maxxian.com Phone: +1 905 482 9429 Cell: +1 416 897 6682 Toll free: +1 866 758 9161 Fax: +1 647 722 2038 -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050506/aef33361/attachment-0010.htm From mal at egenix.com Fri May 6 18:27:37 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 15 12:01:00 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC In-Reply-To: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> References: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Message-ID: <427B8CE9.1010601@egenix.com> RJ Juneau wrote: > Still on eval for the product. > > I cannot get a stable connection to Sybase via the iODBC drivers. > > - The Sybase ODBC connection - including a query - have been verified at > the iODBC level. > - The setup is already working well for ODBC connection to MySQL. > > Symptoms include: > > - If I click on "Open Connection", it still comes back with "Connection > Closed" when I go to a ZSQL method > - Using 'Connect on Demand' is not working either. > - Clicking "Open Connection" gives me the following error: > > Connection string: DSN=lixbox_sybase; > UID=sa; > PWD=XXXXXXX Try writing the connection string on one line and without whitespace. ODBC drivers sometimes have problems with this. > Connection pool entry: 0 > Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection > rejected by data source', 7952) This is a generic error that relates to authentication or firewall problems. It is possible that turning on ODBC tracing the ODBC manager will give more clues as to the real cause of the problem. > The odbc.ini definition for DSN "lixbox_sybase" is as follows: > > [lixbox_sybase] > JetFix = No > NoRowSetSizeLimit = No > Description = Test connection to listbox > Options = LIXBOX > DSQUERY = SQLSERVER > TDSHOST = lixbox > TDSPORT = 5000 > TDSVER = 5.0 > SQLSERVER_CATALOG = N > CURSOR_SENSITIVITY = LOW > UserName = sa > Password = XXXXXXXX > ServerType = Sybase 10/11/12 > Driver = /opt/openlink/lib/sql_mt_lt.so > Database = pubs2 > ReadOnly = no > NoAutoCommit = No > NoLoginBox = No > FetchBufferSize = 60 > > > Other relevant data: > - Connecting via OpenLink's iODBC > - Zope 2.7.6-final > - Python 2.3.4 > - Connection to Sybase has been successfully tested with iODBC, > including issuing a query > - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC > connection > > > > RJ Juneau > Chief Technology Officer > Maxxian Integration Inc. > 155 Westhampton Drive > Thornhill, Ontario > Canada L4J 7X2 > E-mail: rj@maxxian.com > Phone: +1 905 482 9429 > Cell: +1 416 897 6682 > Toll free: +1 866 758 9161 > Fax: +1 647 722 2038 > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 06 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From calisp at gmail.com Sun May 15 23:49:03 2005 From: calisp at gmail.com (calisp@gmail.com) Date: Sun Jan 15 12:01:00 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK Message-ID: Hi, I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the following error... 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the last phase of a two-phase commit. This shouldn't happen. Traceback (most recent call last): File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one jar.tpc_finish(self) File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish try: self._finish() File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could not perform COMMIT or ROLLBACK', 1023) What could be causing this? Can I get the mxODBCZopeDA source from somewhere? It would make debugging this much easier. Thanks, Calisp. From mal at egenix.com Mon May 16 13:52:12 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 15 12:01:00 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK In-Reply-To: References: Message-ID: <42887B5C.4010109@egenix.com> calisp@gmail.com wrote: > Hi, > > I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with > unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the > following error... > > 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the > last phase of a two-phase commit. This shouldn't happen. > Traceback (most recent call last): > File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one > jar.tpc_finish(self) > File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish > try: self._finish() > File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish > File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler > ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could > not perform COMMIT or ROLLBACK', 1023) You should have a look at the database logs to see what prevented the commit from being completed. > What could be causing this? Hard to say: mxODBCZopeDA is trying to commit the transaction, but the driver or database failed to complete the request. The above error was generated by the ODBC driver. This could be network or DNS problems, or be related to a bug in FreeTDS (which is getting more stable with every new release, but should still be considered beta quality software at the moment). > Can I get the mxODBCZopeDA source from > somewhere? It would make debugging this much easier. Getting the source is not an option and won't help much either since the source of the problem is not mxODBCZopeDA. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 16 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Sun May 1 21:29:25 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 15 16:00:52 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <427259F3.4090806@egenix.com> References: <20050427130906.52878.qmail@web30008.mail.mud.yahoo.com> <427259F3.4090806@egenix.com> Message-ID: <42752005.7080904@egenix.com> M.-A. Lemburg wrote: > David Rushby wrote: > >> --- "M.-A. Lemburg" wrote: >> >>> Are you using the standard mxDateTime build or one >>> with WANT_SUBCLASSABLE_TYPES defined... >> >> >> >> Presumably "the standard", since I just built with 'py24d setup.py >> build', making no attempt to enable special directives. >> >> >>> ... (mxDateTime_Deallocate is only used by the latter)? >> >> >> >> That's true in 2.1.0-2005-04-15, but not in 2.1.0b5. >> >> >>> In any case, please try our latest snapshot: >>> >>> >> >> http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-04-15.zip >> >>> to see if that makes any difference. >> >> >> >> I can't build it out of the box: > > > Hmm, looks like distutils' sdist command doesn't like our new > repository layout which uses symlinks (after we've switched to > subversion). > > We'll have to debug distutils first, I guess :-( Ok, we've found the problem and fixed it. Here's the new release (which does build out of the box at least on our boxes ;-): http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 01 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From davidrushby at yahoo.com Mon May 2 15:49:53 2005 From: davidrushby at yahoo.com (David Rushby) Date: Sun Jan 15 16:00:52 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Ok, we've found the problem and fixed it. Here's the new > release (which does build out of the box at least on our > boxes ;-): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip It does build now, but: py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" still behaves as it did when I submitted my original message: Fatal Python error: UNREF invalid object Aborted This is the same debug build of Python 2.4.1 that I was previously using, running the same configuration (CentOS Linux 4.0/i386, everything compiled with GCC 3.4.3). Have you examined my original claim as to the cause of the bug? __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 10:21:55 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 15 16:00:52 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> References: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> Message-ID: <42772693.8050306@egenix.com> David Rushby wrote: > --- "M.-A. Lemburg" wrote: > >>Ok, we've found the problem and fixed it. Here's the new >>release (which does build out of the box at least on our >>boxes ;-): >> >> > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip > > It does build now, but: > py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" > still behaves as it did when I submitted my original message: > Fatal Python error: UNREF invalid object > Aborted > > This is the same debug build of Python 2.4.1 that I was previously > using, running the same configuration (CentOS Linux 4.0/i386, > everything compiled with GCC 3.4.3). > > Have you examined my original claim as to the cause of the bug? No. We haven't had time for looking into it. I'm not sure whether your analysis of the problem is correct: if you don't define WANT_SUBCLASSABLE_TYPES, the API mxDateTime_Deallocate() is neither defined nor used. Furthermore, PyObject_Del() is only called by mxDateTime_Free() if you have explicitely edited mxDateTime.c to disabled the free list #defines. In a standard build, PyObject_Del() is only called at module finalization time. Note that the reason we call mxDateTime_Free() in the constructor is that we don't want the destructor of the object to be called. Py_DECREF() would call the destructor (mxDateTime_Deallocate). It is possible that the debug code in Python complains about the refcount in the object not being 0 at the time the object is finalized (module finalization time), but I don't see any such checks in PyObject_Free() (which is what PyObject_Del() maps to). Again, all of this does not happen in regular non-debug Python builds. Please be aware that we don't support debug builds, so fixing the problem (if there is one - gcc has some serious optimization problems on some combinations of platform and version) will take a while. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 09:27:37 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Sun Jan 15 16:00:52 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 Message-ID: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Hi all- I am trying to build the mx-base package, v.2.0.6. This will be used with postgresql 7.3.9, psycopg 1.1.18, and Roundup 0.8.2. RHEL 3.0 Python 2.3 egenix-mx-base-2.0.6.tar.gz I performed a: /usr/local/bin/python2.3 setup.py install Everything looks proper with the exeception of this series of warning statements: ----------------- gcc -pthread -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fno-strict-aliasing -fPIC -Imx/BeeBase/mxBeeBase -I/usr/local/incl ude/python2.3 -I/usr/local/include -c mx/BeeBase/mxBeeBase/btr.c -o build/temp.linux-i686-2.3/mx/BeeBase/mxBeeBase/mxBeeBa se/mx/BeeBase/mxBeeBase/btr.o mx/BeeBase/mxBeeBase/btr.c: In function `dumpBuf': mx/BeeBase/mxBeeBase/btr.c:249: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:250: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:255: warning: unsigned int format, long unsigned int arg (arg 4) mx/BeeBase/mxBeeBase/btr.c:256: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c: In function `_validateTree': mx/BeeBase/mxBeeBase/btr.c:330: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:337: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:339: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:349: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:351: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 3) creating build/lib.linux-i686-2.3/mx/BeeBase creating build/lib.linux-i686-2.3/mx/BeeBase/mxBeeBase -------------- Would someone be kind enough to let me know whether these messages were expected, and if not, how I might resolve these? Thanks! DC __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 22:06:33 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 15 16:00:52 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> References: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Message-ID: <4277CBB9.8020302@egenix.com> Dianne Chen wrote: > Hi all- > > I am trying to build the mx-base package, v.2.0.6. > This will be used with postgresql 7.3.9, psycopg > 1.1.18, and Roundup 0.8.2. > > RHEL 3.0 > Python 2.3 > egenix-mx-base-2.0.6.tar.gz > > I performed a: > > /usr/local/bin/python2.3 setup.py install > > Everything looks proper with the exeception of this > series of warning statements: > > ----------------- > ... > -------------- > > Would someone be kind enough to let me know whether > these messages were expected, and if not, how I might > resolve these? These warning can safely be ignored. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 13:41:14 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Sun Jan 15 16:00:52 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: 6667 Message-ID: <20050503194114.72091.qmail@web31414.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Dianne Chen wrote: > > Hi all- > > > > I am trying to build the mx-base package, v.2.0.6. > > This will be used with postgresql 7.3.9, psycopg > > 1.1.18, and Roundup 0.8.2. > > > > RHEL 3.0 > > Python 2.3 > > egenix-mx-base-2.0.6.tar.gz > > > > I performed a: > > > > /usr/local/bin/python2.3 setup.py install > > > > Everything looks proper with the exeception of > this > > series of warning statements: > > > > ----------------- > > ... > > -------------- > > > > Would someone be kind enough to let me know > whether > > these messages were expected, and if not, how I > might > > resolve these? > > These warning can safely be ignored. > > -- > Marc-Andre Lemburg > eGenix.com > Marc- Thank you very much for the reply. It helps greatly. With kind regards, DC __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From davidrushby at yahoo.com Tue May 3 17:18:46 2005 From: davidrushby at yahoo.com (David Rushby) Date: Sun Jan 15 16:00:52 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050503231846.35012.qmail@web30009.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > I'm not sure whether your analysis of the problem is correct... Indeed, my original analysis wasn't correct; I think this one is. The fatal error I'm complaining about only arises if the arguments to DateTime.DateTime are invalid, so that the object is deallocated in the onError block of mxDateTime_FromDateAndTime. If the object is created successfully, and later deallocated by Python's garbage collector, the fatal error doesn't arise. Here's my analysis of the problem: --- If the debugging directive Py_TRACE_REFS is enabled, as it is in my case, the Python interpreter maintains a doubly linked list of all Python objects (named refchain) via the _ob_next and _ob_prev pointers added to PyObject via _PyObject_HEAD_EXTRA. Each object is inserted into refchain by the _Py_AddToAllObjects call in _Py_NewReference, and removed from refchain by the _Py_ForgetReference call in _Py_Dealloc. _Py_ForgetReference performs an integrity check on the object being deallocated (op) to make sure that its neighbors in refchain recognize it. Specifically, _Py_ForgetReference verifies that the _ob_next pointer of the previous object in refchain (op->_ob_prev->_ob_next) points to op, and that the _ob_prev pointer of the next object in refchain (op->_ob_next->_ob_prev) points to op. If either of those conditions is false, the interpreter raises the fatal error I'm seeing. After mxDateTime_New pulls an mxDateTimeObject out of the free list, it calls _Py_NewReference on that object to transform it from a "conceptually deallocated" object to a "conceptually allocated" one. _Py_NewReference inserts the object into refchain. Later, when the object is being "conceptually deallocated", it should be removed from refchain with _Py_ForgetReference. The version of _Py_Dealloc that's active when Py_TRACE_REFS is enabled does this (_Py_Dealloc is the element of Py_DECREF that performs the actual destruction). _Py_Dealloc first calls _Py_ForgetReference to remove the object from refchain, then calls the object's destructor (op->ob_type->tp_dealloc). If WANT_SUBCLASSABLE_TYPES is not defined (it is not in my case), the destructor for mxDateTime_Type is mxDateTime_Free. So, if a DateTime object is deallocated normally, as a result of its reference count falling to zero, _Py_Dealloc is called on the object, which first removes it from refchain, then passes it to mxDateTime_Free. If a DateTime object is destroyed prematurely, as a result of invalid arguments to its destructor, the onError handler calls mxDateTime_Free, so the object is "conceptually deallocated" (placed in the free list), *but* the object is not removed from refchain. So if a refchain-membership-integrity-check is performed on the object in question or one of its immediate neighbors in refchain, that integrity check fails, leading to the fatal error. --- The solution is to 'Py_DECREF(...)' the object in the onError handler of its constructor, instead of passing the object directly to mxDateTime_Free. That change solves two problems: 1) It causes _Py_Dealloc to execute, which in turn executes _Py_ForgetReference, so the object is removed from refchain, as it should be. 2) At present, objects that are created successfully and later deallocated by normal reference count mechanics have a reference count of 0 when they enter the free list, whereas objects whose constructors abort their creation due to invalid arguments have a reference count of 1 when they enter the free list. Although AFAIK this doesn't cause an actual execution problem (because the object's reference count is *explicitly set to 1* rather than *incremented by 1* when the object is later "conceptually allocated" by _Py_NewReference), it is likely to confuse future maintainers and thereby lead to the introduction of an actual execution problem. I assume that if you agree that this is a reasonable solution, you'll want to apply the change not only to mxDateTime_FromDateAndTime, but to all similar constructors in mxDateTime.c. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From rj at maxxian.com Thu May 5 01:57:40 2005 From: rj at maxxian.com (RJ Juneau) Date: Sun Jan 15 16:00:52 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c5512e$f72798c0$6505a8c0@rjlaptop> I'm on the 30 day evaluation for mxodbc_zope_da. I'm getting the following error when I submit some queries: Error Type: KeyError Error Value: 'query' I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 with UCS4. The error seems to be caused by multiple rows being returned. I did see an earlier posting with the same error message. The response suggested a template error, but this is clearly not the case here. The additional evidence I've gathered so far: - I'm running the test directly from the ZSQL method, so there's no template involved. - If I use the same query with an additional "where" clause to ensure that only one row is returned, it works - If I use a value in the 'where' clause with no rows returned, it works - The same ZSQL query is being used on a Windows machine running Zope and the free ZODBC module without a problem - The query has been verified directly in mysql-client-browser Other info: - The database is MySQL 4.1.10A-0 - iODBC is the DB driver RJ Juneau -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050505/68d278bf/attachment-0011.htm From mal at egenix.com Thu May 5 12:37:43 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 15 16:00:52 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c5512e$f72798c0$6505a8c0@rjlaptop> References: <000301c5512e$f72798c0$6505a8c0@rjlaptop> Message-ID: <4279E967.6010904@egenix.com> RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 > with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 09:37:42 2005 From: rj at maxxian.com (RJ Juneau) Date: Sun Jan 15 16:00:52 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000101c5516f$3b96de90$6505a8c0@rjlaptop> More interesting info on the problem: If I execute the query directly in the "test" window of the base eGenix mxODBC Database Connection window, it works fine and returns the 20 lines expected. That could point to a problem in the rendering, which seems to be where the traceback ends. Note that within the same Zope system I also have an ODBC connection to a Sybase database, and I have successfully tested multi-line ZSQL queries there. This is the traceback: Time 2005/05/05 07:55:15.294 GMT-4 Exception Type KeyError Exception Value 'query' Traceback (innermost last): Module ZPublisher.Publish, line 101, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 39, in call_object Module Shared.DC.ZRDB.DA, line 337, in manage_test Module DocumentTemplate.DT_String, line 474, in __call__ Module DocumentTemplate.DT_In, line 602, in renderwb Module DocumentTemplate.DT_Var, line 219, in render KeyError: 'query' I don't think the following is an issue, but I'll include it for completeness.I am also getting the following iODBC warnings and errors in the Zope console log, which are related to the ODBC parameters being passed by iODBC. Note that these errors also appear for all of the successful queries. [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (Setup). [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (UsageCount). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Timeout). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Reuse). As for the ZSQL snippet from the template... Since there's no template involved yet (I'm still testing directly from the ZSQL method), I assume you mean the SQL code? select h.host_name, s.system_name, s.system_handle, count(*) from terminal t, system_map s, host h where t.system_index = s.system_index and s.host_index = h.host_index group by s.system_name order by h.host_name Nothing complicated here. There are no parameters passed to the query. RJ -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: May 5, 2005 5:38 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: Re: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is > 2.3.4 with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ---------------------------------------------------------------------- > -- > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 16:00:32 2005 From: charlie at egenix.com (Charlie Clark) Date: Sun Jan 15 16:00:52 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000101c5516f$3b96de90$6505a8c0@rjlaptop> References: <000101c5516f$3b96de90$6505a8c0@rjlaptop> Message-ID: <20050505150032.644.1@bepc.1115296715.fake> On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base eGenix > mxODBC Database Connection window, it works fine and returns the 20 > lines expected. That could point to a problem in the rendering, which > seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection to > a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 10:22:17 2005 From: rj at maxxian.com (RJ Juneau) Date: Sun Jan 15 16:00:52 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505150032.644.1@bepc.1115296715.fake> Message-ID: <000201c55175$75bcad10$6505a8c0@rjlaptop> At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 11:47:14 2005 From: rj at maxxian.com (RJ Juneau) Date: Sun Jan 15 16:00:52 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c55181$549be0e0$6505a8c0@rjlaptop> Charlie, I found a fix. Here it is in case anyone else runs into this. You were correct - the problem is in another part of Zope. Based on your feedback, I did a bit more searching and found something here: http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. html The problem appears to be in Zope versions after 2.7.0. I'm running 2.7.6, and the post indicates that it also happens in 2.7.4. The solution: Edit file /lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. There are two lines in the file that start with . Edit them as follows: Change first line to: Change second line to: Just to be after, I shut down Zope before I made the changes and restarted it after. Thanks for the help! RJ -----Original Message----- From: RJ Juneau [mailto:rj@maxxian.com] Sent: May 5, 2005 9:22 AM To: 'Charlie Clark' Cc: 'egenix-users@lists.egenix.com' Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 17:57:25 2005 From: charlie at egenix.com (Charlie Clark) Date: Sun Jan 15 16:00:52 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <20050505165725.3380.2@bepc.1115296715.fake> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Thu May 5 09:15:21 2005 From: charlie at egenix.com (Charlie Clark) Date: Sun Jan 15 16:00:52 2006 Subject: [Zope-DB] RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <000001c55185$41477730$6b00a8c0@fonacier.local> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________ Zope-DB mailing list Zope-DB@zope.org http://mail.zope.org/mailman/listinfo/zope-db From rj at maxxian.com Thu May 5 12:38:00 2005 From: rj at maxxian.com (RJ Juneau) Date: Sun Jan 15 16:00:52 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000001c55188$6b841eb0$6505a8c0@rjlaptop> I just double-checked. Zope-2.7.6-final. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 12:49:16 2005 From: rj at maxxian.com (RJ Juneau) Date: Sun Jan 15 16:00:53 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000501c55189$fe149ba0$6505a8c0@rjlaptop> Charlie, The fix has only been applied for 2.7.7, 2.8b2. The info is in the original bug report which is closed and can be found here: http://www.zope.org/Collectors/Zope/1745 RJ -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Fri May 6 11:50:09 2005 From: rj at maxxian.com (RJ Juneau) Date: Sun Jan 15 16:00:53 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC Message-ID: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Still on eval for the product. I cannot get a stable connection to Sybase via the iODBC drivers. - The Sybase ODBC connection - including a query - have been verified at the iODBC level. - The setup is already working well for ODBC connection to MySQL. Symptoms include: - If I click on "Open Connection", it still comes back with "Connection Closed" when I go to a ZSQL method - Using 'Connect on Demand' is not working either. - Clicking "Open Connection" gives me the following error: Connection string: DSN=lixbox_sybase; UID=sa; PWD=XXXXXXX Connection pool entry: 0 Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection rejected by data source', 7952) The odbc.ini definition for DSN "lixbox_sybase" is as follows: [lixbox_sybase] JetFix = No NoRowSetSizeLimit = No Description = Test connection to listbox Options = LIXBOX DSQUERY = SQLSERVER TDSHOST = lixbox TDSPORT = 5000 TDSVER = 5.0 SQLSERVER_CATALOG = N CURSOR_SENSITIVITY = LOW UserName = sa Password = XXXXXXXX ServerType = Sybase 10/11/12 Driver = /opt/openlink/lib/sql_mt_lt.so Database = pubs2 ReadOnly = no NoAutoCommit = No NoLoginBox = No FetchBufferSize = 60 Other relevant data: - Connecting via OpenLink's iODBC - Zope 2.7.6-final - Python 2.3.4 - Connection to Sybase has been successfully tested with iODBC, including issuing a query - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC connection RJ Juneau Chief Technology Officer Maxxian Integration Inc. 155 Westhampton Drive Thornhill, Ontario Canada L4J 7X2 E-mail: rj@maxxian.com Phone: +1 905 482 9429 Cell: +1 416 897 6682 Toll free: +1 866 758 9161 Fax: +1 647 722 2038 -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050506/aef33361/attachment-0011.htm From mal at egenix.com Fri May 6 18:27:37 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 15 16:00:53 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC In-Reply-To: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> References: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Message-ID: <427B8CE9.1010601@egenix.com> RJ Juneau wrote: > Still on eval for the product. > > I cannot get a stable connection to Sybase via the iODBC drivers. > > - The Sybase ODBC connection - including a query - have been verified at > the iODBC level. > - The setup is already working well for ODBC connection to MySQL. > > Symptoms include: > > - If I click on "Open Connection", it still comes back with "Connection > Closed" when I go to a ZSQL method > - Using 'Connect on Demand' is not working either. > - Clicking "Open Connection" gives me the following error: > > Connection string: DSN=lixbox_sybase; > UID=sa; > PWD=XXXXXXX Try writing the connection string on one line and without whitespace. ODBC drivers sometimes have problems with this. > Connection pool entry: 0 > Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection > rejected by data source', 7952) This is a generic error that relates to authentication or firewall problems. It is possible that turning on ODBC tracing the ODBC manager will give more clues as to the real cause of the problem. > The odbc.ini definition for DSN "lixbox_sybase" is as follows: > > [lixbox_sybase] > JetFix = No > NoRowSetSizeLimit = No > Description = Test connection to listbox > Options = LIXBOX > DSQUERY = SQLSERVER > TDSHOST = lixbox > TDSPORT = 5000 > TDSVER = 5.0 > SQLSERVER_CATALOG = N > CURSOR_SENSITIVITY = LOW > UserName = sa > Password = XXXXXXXX > ServerType = Sybase 10/11/12 > Driver = /opt/openlink/lib/sql_mt_lt.so > Database = pubs2 > ReadOnly = no > NoAutoCommit = No > NoLoginBox = No > FetchBufferSize = 60 > > > Other relevant data: > - Connecting via OpenLink's iODBC > - Zope 2.7.6-final > - Python 2.3.4 > - Connection to Sybase has been successfully tested with iODBC, > including issuing a query > - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC > connection > > > > RJ Juneau > Chief Technology Officer > Maxxian Integration Inc. > 155 Westhampton Drive > Thornhill, Ontario > Canada L4J 7X2 > E-mail: rj@maxxian.com > Phone: +1 905 482 9429 > Cell: +1 416 897 6682 > Toll free: +1 866 758 9161 > Fax: +1 647 722 2038 > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 06 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From calisp at gmail.com Sun May 15 23:49:03 2005 From: calisp at gmail.com (calisp@gmail.com) Date: Sun Jan 15 16:00:53 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK Message-ID: Hi, I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the following error... 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the last phase of a two-phase commit. This shouldn't happen. Traceback (most recent call last): File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one jar.tpc_finish(self) File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish try: self._finish() File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could not perform COMMIT or ROLLBACK', 1023) What could be causing this? Can I get the mxODBCZopeDA source from somewhere? It would make debugging this much easier. Thanks, Calisp. From mal at egenix.com Mon May 16 13:52:12 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 15 16:00:53 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK In-Reply-To: References: Message-ID: <42887B5C.4010109@egenix.com> calisp@gmail.com wrote: > Hi, > > I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with > unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the > following error... > > 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the > last phase of a two-phase commit. This shouldn't happen. > Traceback (most recent call last): > File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one > jar.tpc_finish(self) > File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish > try: self._finish() > File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish > File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler > ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could > not perform COMMIT or ROLLBACK', 1023) You should have a look at the database logs to see what prevented the commit from being completed. > What could be causing this? Hard to say: mxODBCZopeDA is trying to commit the transaction, but the driver or database failed to complete the request. The above error was generated by the ODBC driver. This could be network or DNS problems, or be related to a bug in FreeTDS (which is getting more stable with every new release, but should still be considered beta quality software at the moment). > Can I get the mxODBCZopeDA source from > somewhere? It would make debugging this much easier. Getting the source is not an option and won't help much either since the source of the problem is not mxODBCZopeDA. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 16 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Sun May 1 21:29:25 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 15 20:00:51 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <427259F3.4090806@egenix.com> References: <20050427130906.52878.qmail@web30008.mail.mud.yahoo.com> <427259F3.4090806@egenix.com> Message-ID: <42752005.7080904@egenix.com> M.-A. Lemburg wrote: > David Rushby wrote: > >> --- "M.-A. Lemburg" wrote: >> >>> Are you using the standard mxDateTime build or one >>> with WANT_SUBCLASSABLE_TYPES defined... >> >> >> >> Presumably "the standard", since I just built with 'py24d setup.py >> build', making no attempt to enable special directives. >> >> >>> ... (mxDateTime_Deallocate is only used by the latter)? >> >> >> >> That's true in 2.1.0-2005-04-15, but not in 2.1.0b5. >> >> >>> In any case, please try our latest snapshot: >>> >>> >> >> http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-04-15.zip >> >>> to see if that makes any difference. >> >> >> >> I can't build it out of the box: > > > Hmm, looks like distutils' sdist command doesn't like our new > repository layout which uses symlinks (after we've switched to > subversion). > > We'll have to debug distutils first, I guess :-( Ok, we've found the problem and fixed it. Here's the new release (which does build out of the box at least on our boxes ;-): http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 01 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From davidrushby at yahoo.com Mon May 2 15:49:53 2005 From: davidrushby at yahoo.com (David Rushby) Date: Sun Jan 15 20:00:51 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Ok, we've found the problem and fixed it. Here's the new > release (which does build out of the box at least on our > boxes ;-): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip It does build now, but: py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" still behaves as it did when I submitted my original message: Fatal Python error: UNREF invalid object Aborted This is the same debug build of Python 2.4.1 that I was previously using, running the same configuration (CentOS Linux 4.0/i386, everything compiled with GCC 3.4.3). Have you examined my original claim as to the cause of the bug? __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 10:21:55 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 15 20:00:51 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> References: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> Message-ID: <42772693.8050306@egenix.com> David Rushby wrote: > --- "M.-A. Lemburg" wrote: > >>Ok, we've found the problem and fixed it. Here's the new >>release (which does build out of the box at least on our >>boxes ;-): >> >> > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip > > It does build now, but: > py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" > still behaves as it did when I submitted my original message: > Fatal Python error: UNREF invalid object > Aborted > > This is the same debug build of Python 2.4.1 that I was previously > using, running the same configuration (CentOS Linux 4.0/i386, > everything compiled with GCC 3.4.3). > > Have you examined my original claim as to the cause of the bug? No. We haven't had time for looking into it. I'm not sure whether your analysis of the problem is correct: if you don't define WANT_SUBCLASSABLE_TYPES, the API mxDateTime_Deallocate() is neither defined nor used. Furthermore, PyObject_Del() is only called by mxDateTime_Free() if you have explicitely edited mxDateTime.c to disabled the free list #defines. In a standard build, PyObject_Del() is only called at module finalization time. Note that the reason we call mxDateTime_Free() in the constructor is that we don't want the destructor of the object to be called. Py_DECREF() would call the destructor (mxDateTime_Deallocate). It is possible that the debug code in Python complains about the refcount in the object not being 0 at the time the object is finalized (module finalization time), but I don't see any such checks in PyObject_Free() (which is what PyObject_Del() maps to). Again, all of this does not happen in regular non-debug Python builds. Please be aware that we don't support debug builds, so fixing the problem (if there is one - gcc has some serious optimization problems on some combinations of platform and version) will take a while. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 09:27:37 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Sun Jan 15 20:00:51 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 Message-ID: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Hi all- I am trying to build the mx-base package, v.2.0.6. This will be used with postgresql 7.3.9, psycopg 1.1.18, and Roundup 0.8.2. RHEL 3.0 Python 2.3 egenix-mx-base-2.0.6.tar.gz I performed a: /usr/local/bin/python2.3 setup.py install Everything looks proper with the exeception of this series of warning statements: ----------------- gcc -pthread -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fno-strict-aliasing -fPIC -Imx/BeeBase/mxBeeBase -I/usr/local/incl ude/python2.3 -I/usr/local/include -c mx/BeeBase/mxBeeBase/btr.c -o build/temp.linux-i686-2.3/mx/BeeBase/mxBeeBase/mxBeeBa se/mx/BeeBase/mxBeeBase/btr.o mx/BeeBase/mxBeeBase/btr.c: In function `dumpBuf': mx/BeeBase/mxBeeBase/btr.c:249: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:250: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:255: warning: unsigned int format, long unsigned int arg (arg 4) mx/BeeBase/mxBeeBase/btr.c:256: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c: In function `_validateTree': mx/BeeBase/mxBeeBase/btr.c:330: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:337: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:339: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:349: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:351: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 3) creating build/lib.linux-i686-2.3/mx/BeeBase creating build/lib.linux-i686-2.3/mx/BeeBase/mxBeeBase -------------- Would someone be kind enough to let me know whether these messages were expected, and if not, how I might resolve these? Thanks! DC __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 22:06:33 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 15 20:00:51 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> References: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Message-ID: <4277CBB9.8020302@egenix.com> Dianne Chen wrote: > Hi all- > > I am trying to build the mx-base package, v.2.0.6. > This will be used with postgresql 7.3.9, psycopg > 1.1.18, and Roundup 0.8.2. > > RHEL 3.0 > Python 2.3 > egenix-mx-base-2.0.6.tar.gz > > I performed a: > > /usr/local/bin/python2.3 setup.py install > > Everything looks proper with the exeception of this > series of warning statements: > > ----------------- > ... > -------------- > > Would someone be kind enough to let me know whether > these messages were expected, and if not, how I might > resolve these? These warning can safely be ignored. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 13:41:14 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Sun Jan 15 20:00:51 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: 6667 Message-ID: <20050503194114.72091.qmail@web31414.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Dianne Chen wrote: > > Hi all- > > > > I am trying to build the mx-base package, v.2.0.6. > > This will be used with postgresql 7.3.9, psycopg > > 1.1.18, and Roundup 0.8.2. > > > > RHEL 3.0 > > Python 2.3 > > egenix-mx-base-2.0.6.tar.gz > > > > I performed a: > > > > /usr/local/bin/python2.3 setup.py install > > > > Everything looks proper with the exeception of > this > > series of warning statements: > > > > ----------------- > > ... > > -------------- > > > > Would someone be kind enough to let me know > whether > > these messages were expected, and if not, how I > might > > resolve these? > > These warning can safely be ignored. > > -- > Marc-Andre Lemburg > eGenix.com > Marc- Thank you very much for the reply. It helps greatly. With kind regards, DC __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From davidrushby at yahoo.com Tue May 3 17:18:46 2005 From: davidrushby at yahoo.com (David Rushby) Date: Sun Jan 15 20:00:51 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050503231846.35012.qmail@web30009.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > I'm not sure whether your analysis of the problem is correct... Indeed, my original analysis wasn't correct; I think this one is. The fatal error I'm complaining about only arises if the arguments to DateTime.DateTime are invalid, so that the object is deallocated in the onError block of mxDateTime_FromDateAndTime. If the object is created successfully, and later deallocated by Python's garbage collector, the fatal error doesn't arise. Here's my analysis of the problem: --- If the debugging directive Py_TRACE_REFS is enabled, as it is in my case, the Python interpreter maintains a doubly linked list of all Python objects (named refchain) via the _ob_next and _ob_prev pointers added to PyObject via _PyObject_HEAD_EXTRA. Each object is inserted into refchain by the _Py_AddToAllObjects call in _Py_NewReference, and removed from refchain by the _Py_ForgetReference call in _Py_Dealloc. _Py_ForgetReference performs an integrity check on the object being deallocated (op) to make sure that its neighbors in refchain recognize it. Specifically, _Py_ForgetReference verifies that the _ob_next pointer of the previous object in refchain (op->_ob_prev->_ob_next) points to op, and that the _ob_prev pointer of the next object in refchain (op->_ob_next->_ob_prev) points to op. If either of those conditions is false, the interpreter raises the fatal error I'm seeing. After mxDateTime_New pulls an mxDateTimeObject out of the free list, it calls _Py_NewReference on that object to transform it from a "conceptually deallocated" object to a "conceptually allocated" one. _Py_NewReference inserts the object into refchain. Later, when the object is being "conceptually deallocated", it should be removed from refchain with _Py_ForgetReference. The version of _Py_Dealloc that's active when Py_TRACE_REFS is enabled does this (_Py_Dealloc is the element of Py_DECREF that performs the actual destruction). _Py_Dealloc first calls _Py_ForgetReference to remove the object from refchain, then calls the object's destructor (op->ob_type->tp_dealloc). If WANT_SUBCLASSABLE_TYPES is not defined (it is not in my case), the destructor for mxDateTime_Type is mxDateTime_Free. So, if a DateTime object is deallocated normally, as a result of its reference count falling to zero, _Py_Dealloc is called on the object, which first removes it from refchain, then passes it to mxDateTime_Free. If a DateTime object is destroyed prematurely, as a result of invalid arguments to its destructor, the onError handler calls mxDateTime_Free, so the object is "conceptually deallocated" (placed in the free list), *but* the object is not removed from refchain. So if a refchain-membership-integrity-check is performed on the object in question or one of its immediate neighbors in refchain, that integrity check fails, leading to the fatal error. --- The solution is to 'Py_DECREF(...)' the object in the onError handler of its constructor, instead of passing the object directly to mxDateTime_Free. That change solves two problems: 1) It causes _Py_Dealloc to execute, which in turn executes _Py_ForgetReference, so the object is removed from refchain, as it should be. 2) At present, objects that are created successfully and later deallocated by normal reference count mechanics have a reference count of 0 when they enter the free list, whereas objects whose constructors abort their creation due to invalid arguments have a reference count of 1 when they enter the free list. Although AFAIK this doesn't cause an actual execution problem (because the object's reference count is *explicitly set to 1* rather than *incremented by 1* when the object is later "conceptually allocated" by _Py_NewReference), it is likely to confuse future maintainers and thereby lead to the introduction of an actual execution problem. I assume that if you agree that this is a reasonable solution, you'll want to apply the change not only to mxDateTime_FromDateAndTime, but to all similar constructors in mxDateTime.c. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From rj at maxxian.com Thu May 5 01:57:40 2005 From: rj at maxxian.com (RJ Juneau) Date: Sun Jan 15 20:00:51 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c5512e$f72798c0$6505a8c0@rjlaptop> I'm on the 30 day evaluation for mxodbc_zope_da. I'm getting the following error when I submit some queries: Error Type: KeyError Error Value: 'query' I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 with UCS4. The error seems to be caused by multiple rows being returned. I did see an earlier posting with the same error message. The response suggested a template error, but this is clearly not the case here. The additional evidence I've gathered so far: - I'm running the test directly from the ZSQL method, so there's no template involved. - If I use the same query with an additional "where" clause to ensure that only one row is returned, it works - If I use a value in the 'where' clause with no rows returned, it works - The same ZSQL query is being used on a Windows machine running Zope and the free ZODBC module without a problem - The query has been verified directly in mysql-client-browser Other info: - The database is MySQL 4.1.10A-0 - iODBC is the DB driver RJ Juneau -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050505/68d278bf/attachment-0012.htm From mal at egenix.com Thu May 5 12:37:43 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 15 20:00:51 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c5512e$f72798c0$6505a8c0@rjlaptop> References: <000301c5512e$f72798c0$6505a8c0@rjlaptop> Message-ID: <4279E967.6010904@egenix.com> RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 > with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 09:37:42 2005 From: rj at maxxian.com (RJ Juneau) Date: Sun Jan 15 20:00:51 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000101c5516f$3b96de90$6505a8c0@rjlaptop> More interesting info on the problem: If I execute the query directly in the "test" window of the base eGenix mxODBC Database Connection window, it works fine and returns the 20 lines expected. That could point to a problem in the rendering, which seems to be where the traceback ends. Note that within the same Zope system I also have an ODBC connection to a Sybase database, and I have successfully tested multi-line ZSQL queries there. This is the traceback: Time 2005/05/05 07:55:15.294 GMT-4 Exception Type KeyError Exception Value 'query' Traceback (innermost last): Module ZPublisher.Publish, line 101, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 39, in call_object Module Shared.DC.ZRDB.DA, line 337, in manage_test Module DocumentTemplate.DT_String, line 474, in __call__ Module DocumentTemplate.DT_In, line 602, in renderwb Module DocumentTemplate.DT_Var, line 219, in render KeyError: 'query' I don't think the following is an issue, but I'll include it for completeness.I am also getting the following iODBC warnings and errors in the Zope console log, which are related to the ODBC parameters being passed by iODBC. Note that these errors also appear for all of the successful queries. [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (Setup). [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (UsageCount). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Timeout). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Reuse). As for the ZSQL snippet from the template... Since there's no template involved yet (I'm still testing directly from the ZSQL method), I assume you mean the SQL code? select h.host_name, s.system_name, s.system_handle, count(*) from terminal t, system_map s, host h where t.system_index = s.system_index and s.host_index = h.host_index group by s.system_name order by h.host_name Nothing complicated here. There are no parameters passed to the query. RJ -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: May 5, 2005 5:38 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: Re: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is > 2.3.4 with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ---------------------------------------------------------------------- > -- > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 16:00:32 2005 From: charlie at egenix.com (Charlie Clark) Date: Sun Jan 15 20:00:51 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000101c5516f$3b96de90$6505a8c0@rjlaptop> References: <000101c5516f$3b96de90$6505a8c0@rjlaptop> Message-ID: <20050505150032.644.1@bepc.1115296715.fake> On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base eGenix > mxODBC Database Connection window, it works fine and returns the 20 > lines expected. That could point to a problem in the rendering, which > seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection to > a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 10:22:17 2005 From: rj at maxxian.com (RJ Juneau) Date: Sun Jan 15 20:00:51 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505150032.644.1@bepc.1115296715.fake> Message-ID: <000201c55175$75bcad10$6505a8c0@rjlaptop> At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 11:47:14 2005 From: rj at maxxian.com (RJ Juneau) Date: Sun Jan 15 20:00:51 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c55181$549be0e0$6505a8c0@rjlaptop> Charlie, I found a fix. Here it is in case anyone else runs into this. You were correct - the problem is in another part of Zope. Based on your feedback, I did a bit more searching and found something here: http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. html The problem appears to be in Zope versions after 2.7.0. I'm running 2.7.6, and the post indicates that it also happens in 2.7.4. The solution: Edit file /lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. There are two lines in the file that start with . Edit them as follows: Change first line to: Change second line to: Just to be after, I shut down Zope before I made the changes and restarted it after. Thanks for the help! RJ -----Original Message----- From: RJ Juneau [mailto:rj@maxxian.com] Sent: May 5, 2005 9:22 AM To: 'Charlie Clark' Cc: 'egenix-users@lists.egenix.com' Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 17:57:25 2005 From: charlie at egenix.com (Charlie Clark) Date: Sun Jan 15 20:00:51 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <20050505165725.3380.2@bepc.1115296715.fake> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Thu May 5 09:15:21 2005 From: charlie at egenix.com (Charlie Clark) Date: Sun Jan 15 20:00:52 2006 Subject: [Zope-DB] RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <000001c55185$41477730$6b00a8c0@fonacier.local> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________ Zope-DB mailing list Zope-DB@zope.org http://mail.zope.org/mailman/listinfo/zope-db From rj at maxxian.com Thu May 5 12:38:00 2005 From: rj at maxxian.com (RJ Juneau) Date: Sun Jan 15 20:00:52 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000001c55188$6b841eb0$6505a8c0@rjlaptop> I just double-checked. Zope-2.7.6-final. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 12:49:16 2005 From: rj at maxxian.com (RJ Juneau) Date: Sun Jan 15 20:00:52 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000501c55189$fe149ba0$6505a8c0@rjlaptop> Charlie, The fix has only been applied for 2.7.7, 2.8b2. The info is in the original bug report which is closed and can be found here: http://www.zope.org/Collectors/Zope/1745 RJ -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Fri May 6 11:50:09 2005 From: rj at maxxian.com (RJ Juneau) Date: Sun Jan 15 20:00:52 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC Message-ID: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Still on eval for the product. I cannot get a stable connection to Sybase via the iODBC drivers. - The Sybase ODBC connection - including a query - have been verified at the iODBC level. - The setup is already working well for ODBC connection to MySQL. Symptoms include: - If I click on "Open Connection", it still comes back with "Connection Closed" when I go to a ZSQL method - Using 'Connect on Demand' is not working either. - Clicking "Open Connection" gives me the following error: Connection string: DSN=lixbox_sybase; UID=sa; PWD=XXXXXXX Connection pool entry: 0 Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection rejected by data source', 7952) The odbc.ini definition for DSN "lixbox_sybase" is as follows: [lixbox_sybase] JetFix = No NoRowSetSizeLimit = No Description = Test connection to listbox Options = LIXBOX DSQUERY = SQLSERVER TDSHOST = lixbox TDSPORT = 5000 TDSVER = 5.0 SQLSERVER_CATALOG = N CURSOR_SENSITIVITY = LOW UserName = sa Password = XXXXXXXX ServerType = Sybase 10/11/12 Driver = /opt/openlink/lib/sql_mt_lt.so Database = pubs2 ReadOnly = no NoAutoCommit = No NoLoginBox = No FetchBufferSize = 60 Other relevant data: - Connecting via OpenLink's iODBC - Zope 2.7.6-final - Python 2.3.4 - Connection to Sybase has been successfully tested with iODBC, including issuing a query - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC connection RJ Juneau Chief Technology Officer Maxxian Integration Inc. 155 Westhampton Drive Thornhill, Ontario Canada L4J 7X2 E-mail: rj@maxxian.com Phone: +1 905 482 9429 Cell: +1 416 897 6682 Toll free: +1 866 758 9161 Fax: +1 647 722 2038 -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050506/aef33361/attachment-0012.htm From mal at egenix.com Fri May 6 18:27:37 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 15 20:00:52 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC In-Reply-To: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> References: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Message-ID: <427B8CE9.1010601@egenix.com> RJ Juneau wrote: > Still on eval for the product. > > I cannot get a stable connection to Sybase via the iODBC drivers. > > - The Sybase ODBC connection - including a query - have been verified at > the iODBC level. > - The setup is already working well for ODBC connection to MySQL. > > Symptoms include: > > - If I click on "Open Connection", it still comes back with "Connection > Closed" when I go to a ZSQL method > - Using 'Connect on Demand' is not working either. > - Clicking "Open Connection" gives me the following error: > > Connection string: DSN=lixbox_sybase; > UID=sa; > PWD=XXXXXXX Try writing the connection string on one line and without whitespace. ODBC drivers sometimes have problems with this. > Connection pool entry: 0 > Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection > rejected by data source', 7952) This is a generic error that relates to authentication or firewall problems. It is possible that turning on ODBC tracing the ODBC manager will give more clues as to the real cause of the problem. > The odbc.ini definition for DSN "lixbox_sybase" is as follows: > > [lixbox_sybase] > JetFix = No > NoRowSetSizeLimit = No > Description = Test connection to listbox > Options = LIXBOX > DSQUERY = SQLSERVER > TDSHOST = lixbox > TDSPORT = 5000 > TDSVER = 5.0 > SQLSERVER_CATALOG = N > CURSOR_SENSITIVITY = LOW > UserName = sa > Password = XXXXXXXX > ServerType = Sybase 10/11/12 > Driver = /opt/openlink/lib/sql_mt_lt.so > Database = pubs2 > ReadOnly = no > NoAutoCommit = No > NoLoginBox = No > FetchBufferSize = 60 > > > Other relevant data: > - Connecting via OpenLink's iODBC > - Zope 2.7.6-final > - Python 2.3.4 > - Connection to Sybase has been successfully tested with iODBC, > including issuing a query > - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC > connection > > > > RJ Juneau > Chief Technology Officer > Maxxian Integration Inc. > 155 Westhampton Drive > Thornhill, Ontario > Canada L4J 7X2 > E-mail: rj@maxxian.com > Phone: +1 905 482 9429 > Cell: +1 416 897 6682 > Toll free: +1 866 758 9161 > Fax: +1 647 722 2038 > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 06 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From calisp at gmail.com Sun May 15 23:49:03 2005 From: calisp at gmail.com (calisp@gmail.com) Date: Sun Jan 15 20:00:52 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK Message-ID: Hi, I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the following error... 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the last phase of a two-phase commit. This shouldn't happen. Traceback (most recent call last): File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one jar.tpc_finish(self) File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish try: self._finish() File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could not perform COMMIT or ROLLBACK', 1023) What could be causing this? Can I get the mxODBCZopeDA source from somewhere? It would make debugging this much easier. Thanks, Calisp. From mal at egenix.com Mon May 16 13:52:12 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 15 20:00:52 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK In-Reply-To: References: Message-ID: <42887B5C.4010109@egenix.com> calisp@gmail.com wrote: > Hi, > > I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with > unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the > following error... > > 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the > last phase of a two-phase commit. This shouldn't happen. > Traceback (most recent call last): > File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one > jar.tpc_finish(self) > File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish > try: self._finish() > File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish > File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler > ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could > not perform COMMIT or ROLLBACK', 1023) You should have a look at the database logs to see what prevented the commit from being completed. > What could be causing this? Hard to say: mxODBCZopeDA is trying to commit the transaction, but the driver or database failed to complete the request. The above error was generated by the ODBC driver. This could be network or DNS problems, or be related to a bug in FreeTDS (which is getting more stable with every new release, but should still be considered beta quality software at the moment). > Can I get the mxODBCZopeDA source from > somewhere? It would make debugging this much easier. Getting the source is not an option and won't help much either since the source of the problem is not mxODBCZopeDA. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 16 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Sun May 1 21:29:25 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 16 08:02:42 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <427259F3.4090806@egenix.com> References: <20050427130906.52878.qmail@web30008.mail.mud.yahoo.com> <427259F3.4090806@egenix.com> Message-ID: <42752005.7080904@egenix.com> M.-A. Lemburg wrote: > David Rushby wrote: > >> --- "M.-A. Lemburg" wrote: >> >>> Are you using the standard mxDateTime build or one >>> with WANT_SUBCLASSABLE_TYPES defined... >> >> >> >> Presumably "the standard", since I just built with 'py24d setup.py >> build', making no attempt to enable special directives. >> >> >>> ... (mxDateTime_Deallocate is only used by the latter)? >> >> >> >> That's true in 2.1.0-2005-04-15, but not in 2.1.0b5. >> >> >>> In any case, please try our latest snapshot: >>> >>> >> >> http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-04-15.zip >> >>> to see if that makes any difference. >> >> >> >> I can't build it out of the box: > > > Hmm, looks like distutils' sdist command doesn't like our new > repository layout which uses symlinks (after we've switched to > subversion). > > We'll have to debug distutils first, I guess :-( Ok, we've found the problem and fixed it. Here's the new release (which does build out of the box at least on our boxes ;-): http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 01 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From davidrushby at yahoo.com Mon May 2 15:49:53 2005 From: davidrushby at yahoo.com (David Rushby) Date: Mon Jan 16 08:02:42 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Ok, we've found the problem and fixed it. Here's the new > release (which does build out of the box at least on our > boxes ;-): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip It does build now, but: py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" still behaves as it did when I submitted my original message: Fatal Python error: UNREF invalid object Aborted This is the same debug build of Python 2.4.1 that I was previously using, running the same configuration (CentOS Linux 4.0/i386, everything compiled with GCC 3.4.3). Have you examined my original claim as to the cause of the bug? __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 10:21:55 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 16 08:02:42 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> References: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> Message-ID: <42772693.8050306@egenix.com> David Rushby wrote: > --- "M.-A. Lemburg" wrote: > >>Ok, we've found the problem and fixed it. Here's the new >>release (which does build out of the box at least on our >>boxes ;-): >> >> > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip > > It does build now, but: > py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" > still behaves as it did when I submitted my original message: > Fatal Python error: UNREF invalid object > Aborted > > This is the same debug build of Python 2.4.1 that I was previously > using, running the same configuration (CentOS Linux 4.0/i386, > everything compiled with GCC 3.4.3). > > Have you examined my original claim as to the cause of the bug? No. We haven't had time for looking into it. I'm not sure whether your analysis of the problem is correct: if you don't define WANT_SUBCLASSABLE_TYPES, the API mxDateTime_Deallocate() is neither defined nor used. Furthermore, PyObject_Del() is only called by mxDateTime_Free() if you have explicitely edited mxDateTime.c to disabled the free list #defines. In a standard build, PyObject_Del() is only called at module finalization time. Note that the reason we call mxDateTime_Free() in the constructor is that we don't want the destructor of the object to be called. Py_DECREF() would call the destructor (mxDateTime_Deallocate). It is possible that the debug code in Python complains about the refcount in the object not being 0 at the time the object is finalized (module finalization time), but I don't see any such checks in PyObject_Free() (which is what PyObject_Del() maps to). Again, all of this does not happen in regular non-debug Python builds. Please be aware that we don't support debug builds, so fixing the problem (if there is one - gcc has some serious optimization problems on some combinations of platform and version) will take a while. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 09:27:37 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Mon Jan 16 08:02:42 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 Message-ID: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Hi all- I am trying to build the mx-base package, v.2.0.6. This will be used with postgresql 7.3.9, psycopg 1.1.18, and Roundup 0.8.2. RHEL 3.0 Python 2.3 egenix-mx-base-2.0.6.tar.gz I performed a: /usr/local/bin/python2.3 setup.py install Everything looks proper with the exeception of this series of warning statements: ----------------- gcc -pthread -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fno-strict-aliasing -fPIC -Imx/BeeBase/mxBeeBase -I/usr/local/incl ude/python2.3 -I/usr/local/include -c mx/BeeBase/mxBeeBase/btr.c -o build/temp.linux-i686-2.3/mx/BeeBase/mxBeeBase/mxBeeBa se/mx/BeeBase/mxBeeBase/btr.o mx/BeeBase/mxBeeBase/btr.c: In function `dumpBuf': mx/BeeBase/mxBeeBase/btr.c:249: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:250: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:255: warning: unsigned int format, long unsigned int arg (arg 4) mx/BeeBase/mxBeeBase/btr.c:256: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c: In function `_validateTree': mx/BeeBase/mxBeeBase/btr.c:330: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:337: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:339: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:349: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:351: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 3) creating build/lib.linux-i686-2.3/mx/BeeBase creating build/lib.linux-i686-2.3/mx/BeeBase/mxBeeBase -------------- Would someone be kind enough to let me know whether these messages were expected, and if not, how I might resolve these? Thanks! DC __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 22:06:33 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 16 08:02:42 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> References: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Message-ID: <4277CBB9.8020302@egenix.com> Dianne Chen wrote: > Hi all- > > I am trying to build the mx-base package, v.2.0.6. > This will be used with postgresql 7.3.9, psycopg > 1.1.18, and Roundup 0.8.2. > > RHEL 3.0 > Python 2.3 > egenix-mx-base-2.0.6.tar.gz > > I performed a: > > /usr/local/bin/python2.3 setup.py install > > Everything looks proper with the exeception of this > series of warning statements: > > ----------------- > ... > -------------- > > Would someone be kind enough to let me know whether > these messages were expected, and if not, how I might > resolve these? These warning can safely be ignored. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 13:41:14 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Mon Jan 16 08:02:42 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: 6667 Message-ID: <20050503194114.72091.qmail@web31414.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Dianne Chen wrote: > > Hi all- > > > > I am trying to build the mx-base package, v.2.0.6. > > This will be used with postgresql 7.3.9, psycopg > > 1.1.18, and Roundup 0.8.2. > > > > RHEL 3.0 > > Python 2.3 > > egenix-mx-base-2.0.6.tar.gz > > > > I performed a: > > > > /usr/local/bin/python2.3 setup.py install > > > > Everything looks proper with the exeception of > this > > series of warning statements: > > > > ----------------- > > ... > > -------------- > > > > Would someone be kind enough to let me know > whether > > these messages were expected, and if not, how I > might > > resolve these? > > These warning can safely be ignored. > > -- > Marc-Andre Lemburg > eGenix.com > Marc- Thank you very much for the reply. It helps greatly. With kind regards, DC __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From davidrushby at yahoo.com Tue May 3 17:18:46 2005 From: davidrushby at yahoo.com (David Rushby) Date: Mon Jan 16 08:02:42 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050503231846.35012.qmail@web30009.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > I'm not sure whether your analysis of the problem is correct... Indeed, my original analysis wasn't correct; I think this one is. The fatal error I'm complaining about only arises if the arguments to DateTime.DateTime are invalid, so that the object is deallocated in the onError block of mxDateTime_FromDateAndTime. If the object is created successfully, and later deallocated by Python's garbage collector, the fatal error doesn't arise. Here's my analysis of the problem: --- If the debugging directive Py_TRACE_REFS is enabled, as it is in my case, the Python interpreter maintains a doubly linked list of all Python objects (named refchain) via the _ob_next and _ob_prev pointers added to PyObject via _PyObject_HEAD_EXTRA. Each object is inserted into refchain by the _Py_AddToAllObjects call in _Py_NewReference, and removed from refchain by the _Py_ForgetReference call in _Py_Dealloc. _Py_ForgetReference performs an integrity check on the object being deallocated (op) to make sure that its neighbors in refchain recognize it. Specifically, _Py_ForgetReference verifies that the _ob_next pointer of the previous object in refchain (op->_ob_prev->_ob_next) points to op, and that the _ob_prev pointer of the next object in refchain (op->_ob_next->_ob_prev) points to op. If either of those conditions is false, the interpreter raises the fatal error I'm seeing. After mxDateTime_New pulls an mxDateTimeObject out of the free list, it calls _Py_NewReference on that object to transform it from a "conceptually deallocated" object to a "conceptually allocated" one. _Py_NewReference inserts the object into refchain. Later, when the object is being "conceptually deallocated", it should be removed from refchain with _Py_ForgetReference. The version of _Py_Dealloc that's active when Py_TRACE_REFS is enabled does this (_Py_Dealloc is the element of Py_DECREF that performs the actual destruction). _Py_Dealloc first calls _Py_ForgetReference to remove the object from refchain, then calls the object's destructor (op->ob_type->tp_dealloc). If WANT_SUBCLASSABLE_TYPES is not defined (it is not in my case), the destructor for mxDateTime_Type is mxDateTime_Free. So, if a DateTime object is deallocated normally, as a result of its reference count falling to zero, _Py_Dealloc is called on the object, which first removes it from refchain, then passes it to mxDateTime_Free. If a DateTime object is destroyed prematurely, as a result of invalid arguments to its destructor, the onError handler calls mxDateTime_Free, so the object is "conceptually deallocated" (placed in the free list), *but* the object is not removed from refchain. So if a refchain-membership-integrity-check is performed on the object in question or one of its immediate neighbors in refchain, that integrity check fails, leading to the fatal error. --- The solution is to 'Py_DECREF(...)' the object in the onError handler of its constructor, instead of passing the object directly to mxDateTime_Free. That change solves two problems: 1) It causes _Py_Dealloc to execute, which in turn executes _Py_ForgetReference, so the object is removed from refchain, as it should be. 2) At present, objects that are created successfully and later deallocated by normal reference count mechanics have a reference count of 0 when they enter the free list, whereas objects whose constructors abort their creation due to invalid arguments have a reference count of 1 when they enter the free list. Although AFAIK this doesn't cause an actual execution problem (because the object's reference count is *explicitly set to 1* rather than *incremented by 1* when the object is later "conceptually allocated" by _Py_NewReference), it is likely to confuse future maintainers and thereby lead to the introduction of an actual execution problem. I assume that if you agree that this is a reasonable solution, you'll want to apply the change not only to mxDateTime_FromDateAndTime, but to all similar constructors in mxDateTime.c. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From rj at maxxian.com Thu May 5 01:57:40 2005 From: rj at maxxian.com (RJ Juneau) Date: Mon Jan 16 08:02:42 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c5512e$f72798c0$6505a8c0@rjlaptop> I'm on the 30 day evaluation for mxodbc_zope_da. I'm getting the following error when I submit some queries: Error Type: KeyError Error Value: 'query' I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 with UCS4. The error seems to be caused by multiple rows being returned. I did see an earlier posting with the same error message. The response suggested a template error, but this is clearly not the case here. The additional evidence I've gathered so far: - I'm running the test directly from the ZSQL method, so there's no template involved. - If I use the same query with an additional "where" clause to ensure that only one row is returned, it works - If I use a value in the 'where' clause with no rows returned, it works - The same ZSQL query is being used on a Windows machine running Zope and the free ZODBC module without a problem - The query has been verified directly in mysql-client-browser Other info: - The database is MySQL 4.1.10A-0 - iODBC is the DB driver RJ Juneau -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050505/68d278bf/attachment-0013.htm From mal at egenix.com Thu May 5 12:37:43 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 16 08:02:42 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c5512e$f72798c0$6505a8c0@rjlaptop> References: <000301c5512e$f72798c0$6505a8c0@rjlaptop> Message-ID: <4279E967.6010904@egenix.com> RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 > with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 09:37:42 2005 From: rj at maxxian.com (RJ Juneau) Date: Mon Jan 16 08:02:42 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000101c5516f$3b96de90$6505a8c0@rjlaptop> More interesting info on the problem: If I execute the query directly in the "test" window of the base eGenix mxODBC Database Connection window, it works fine and returns the 20 lines expected. That could point to a problem in the rendering, which seems to be where the traceback ends. Note that within the same Zope system I also have an ODBC connection to a Sybase database, and I have successfully tested multi-line ZSQL queries there. This is the traceback: Time 2005/05/05 07:55:15.294 GMT-4 Exception Type KeyError Exception Value 'query' Traceback (innermost last): Module ZPublisher.Publish, line 101, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 39, in call_object Module Shared.DC.ZRDB.DA, line 337, in manage_test Module DocumentTemplate.DT_String, line 474, in __call__ Module DocumentTemplate.DT_In, line 602, in renderwb Module DocumentTemplate.DT_Var, line 219, in render KeyError: 'query' I don't think the following is an issue, but I'll include it for completeness.I am also getting the following iODBC warnings and errors in the Zope console log, which are related to the ODBC parameters being passed by iODBC. Note that these errors also appear for all of the successful queries. [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (Setup). [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (UsageCount). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Timeout). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Reuse). As for the ZSQL snippet from the template... Since there's no template involved yet (I'm still testing directly from the ZSQL method), I assume you mean the SQL code? select h.host_name, s.system_name, s.system_handle, count(*) from terminal t, system_map s, host h where t.system_index = s.system_index and s.host_index = h.host_index group by s.system_name order by h.host_name Nothing complicated here. There are no parameters passed to the query. RJ -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: May 5, 2005 5:38 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: Re: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is > 2.3.4 with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ---------------------------------------------------------------------- > -- > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 16:00:32 2005 From: charlie at egenix.com (Charlie Clark) Date: Mon Jan 16 08:02:42 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000101c5516f$3b96de90$6505a8c0@rjlaptop> References: <000101c5516f$3b96de90$6505a8c0@rjlaptop> Message-ID: <20050505150032.644.1@bepc.1115296715.fake> On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base eGenix > mxODBC Database Connection window, it works fine and returns the 20 > lines expected. That could point to a problem in the rendering, which > seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection to > a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 10:22:17 2005 From: rj at maxxian.com (RJ Juneau) Date: Mon Jan 16 08:02:42 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505150032.644.1@bepc.1115296715.fake> Message-ID: <000201c55175$75bcad10$6505a8c0@rjlaptop> At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 11:47:14 2005 From: rj at maxxian.com (RJ Juneau) Date: Mon Jan 16 08:02:42 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c55181$549be0e0$6505a8c0@rjlaptop> Charlie, I found a fix. Here it is in case anyone else runs into this. You were correct - the problem is in another part of Zope. Based on your feedback, I did a bit more searching and found something here: http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. html The problem appears to be in Zope versions after 2.7.0. I'm running 2.7.6, and the post indicates that it also happens in 2.7.4. The solution: Edit file /lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. There are two lines in the file that start with . Edit them as follows: Change first line to: Change second line to: Just to be after, I shut down Zope before I made the changes and restarted it after. Thanks for the help! RJ -----Original Message----- From: RJ Juneau [mailto:rj@maxxian.com] Sent: May 5, 2005 9:22 AM To: 'Charlie Clark' Cc: 'egenix-users@lists.egenix.com' Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 17:57:25 2005 From: charlie at egenix.com (Charlie Clark) Date: Mon Jan 16 08:02:42 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <20050505165725.3380.2@bepc.1115296715.fake> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Thu May 5 09:15:21 2005 From: charlie at egenix.com (Charlie Clark) Date: Mon Jan 16 08:02:42 2006 Subject: [Zope-DB] RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <000001c55185$41477730$6b00a8c0@fonacier.local> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________ Zope-DB mailing list Zope-DB@zope.org http://mail.zope.org/mailman/listinfo/zope-db From rj at maxxian.com Thu May 5 12:38:00 2005 From: rj at maxxian.com (RJ Juneau) Date: Mon Jan 16 08:02:43 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000001c55188$6b841eb0$6505a8c0@rjlaptop> I just double-checked. Zope-2.7.6-final. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 12:49:16 2005 From: rj at maxxian.com (RJ Juneau) Date: Mon Jan 16 08:02:43 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000501c55189$fe149ba0$6505a8c0@rjlaptop> Charlie, The fix has only been applied for 2.7.7, 2.8b2. The info is in the original bug report which is closed and can be found here: http://www.zope.org/Collectors/Zope/1745 RJ -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Fri May 6 11:50:09 2005 From: rj at maxxian.com (RJ Juneau) Date: Mon Jan 16 08:02:43 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC Message-ID: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Still on eval for the product. I cannot get a stable connection to Sybase via the iODBC drivers. - The Sybase ODBC connection - including a query - have been verified at the iODBC level. - The setup is already working well for ODBC connection to MySQL. Symptoms include: - If I click on "Open Connection", it still comes back with "Connection Closed" when I go to a ZSQL method - Using 'Connect on Demand' is not working either. - Clicking "Open Connection" gives me the following error: Connection string: DSN=lixbox_sybase; UID=sa; PWD=XXXXXXX Connection pool entry: 0 Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection rejected by data source', 7952) The odbc.ini definition for DSN "lixbox_sybase" is as follows: [lixbox_sybase] JetFix = No NoRowSetSizeLimit = No Description = Test connection to listbox Options = LIXBOX DSQUERY = SQLSERVER TDSHOST = lixbox TDSPORT = 5000 TDSVER = 5.0 SQLSERVER_CATALOG = N CURSOR_SENSITIVITY = LOW UserName = sa Password = XXXXXXXX ServerType = Sybase 10/11/12 Driver = /opt/openlink/lib/sql_mt_lt.so Database = pubs2 ReadOnly = no NoAutoCommit = No NoLoginBox = No FetchBufferSize = 60 Other relevant data: - Connecting via OpenLink's iODBC - Zope 2.7.6-final - Python 2.3.4 - Connection to Sybase has been successfully tested with iODBC, including issuing a query - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC connection RJ Juneau Chief Technology Officer Maxxian Integration Inc. 155 Westhampton Drive Thornhill, Ontario Canada L4J 7X2 E-mail: rj@maxxian.com Phone: +1 905 482 9429 Cell: +1 416 897 6682 Toll free: +1 866 758 9161 Fax: +1 647 722 2038 -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050506/aef33361/attachment-0013.htm From mal at egenix.com Fri May 6 18:27:37 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 16 08:02:43 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC In-Reply-To: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> References: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Message-ID: <427B8CE9.1010601@egenix.com> RJ Juneau wrote: > Still on eval for the product. > > I cannot get a stable connection to Sybase via the iODBC drivers. > > - The Sybase ODBC connection - including a query - have been verified at > the iODBC level. > - The setup is already working well for ODBC connection to MySQL. > > Symptoms include: > > - If I click on "Open Connection", it still comes back with "Connection > Closed" when I go to a ZSQL method > - Using 'Connect on Demand' is not working either. > - Clicking "Open Connection" gives me the following error: > > Connection string: DSN=lixbox_sybase; > UID=sa; > PWD=XXXXXXX Try writing the connection string on one line and without whitespace. ODBC drivers sometimes have problems with this. > Connection pool entry: 0 > Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection > rejected by data source', 7952) This is a generic error that relates to authentication or firewall problems. It is possible that turning on ODBC tracing the ODBC manager will give more clues as to the real cause of the problem. > The odbc.ini definition for DSN "lixbox_sybase" is as follows: > > [lixbox_sybase] > JetFix = No > NoRowSetSizeLimit = No > Description = Test connection to listbox > Options = LIXBOX > DSQUERY = SQLSERVER > TDSHOST = lixbox > TDSPORT = 5000 > TDSVER = 5.0 > SQLSERVER_CATALOG = N > CURSOR_SENSITIVITY = LOW > UserName = sa > Password = XXXXXXXX > ServerType = Sybase 10/11/12 > Driver = /opt/openlink/lib/sql_mt_lt.so > Database = pubs2 > ReadOnly = no > NoAutoCommit = No > NoLoginBox = No > FetchBufferSize = 60 > > > Other relevant data: > - Connecting via OpenLink's iODBC > - Zope 2.7.6-final > - Python 2.3.4 > - Connection to Sybase has been successfully tested with iODBC, > including issuing a query > - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC > connection > > > > RJ Juneau > Chief Technology Officer > Maxxian Integration Inc. > 155 Westhampton Drive > Thornhill, Ontario > Canada L4J 7X2 > E-mail: rj@maxxian.com > Phone: +1 905 482 9429 > Cell: +1 416 897 6682 > Toll free: +1 866 758 9161 > Fax: +1 647 722 2038 > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 06 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From calisp at gmail.com Sun May 15 23:49:03 2005 From: calisp at gmail.com (calisp@gmail.com) Date: Mon Jan 16 08:02:44 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK Message-ID: Hi, I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the following error... 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the last phase of a two-phase commit. This shouldn't happen. Traceback (most recent call last): File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one jar.tpc_finish(self) File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish try: self._finish() File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could not perform COMMIT or ROLLBACK', 1023) What could be causing this? Can I get the mxODBCZopeDA source from somewhere? It would make debugging this much easier. Thanks, Calisp. From mal at egenix.com Mon May 16 13:52:12 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 16 08:02:44 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK In-Reply-To: References: Message-ID: <42887B5C.4010109@egenix.com> calisp@gmail.com wrote: > Hi, > > I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with > unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the > following error... > > 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the > last phase of a two-phase commit. This shouldn't happen. > Traceback (most recent call last): > File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one > jar.tpc_finish(self) > File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish > try: self._finish() > File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish > File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler > ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could > not perform COMMIT or ROLLBACK', 1023) You should have a look at the database logs to see what prevented the commit from being completed. > What could be causing this? Hard to say: mxODBCZopeDA is trying to commit the transaction, but the driver or database failed to complete the request. The above error was generated by the ODBC driver. This could be network or DNS problems, or be related to a bug in FreeTDS (which is getting more stable with every new release, but should still be considered beta quality software at the moment). > Can I get the mxODBCZopeDA source from > somewhere? It would make debugging this much easier. Getting the source is not an option and won't help much either since the source of the problem is not mxODBCZopeDA. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 16 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Sun May 1 21:29:25 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 16 12:00:56 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <427259F3.4090806@egenix.com> References: <20050427130906.52878.qmail@web30008.mail.mud.yahoo.com> <427259F3.4090806@egenix.com> Message-ID: <42752005.7080904@egenix.com> M.-A. Lemburg wrote: > David Rushby wrote: > >> --- "M.-A. Lemburg" wrote: >> >>> Are you using the standard mxDateTime build or one >>> with WANT_SUBCLASSABLE_TYPES defined... >> >> >> >> Presumably "the standard", since I just built with 'py24d setup.py >> build', making no attempt to enable special directives. >> >> >>> ... (mxDateTime_Deallocate is only used by the latter)? >> >> >> >> That's true in 2.1.0-2005-04-15, but not in 2.1.0b5. >> >> >>> In any case, please try our latest snapshot: >>> >>> >> >> http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-04-15.zip >> >>> to see if that makes any difference. >> >> >> >> I can't build it out of the box: > > > Hmm, looks like distutils' sdist command doesn't like our new > repository layout which uses symlinks (after we've switched to > subversion). > > We'll have to debug distutils first, I guess :-( Ok, we've found the problem and fixed it. Here's the new release (which does build out of the box at least on our boxes ;-): http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 01 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From davidrushby at yahoo.com Mon May 2 15:49:53 2005 From: davidrushby at yahoo.com (David Rushby) Date: Mon Jan 16 12:00:56 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Ok, we've found the problem and fixed it. Here's the new > release (which does build out of the box at least on our > boxes ;-): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip It does build now, but: py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" still behaves as it did when I submitted my original message: Fatal Python error: UNREF invalid object Aborted This is the same debug build of Python 2.4.1 that I was previously using, running the same configuration (CentOS Linux 4.0/i386, everything compiled with GCC 3.4.3). Have you examined my original claim as to the cause of the bug? __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 10:21:55 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 16 12:00:56 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> References: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> Message-ID: <42772693.8050306@egenix.com> David Rushby wrote: > --- "M.-A. Lemburg" wrote: > >>Ok, we've found the problem and fixed it. Here's the new >>release (which does build out of the box at least on our >>boxes ;-): >> >> > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip > > It does build now, but: > py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" > still behaves as it did when I submitted my original message: > Fatal Python error: UNREF invalid object > Aborted > > This is the same debug build of Python 2.4.1 that I was previously > using, running the same configuration (CentOS Linux 4.0/i386, > everything compiled with GCC 3.4.3). > > Have you examined my original claim as to the cause of the bug? No. We haven't had time for looking into it. I'm not sure whether your analysis of the problem is correct: if you don't define WANT_SUBCLASSABLE_TYPES, the API mxDateTime_Deallocate() is neither defined nor used. Furthermore, PyObject_Del() is only called by mxDateTime_Free() if you have explicitely edited mxDateTime.c to disabled the free list #defines. In a standard build, PyObject_Del() is only called at module finalization time. Note that the reason we call mxDateTime_Free() in the constructor is that we don't want the destructor of the object to be called. Py_DECREF() would call the destructor (mxDateTime_Deallocate). It is possible that the debug code in Python complains about the refcount in the object not being 0 at the time the object is finalized (module finalization time), but I don't see any such checks in PyObject_Free() (which is what PyObject_Del() maps to). Again, all of this does not happen in regular non-debug Python builds. Please be aware that we don't support debug builds, so fixing the problem (if there is one - gcc has some serious optimization problems on some combinations of platform and version) will take a while. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 09:27:37 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Mon Jan 16 12:00:56 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 Message-ID: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Hi all- I am trying to build the mx-base package, v.2.0.6. This will be used with postgresql 7.3.9, psycopg 1.1.18, and Roundup 0.8.2. RHEL 3.0 Python 2.3 egenix-mx-base-2.0.6.tar.gz I performed a: /usr/local/bin/python2.3 setup.py install Everything looks proper with the exeception of this series of warning statements: ----------------- gcc -pthread -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fno-strict-aliasing -fPIC -Imx/BeeBase/mxBeeBase -I/usr/local/incl ude/python2.3 -I/usr/local/include -c mx/BeeBase/mxBeeBase/btr.c -o build/temp.linux-i686-2.3/mx/BeeBase/mxBeeBase/mxBeeBa se/mx/BeeBase/mxBeeBase/btr.o mx/BeeBase/mxBeeBase/btr.c: In function `dumpBuf': mx/BeeBase/mxBeeBase/btr.c:249: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:250: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:255: warning: unsigned int format, long unsigned int arg (arg 4) mx/BeeBase/mxBeeBase/btr.c:256: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c: In function `_validateTree': mx/BeeBase/mxBeeBase/btr.c:330: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:337: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:339: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:349: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:351: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 3) creating build/lib.linux-i686-2.3/mx/BeeBase creating build/lib.linux-i686-2.3/mx/BeeBase/mxBeeBase -------------- Would someone be kind enough to let me know whether these messages were expected, and if not, how I might resolve these? Thanks! DC __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 22:06:33 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 16 12:00:56 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> References: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Message-ID: <4277CBB9.8020302@egenix.com> Dianne Chen wrote: > Hi all- > > I am trying to build the mx-base package, v.2.0.6. > This will be used with postgresql 7.3.9, psycopg > 1.1.18, and Roundup 0.8.2. > > RHEL 3.0 > Python 2.3 > egenix-mx-base-2.0.6.tar.gz > > I performed a: > > /usr/local/bin/python2.3 setup.py install > > Everything looks proper with the exeception of this > series of warning statements: > > ----------------- > ... > -------------- > > Would someone be kind enough to let me know whether > these messages were expected, and if not, how I might > resolve these? These warning can safely be ignored. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 13:41:14 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Mon Jan 16 12:00:56 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: 6667 Message-ID: <20050503194114.72091.qmail@web31414.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Dianne Chen wrote: > > Hi all- > > > > I am trying to build the mx-base package, v.2.0.6. > > This will be used with postgresql 7.3.9, psycopg > > 1.1.18, and Roundup 0.8.2. > > > > RHEL 3.0 > > Python 2.3 > > egenix-mx-base-2.0.6.tar.gz > > > > I performed a: > > > > /usr/local/bin/python2.3 setup.py install > > > > Everything looks proper with the exeception of > this > > series of warning statements: > > > > ----------------- > > ... > > -------------- > > > > Would someone be kind enough to let me know > whether > > these messages were expected, and if not, how I > might > > resolve these? > > These warning can safely be ignored. > > -- > Marc-Andre Lemburg > eGenix.com > Marc- Thank you very much for the reply. It helps greatly. With kind regards, DC __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From davidrushby at yahoo.com Tue May 3 17:18:46 2005 From: davidrushby at yahoo.com (David Rushby) Date: Mon Jan 16 12:00:56 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050503231846.35012.qmail@web30009.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > I'm not sure whether your analysis of the problem is correct... Indeed, my original analysis wasn't correct; I think this one is. The fatal error I'm complaining about only arises if the arguments to DateTime.DateTime are invalid, so that the object is deallocated in the onError block of mxDateTime_FromDateAndTime. If the object is created successfully, and later deallocated by Python's garbage collector, the fatal error doesn't arise. Here's my analysis of the problem: --- If the debugging directive Py_TRACE_REFS is enabled, as it is in my case, the Python interpreter maintains a doubly linked list of all Python objects (named refchain) via the _ob_next and _ob_prev pointers added to PyObject via _PyObject_HEAD_EXTRA. Each object is inserted into refchain by the _Py_AddToAllObjects call in _Py_NewReference, and removed from refchain by the _Py_ForgetReference call in _Py_Dealloc. _Py_ForgetReference performs an integrity check on the object being deallocated (op) to make sure that its neighbors in refchain recognize it. Specifically, _Py_ForgetReference verifies that the _ob_next pointer of the previous object in refchain (op->_ob_prev->_ob_next) points to op, and that the _ob_prev pointer of the next object in refchain (op->_ob_next->_ob_prev) points to op. If either of those conditions is false, the interpreter raises the fatal error I'm seeing. After mxDateTime_New pulls an mxDateTimeObject out of the free list, it calls _Py_NewReference on that object to transform it from a "conceptually deallocated" object to a "conceptually allocated" one. _Py_NewReference inserts the object into refchain. Later, when the object is being "conceptually deallocated", it should be removed from refchain with _Py_ForgetReference. The version of _Py_Dealloc that's active when Py_TRACE_REFS is enabled does this (_Py_Dealloc is the element of Py_DECREF that performs the actual destruction). _Py_Dealloc first calls _Py_ForgetReference to remove the object from refchain, then calls the object's destructor (op->ob_type->tp_dealloc). If WANT_SUBCLASSABLE_TYPES is not defined (it is not in my case), the destructor for mxDateTime_Type is mxDateTime_Free. So, if a DateTime object is deallocated normally, as a result of its reference count falling to zero, _Py_Dealloc is called on the object, which first removes it from refchain, then passes it to mxDateTime_Free. If a DateTime object is destroyed prematurely, as a result of invalid arguments to its destructor, the onError handler calls mxDateTime_Free, so the object is "conceptually deallocated" (placed in the free list), *but* the object is not removed from refchain. So if a refchain-membership-integrity-check is performed on the object in question or one of its immediate neighbors in refchain, that integrity check fails, leading to the fatal error. --- The solution is to 'Py_DECREF(...)' the object in the onError handler of its constructor, instead of passing the object directly to mxDateTime_Free. That change solves two problems: 1) It causes _Py_Dealloc to execute, which in turn executes _Py_ForgetReference, so the object is removed from refchain, as it should be. 2) At present, objects that are created successfully and later deallocated by normal reference count mechanics have a reference count of 0 when they enter the free list, whereas objects whose constructors abort their creation due to invalid arguments have a reference count of 1 when they enter the free list. Although AFAIK this doesn't cause an actual execution problem (because the object's reference count is *explicitly set to 1* rather than *incremented by 1* when the object is later "conceptually allocated" by _Py_NewReference), it is likely to confuse future maintainers and thereby lead to the introduction of an actual execution problem. I assume that if you agree that this is a reasonable solution, you'll want to apply the change not only to mxDateTime_FromDateAndTime, but to all similar constructors in mxDateTime.c. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From rj at maxxian.com Thu May 5 01:57:40 2005 From: rj at maxxian.com (RJ Juneau) Date: Mon Jan 16 12:00:56 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c5512e$f72798c0$6505a8c0@rjlaptop> I'm on the 30 day evaluation for mxodbc_zope_da. I'm getting the following error when I submit some queries: Error Type: KeyError Error Value: 'query' I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 with UCS4. The error seems to be caused by multiple rows being returned. I did see an earlier posting with the same error message. The response suggested a template error, but this is clearly not the case here. The additional evidence I've gathered so far: - I'm running the test directly from the ZSQL method, so there's no template involved. - If I use the same query with an additional "where" clause to ensure that only one row is returned, it works - If I use a value in the 'where' clause with no rows returned, it works - The same ZSQL query is being used on a Windows machine running Zope and the free ZODBC module without a problem - The query has been verified directly in mysql-client-browser Other info: - The database is MySQL 4.1.10A-0 - iODBC is the DB driver RJ Juneau -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050505/68d278bf/attachment-0014.htm From mal at egenix.com Thu May 5 12:37:43 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 16 12:00:56 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c5512e$f72798c0$6505a8c0@rjlaptop> References: <000301c5512e$f72798c0$6505a8c0@rjlaptop> Message-ID: <4279E967.6010904@egenix.com> RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 > with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 09:37:42 2005 From: rj at maxxian.com (RJ Juneau) Date: Mon Jan 16 12:00:56 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000101c5516f$3b96de90$6505a8c0@rjlaptop> More interesting info on the problem: If I execute the query directly in the "test" window of the base eGenix mxODBC Database Connection window, it works fine and returns the 20 lines expected. That could point to a problem in the rendering, which seems to be where the traceback ends. Note that within the same Zope system I also have an ODBC connection to a Sybase database, and I have successfully tested multi-line ZSQL queries there. This is the traceback: Time 2005/05/05 07:55:15.294 GMT-4 Exception Type KeyError Exception Value 'query' Traceback (innermost last): Module ZPublisher.Publish, line 101, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 39, in call_object Module Shared.DC.ZRDB.DA, line 337, in manage_test Module DocumentTemplate.DT_String, line 474, in __call__ Module DocumentTemplate.DT_In, line 602, in renderwb Module DocumentTemplate.DT_Var, line 219, in render KeyError: 'query' I don't think the following is an issue, but I'll include it for completeness.I am also getting the following iODBC warnings and errors in the Zope console log, which are related to the ODBC parameters being passed by iODBC. Note that these errors also appear for all of the successful queries. [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (Setup). [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (UsageCount). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Timeout). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Reuse). As for the ZSQL snippet from the template... Since there's no template involved yet (I'm still testing directly from the ZSQL method), I assume you mean the SQL code? select h.host_name, s.system_name, s.system_handle, count(*) from terminal t, system_map s, host h where t.system_index = s.system_index and s.host_index = h.host_index group by s.system_name order by h.host_name Nothing complicated here. There are no parameters passed to the query. RJ -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: May 5, 2005 5:38 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: Re: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is > 2.3.4 with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ---------------------------------------------------------------------- > -- > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 16:00:32 2005 From: charlie at egenix.com (Charlie Clark) Date: Mon Jan 16 12:00:56 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000101c5516f$3b96de90$6505a8c0@rjlaptop> References: <000101c5516f$3b96de90$6505a8c0@rjlaptop> Message-ID: <20050505150032.644.1@bepc.1115296715.fake> On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base eGenix > mxODBC Database Connection window, it works fine and returns the 20 > lines expected. That could point to a problem in the rendering, which > seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection to > a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 10:22:17 2005 From: rj at maxxian.com (RJ Juneau) Date: Mon Jan 16 12:00:56 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505150032.644.1@bepc.1115296715.fake> Message-ID: <000201c55175$75bcad10$6505a8c0@rjlaptop> At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 11:47:14 2005 From: rj at maxxian.com (RJ Juneau) Date: Mon Jan 16 12:00:56 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c55181$549be0e0$6505a8c0@rjlaptop> Charlie, I found a fix. Here it is in case anyone else runs into this. You were correct - the problem is in another part of Zope. Based on your feedback, I did a bit more searching and found something here: http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. html The problem appears to be in Zope versions after 2.7.0. I'm running 2.7.6, and the post indicates that it also happens in 2.7.4. The solution: Edit file /lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. There are two lines in the file that start with . Edit them as follows: Change first line to: Change second line to: Just to be after, I shut down Zope before I made the changes and restarted it after. Thanks for the help! RJ -----Original Message----- From: RJ Juneau [mailto:rj@maxxian.com] Sent: May 5, 2005 9:22 AM To: 'Charlie Clark' Cc: 'egenix-users@lists.egenix.com' Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 17:57:25 2005 From: charlie at egenix.com (Charlie Clark) Date: Mon Jan 16 12:00:56 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <20050505165725.3380.2@bepc.1115296715.fake> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Thu May 5 09:15:21 2005 From: charlie at egenix.com (Charlie Clark) Date: Mon Jan 16 12:00:56 2006 Subject: [Zope-DB] RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <000001c55185$41477730$6b00a8c0@fonacier.local> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________ Zope-DB mailing list Zope-DB@zope.org http://mail.zope.org/mailman/listinfo/zope-db From rj at maxxian.com Thu May 5 12:38:00 2005 From: rj at maxxian.com (RJ Juneau) Date: Mon Jan 16 12:00:56 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000001c55188$6b841eb0$6505a8c0@rjlaptop> I just double-checked. Zope-2.7.6-final. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 12:49:16 2005 From: rj at maxxian.com (RJ Juneau) Date: Mon Jan 16 12:00:56 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000501c55189$fe149ba0$6505a8c0@rjlaptop> Charlie, The fix has only been applied for 2.7.7, 2.8b2. The info is in the original bug report which is closed and can be found here: http://www.zope.org/Collectors/Zope/1745 RJ -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Fri May 6 11:50:09 2005 From: rj at maxxian.com (RJ Juneau) Date: Mon Jan 16 12:00:56 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC Message-ID: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Still on eval for the product. I cannot get a stable connection to Sybase via the iODBC drivers. - The Sybase ODBC connection - including a query - have been verified at the iODBC level. - The setup is already working well for ODBC connection to MySQL. Symptoms include: - If I click on "Open Connection", it still comes back with "Connection Closed" when I go to a ZSQL method - Using 'Connect on Demand' is not working either. - Clicking "Open Connection" gives me the following error: Connection string: DSN=lixbox_sybase; UID=sa; PWD=XXXXXXX Connection pool entry: 0 Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection rejected by data source', 7952) The odbc.ini definition for DSN "lixbox_sybase" is as follows: [lixbox_sybase] JetFix = No NoRowSetSizeLimit = No Description = Test connection to listbox Options = LIXBOX DSQUERY = SQLSERVER TDSHOST = lixbox TDSPORT = 5000 TDSVER = 5.0 SQLSERVER_CATALOG = N CURSOR_SENSITIVITY = LOW UserName = sa Password = XXXXXXXX ServerType = Sybase 10/11/12 Driver = /opt/openlink/lib/sql_mt_lt.so Database = pubs2 ReadOnly = no NoAutoCommit = No NoLoginBox = No FetchBufferSize = 60 Other relevant data: - Connecting via OpenLink's iODBC - Zope 2.7.6-final - Python 2.3.4 - Connection to Sybase has been successfully tested with iODBC, including issuing a query - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC connection RJ Juneau Chief Technology Officer Maxxian Integration Inc. 155 Westhampton Drive Thornhill, Ontario Canada L4J 7X2 E-mail: rj@maxxian.com Phone: +1 905 482 9429 Cell: +1 416 897 6682 Toll free: +1 866 758 9161 Fax: +1 647 722 2038 -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050506/aef33361/attachment-0014.htm From mal at egenix.com Fri May 6 18:27:37 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 16 12:00:56 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC In-Reply-To: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> References: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Message-ID: <427B8CE9.1010601@egenix.com> RJ Juneau wrote: > Still on eval for the product. > > I cannot get a stable connection to Sybase via the iODBC drivers. > > - The Sybase ODBC connection - including a query - have been verified at > the iODBC level. > - The setup is already working well for ODBC connection to MySQL. > > Symptoms include: > > - If I click on "Open Connection", it still comes back with "Connection > Closed" when I go to a ZSQL method > - Using 'Connect on Demand' is not working either. > - Clicking "Open Connection" gives me the following error: > > Connection string: DSN=lixbox_sybase; > UID=sa; > PWD=XXXXXXX Try writing the connection string on one line and without whitespace. ODBC drivers sometimes have problems with this. > Connection pool entry: 0 > Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection > rejected by data source', 7952) This is a generic error that relates to authentication or firewall problems. It is possible that turning on ODBC tracing the ODBC manager will give more clues as to the real cause of the problem. > The odbc.ini definition for DSN "lixbox_sybase" is as follows: > > [lixbox_sybase] > JetFix = No > NoRowSetSizeLimit = No > Description = Test connection to listbox > Options = LIXBOX > DSQUERY = SQLSERVER > TDSHOST = lixbox > TDSPORT = 5000 > TDSVER = 5.0 > SQLSERVER_CATALOG = N > CURSOR_SENSITIVITY = LOW > UserName = sa > Password = XXXXXXXX > ServerType = Sybase 10/11/12 > Driver = /opt/openlink/lib/sql_mt_lt.so > Database = pubs2 > ReadOnly = no > NoAutoCommit = No > NoLoginBox = No > FetchBufferSize = 60 > > > Other relevant data: > - Connecting via OpenLink's iODBC > - Zope 2.7.6-final > - Python 2.3.4 > - Connection to Sybase has been successfully tested with iODBC, > including issuing a query > - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC > connection > > > > RJ Juneau > Chief Technology Officer > Maxxian Integration Inc. > 155 Westhampton Drive > Thornhill, Ontario > Canada L4J 7X2 > E-mail: rj@maxxian.com > Phone: +1 905 482 9429 > Cell: +1 416 897 6682 > Toll free: +1 866 758 9161 > Fax: +1 647 722 2038 > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 06 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From calisp at gmail.com Sun May 15 23:49:03 2005 From: calisp at gmail.com (calisp@gmail.com) Date: Mon Jan 16 12:00:56 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK Message-ID: Hi, I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the following error... 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the last phase of a two-phase commit. This shouldn't happen. Traceback (most recent call last): File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one jar.tpc_finish(self) File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish try: self._finish() File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could not perform COMMIT or ROLLBACK', 1023) What could be causing this? Can I get the mxODBCZopeDA source from somewhere? It would make debugging this much easier. Thanks, Calisp. From mal at egenix.com Mon May 16 13:52:12 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 16 12:00:56 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK In-Reply-To: References: Message-ID: <42887B5C.4010109@egenix.com> calisp@gmail.com wrote: > Hi, > > I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with > unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the > following error... > > 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the > last phase of a two-phase commit. This shouldn't happen. > Traceback (most recent call last): > File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one > jar.tpc_finish(self) > File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish > try: self._finish() > File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish > File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler > ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could > not perform COMMIT or ROLLBACK', 1023) You should have a look at the database logs to see what prevented the commit from being completed. > What could be causing this? Hard to say: mxODBCZopeDA is trying to commit the transaction, but the driver or database failed to complete the request. The above error was generated by the ODBC driver. This could be network or DNS problems, or be related to a bug in FreeTDS (which is getting more stable with every new release, but should still be considered beta quality software at the moment). > Can I get the mxODBCZopeDA source from > somewhere? It would make debugging this much easier. Getting the source is not an option and won't help much either since the source of the problem is not mxODBCZopeDA. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 16 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Sun May 1 21:29:25 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 16 16:00:56 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <427259F3.4090806@egenix.com> References: <20050427130906.52878.qmail@web30008.mail.mud.yahoo.com> <427259F3.4090806@egenix.com> Message-ID: <42752005.7080904@egenix.com> M.-A. Lemburg wrote: > David Rushby wrote: > >> --- "M.-A. Lemburg" wrote: >> >>> Are you using the standard mxDateTime build or one >>> with WANT_SUBCLASSABLE_TYPES defined... >> >> >> >> Presumably "the standard", since I just built with 'py24d setup.py >> build', making no attempt to enable special directives. >> >> >>> ... (mxDateTime_Deallocate is only used by the latter)? >> >> >> >> That's true in 2.1.0-2005-04-15, but not in 2.1.0b5. >> >> >>> In any case, please try our latest snapshot: >>> >>> >> >> http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-04-15.zip >> >>> to see if that makes any difference. >> >> >> >> I can't build it out of the box: > > > Hmm, looks like distutils' sdist command doesn't like our new > repository layout which uses symlinks (after we've switched to > subversion). > > We'll have to debug distutils first, I guess :-( Ok, we've found the problem and fixed it. Here's the new release (which does build out of the box at least on our boxes ;-): http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 01 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From davidrushby at yahoo.com Mon May 2 15:49:53 2005 From: davidrushby at yahoo.com (David Rushby) Date: Mon Jan 16 16:00:56 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Ok, we've found the problem and fixed it. Here's the new > release (which does build out of the box at least on our > boxes ;-): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip It does build now, but: py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" still behaves as it did when I submitted my original message: Fatal Python error: UNREF invalid object Aborted This is the same debug build of Python 2.4.1 that I was previously using, running the same configuration (CentOS Linux 4.0/i386, everything compiled with GCC 3.4.3). Have you examined my original claim as to the cause of the bug? __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 10:21:55 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 16 16:00:56 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> References: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> Message-ID: <42772693.8050306@egenix.com> David Rushby wrote: > --- "M.-A. Lemburg" wrote: > >>Ok, we've found the problem and fixed it. Here's the new >>release (which does build out of the box at least on our >>boxes ;-): >> >> > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip > > It does build now, but: > py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" > still behaves as it did when I submitted my original message: > Fatal Python error: UNREF invalid object > Aborted > > This is the same debug build of Python 2.4.1 that I was previously > using, running the same configuration (CentOS Linux 4.0/i386, > everything compiled with GCC 3.4.3). > > Have you examined my original claim as to the cause of the bug? No. We haven't had time for looking into it. I'm not sure whether your analysis of the problem is correct: if you don't define WANT_SUBCLASSABLE_TYPES, the API mxDateTime_Deallocate() is neither defined nor used. Furthermore, PyObject_Del() is only called by mxDateTime_Free() if you have explicitely edited mxDateTime.c to disabled the free list #defines. In a standard build, PyObject_Del() is only called at module finalization time. Note that the reason we call mxDateTime_Free() in the constructor is that we don't want the destructor of the object to be called. Py_DECREF() would call the destructor (mxDateTime_Deallocate). It is possible that the debug code in Python complains about the refcount in the object not being 0 at the time the object is finalized (module finalization time), but I don't see any such checks in PyObject_Free() (which is what PyObject_Del() maps to). Again, all of this does not happen in regular non-debug Python builds. Please be aware that we don't support debug builds, so fixing the problem (if there is one - gcc has some serious optimization problems on some combinations of platform and version) will take a while. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 09:27:37 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Mon Jan 16 16:00:56 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 Message-ID: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Hi all- I am trying to build the mx-base package, v.2.0.6. This will be used with postgresql 7.3.9, psycopg 1.1.18, and Roundup 0.8.2. RHEL 3.0 Python 2.3 egenix-mx-base-2.0.6.tar.gz I performed a: /usr/local/bin/python2.3 setup.py install Everything looks proper with the exeception of this series of warning statements: ----------------- gcc -pthread -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fno-strict-aliasing -fPIC -Imx/BeeBase/mxBeeBase -I/usr/local/incl ude/python2.3 -I/usr/local/include -c mx/BeeBase/mxBeeBase/btr.c -o build/temp.linux-i686-2.3/mx/BeeBase/mxBeeBase/mxBeeBa se/mx/BeeBase/mxBeeBase/btr.o mx/BeeBase/mxBeeBase/btr.c: In function `dumpBuf': mx/BeeBase/mxBeeBase/btr.c:249: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:250: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:255: warning: unsigned int format, long unsigned int arg (arg 4) mx/BeeBase/mxBeeBase/btr.c:256: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c: In function `_validateTree': mx/BeeBase/mxBeeBase/btr.c:330: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:337: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:339: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:349: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:351: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 3) creating build/lib.linux-i686-2.3/mx/BeeBase creating build/lib.linux-i686-2.3/mx/BeeBase/mxBeeBase -------------- Would someone be kind enough to let me know whether these messages were expected, and if not, how I might resolve these? Thanks! DC __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 22:06:33 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 16 16:00:56 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> References: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Message-ID: <4277CBB9.8020302@egenix.com> Dianne Chen wrote: > Hi all- > > I am trying to build the mx-base package, v.2.0.6. > This will be used with postgresql 7.3.9, psycopg > 1.1.18, and Roundup 0.8.2. > > RHEL 3.0 > Python 2.3 > egenix-mx-base-2.0.6.tar.gz > > I performed a: > > /usr/local/bin/python2.3 setup.py install > > Everything looks proper with the exeception of this > series of warning statements: > > ----------------- > ... > -------------- > > Would someone be kind enough to let me know whether > these messages were expected, and if not, how I might > resolve these? These warning can safely be ignored. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 13:41:14 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Mon Jan 16 16:00:56 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: 6667 Message-ID: <20050503194114.72091.qmail@web31414.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Dianne Chen wrote: > > Hi all- > > > > I am trying to build the mx-base package, v.2.0.6. > > This will be used with postgresql 7.3.9, psycopg > > 1.1.18, and Roundup 0.8.2. > > > > RHEL 3.0 > > Python 2.3 > > egenix-mx-base-2.0.6.tar.gz > > > > I performed a: > > > > /usr/local/bin/python2.3 setup.py install > > > > Everything looks proper with the exeception of > this > > series of warning statements: > > > > ----------------- > > ... > > -------------- > > > > Would someone be kind enough to let me know > whether > > these messages were expected, and if not, how I > might > > resolve these? > > These warning can safely be ignored. > > -- > Marc-Andre Lemburg > eGenix.com > Marc- Thank you very much for the reply. It helps greatly. With kind regards, DC __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From davidrushby at yahoo.com Tue May 3 17:18:46 2005 From: davidrushby at yahoo.com (David Rushby) Date: Mon Jan 16 16:00:56 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050503231846.35012.qmail@web30009.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > I'm not sure whether your analysis of the problem is correct... Indeed, my original analysis wasn't correct; I think this one is. The fatal error I'm complaining about only arises if the arguments to DateTime.DateTime are invalid, so that the object is deallocated in the onError block of mxDateTime_FromDateAndTime. If the object is created successfully, and later deallocated by Python's garbage collector, the fatal error doesn't arise. Here's my analysis of the problem: --- If the debugging directive Py_TRACE_REFS is enabled, as it is in my case, the Python interpreter maintains a doubly linked list of all Python objects (named refchain) via the _ob_next and _ob_prev pointers added to PyObject via _PyObject_HEAD_EXTRA. Each object is inserted into refchain by the _Py_AddToAllObjects call in _Py_NewReference, and removed from refchain by the _Py_ForgetReference call in _Py_Dealloc. _Py_ForgetReference performs an integrity check on the object being deallocated (op) to make sure that its neighbors in refchain recognize it. Specifically, _Py_ForgetReference verifies that the _ob_next pointer of the previous object in refchain (op->_ob_prev->_ob_next) points to op, and that the _ob_prev pointer of the next object in refchain (op->_ob_next->_ob_prev) points to op. If either of those conditions is false, the interpreter raises the fatal error I'm seeing. After mxDateTime_New pulls an mxDateTimeObject out of the free list, it calls _Py_NewReference on that object to transform it from a "conceptually deallocated" object to a "conceptually allocated" one. _Py_NewReference inserts the object into refchain. Later, when the object is being "conceptually deallocated", it should be removed from refchain with _Py_ForgetReference. The version of _Py_Dealloc that's active when Py_TRACE_REFS is enabled does this (_Py_Dealloc is the element of Py_DECREF that performs the actual destruction). _Py_Dealloc first calls _Py_ForgetReference to remove the object from refchain, then calls the object's destructor (op->ob_type->tp_dealloc). If WANT_SUBCLASSABLE_TYPES is not defined (it is not in my case), the destructor for mxDateTime_Type is mxDateTime_Free. So, if a DateTime object is deallocated normally, as a result of its reference count falling to zero, _Py_Dealloc is called on the object, which first removes it from refchain, then passes it to mxDateTime_Free. If a DateTime object is destroyed prematurely, as a result of invalid arguments to its destructor, the onError handler calls mxDateTime_Free, so the object is "conceptually deallocated" (placed in the free list), *but* the object is not removed from refchain. So if a refchain-membership-integrity-check is performed on the object in question or one of its immediate neighbors in refchain, that integrity check fails, leading to the fatal error. --- The solution is to 'Py_DECREF(...)' the object in the onError handler of its constructor, instead of passing the object directly to mxDateTime_Free. That change solves two problems: 1) It causes _Py_Dealloc to execute, which in turn executes _Py_ForgetReference, so the object is removed from refchain, as it should be. 2) At present, objects that are created successfully and later deallocated by normal reference count mechanics have a reference count of 0 when they enter the free list, whereas objects whose constructors abort their creation due to invalid arguments have a reference count of 1 when they enter the free list. Although AFAIK this doesn't cause an actual execution problem (because the object's reference count is *explicitly set to 1* rather than *incremented by 1* when the object is later "conceptually allocated" by _Py_NewReference), it is likely to confuse future maintainers and thereby lead to the introduction of an actual execution problem. I assume that if you agree that this is a reasonable solution, you'll want to apply the change not only to mxDateTime_FromDateAndTime, but to all similar constructors in mxDateTime.c. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From rj at maxxian.com Thu May 5 01:57:40 2005 From: rj at maxxian.com (RJ Juneau) Date: Mon Jan 16 16:00:56 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c5512e$f72798c0$6505a8c0@rjlaptop> I'm on the 30 day evaluation for mxodbc_zope_da. I'm getting the following error when I submit some queries: Error Type: KeyError Error Value: 'query' I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 with UCS4. The error seems to be caused by multiple rows being returned. I did see an earlier posting with the same error message. The response suggested a template error, but this is clearly not the case here. The additional evidence I've gathered so far: - I'm running the test directly from the ZSQL method, so there's no template involved. - If I use the same query with an additional "where" clause to ensure that only one row is returned, it works - If I use a value in the 'where' clause with no rows returned, it works - The same ZSQL query is being used on a Windows machine running Zope and the free ZODBC module without a problem - The query has been verified directly in mysql-client-browser Other info: - The database is MySQL 4.1.10A-0 - iODBC is the DB driver RJ Juneau -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050505/68d278bf/attachment-0015.htm From mal at egenix.com Thu May 5 12:37:43 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 16 16:00:56 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c5512e$f72798c0$6505a8c0@rjlaptop> References: <000301c5512e$f72798c0$6505a8c0@rjlaptop> Message-ID: <4279E967.6010904@egenix.com> RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 > with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 09:37:42 2005 From: rj at maxxian.com (RJ Juneau) Date: Mon Jan 16 16:00:56 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000101c5516f$3b96de90$6505a8c0@rjlaptop> More interesting info on the problem: If I execute the query directly in the "test" window of the base eGenix mxODBC Database Connection window, it works fine and returns the 20 lines expected. That could point to a problem in the rendering, which seems to be where the traceback ends. Note that within the same Zope system I also have an ODBC connection to a Sybase database, and I have successfully tested multi-line ZSQL queries there. This is the traceback: Time 2005/05/05 07:55:15.294 GMT-4 Exception Type KeyError Exception Value 'query' Traceback (innermost last): Module ZPublisher.Publish, line 101, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 39, in call_object Module Shared.DC.ZRDB.DA, line 337, in manage_test Module DocumentTemplate.DT_String, line 474, in __call__ Module DocumentTemplate.DT_In, line 602, in renderwb Module DocumentTemplate.DT_Var, line 219, in render KeyError: 'query' I don't think the following is an issue, but I'll include it for completeness.I am also getting the following iODBC warnings and errors in the Zope console log, which are related to the ODBC parameters being passed by iODBC. Note that these errors also appear for all of the successful queries. [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (Setup). [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (UsageCount). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Timeout). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Reuse). As for the ZSQL snippet from the template... Since there's no template involved yet (I'm still testing directly from the ZSQL method), I assume you mean the SQL code? select h.host_name, s.system_name, s.system_handle, count(*) from terminal t, system_map s, host h where t.system_index = s.system_index and s.host_index = h.host_index group by s.system_name order by h.host_name Nothing complicated here. There are no parameters passed to the query. RJ -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: May 5, 2005 5:38 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: Re: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is > 2.3.4 with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ---------------------------------------------------------------------- > -- > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 16:00:32 2005 From: charlie at egenix.com (Charlie Clark) Date: Mon Jan 16 16:00:56 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000101c5516f$3b96de90$6505a8c0@rjlaptop> References: <000101c5516f$3b96de90$6505a8c0@rjlaptop> Message-ID: <20050505150032.644.1@bepc.1115296715.fake> On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base eGenix > mxODBC Database Connection window, it works fine and returns the 20 > lines expected. That could point to a problem in the rendering, which > seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection to > a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 10:22:17 2005 From: rj at maxxian.com (RJ Juneau) Date: Mon Jan 16 16:00:56 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505150032.644.1@bepc.1115296715.fake> Message-ID: <000201c55175$75bcad10$6505a8c0@rjlaptop> At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 11:47:14 2005 From: rj at maxxian.com (RJ Juneau) Date: Mon Jan 16 16:00:56 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c55181$549be0e0$6505a8c0@rjlaptop> Charlie, I found a fix. Here it is in case anyone else runs into this. You were correct - the problem is in another part of Zope. Based on your feedback, I did a bit more searching and found something here: http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. html The problem appears to be in Zope versions after 2.7.0. I'm running 2.7.6, and the post indicates that it also happens in 2.7.4. The solution: Edit file /lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. There are two lines in the file that start with . Edit them as follows: Change first line to: Change second line to: Just to be after, I shut down Zope before I made the changes and restarted it after. Thanks for the help! RJ -----Original Message----- From: RJ Juneau [mailto:rj@maxxian.com] Sent: May 5, 2005 9:22 AM To: 'Charlie Clark' Cc: 'egenix-users@lists.egenix.com' Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 17:57:25 2005 From: charlie at egenix.com (Charlie Clark) Date: Mon Jan 16 16:00:56 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <20050505165725.3380.2@bepc.1115296715.fake> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Thu May 5 09:15:21 2005 From: charlie at egenix.com (Charlie Clark) Date: Mon Jan 16 16:00:56 2006 Subject: [Zope-DB] RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <000001c55185$41477730$6b00a8c0@fonacier.local> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________ Zope-DB mailing list Zope-DB@zope.org http://mail.zope.org/mailman/listinfo/zope-db From rj at maxxian.com Thu May 5 12:38:00 2005 From: rj at maxxian.com (RJ Juneau) Date: Mon Jan 16 16:00:56 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000001c55188$6b841eb0$6505a8c0@rjlaptop> I just double-checked. Zope-2.7.6-final. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 12:49:16 2005 From: rj at maxxian.com (RJ Juneau) Date: Mon Jan 16 16:00:56 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000501c55189$fe149ba0$6505a8c0@rjlaptop> Charlie, The fix has only been applied for 2.7.7, 2.8b2. The info is in the original bug report which is closed and can be found here: http://www.zope.org/Collectors/Zope/1745 RJ -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Fri May 6 11:50:09 2005 From: rj at maxxian.com (RJ Juneau) Date: Mon Jan 16 16:00:56 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC Message-ID: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Still on eval for the product. I cannot get a stable connection to Sybase via the iODBC drivers. - The Sybase ODBC connection - including a query - have been verified at the iODBC level. - The setup is already working well for ODBC connection to MySQL. Symptoms include: - If I click on "Open Connection", it still comes back with "Connection Closed" when I go to a ZSQL method - Using 'Connect on Demand' is not working either. - Clicking "Open Connection" gives me the following error: Connection string: DSN=lixbox_sybase; UID=sa; PWD=XXXXXXX Connection pool entry: 0 Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection rejected by data source', 7952) The odbc.ini definition for DSN "lixbox_sybase" is as follows: [lixbox_sybase] JetFix = No NoRowSetSizeLimit = No Description = Test connection to listbox Options = LIXBOX DSQUERY = SQLSERVER TDSHOST = lixbox TDSPORT = 5000 TDSVER = 5.0 SQLSERVER_CATALOG = N CURSOR_SENSITIVITY = LOW UserName = sa Password = XXXXXXXX ServerType = Sybase 10/11/12 Driver = /opt/openlink/lib/sql_mt_lt.so Database = pubs2 ReadOnly = no NoAutoCommit = No NoLoginBox = No FetchBufferSize = 60 Other relevant data: - Connecting via OpenLink's iODBC - Zope 2.7.6-final - Python 2.3.4 - Connection to Sybase has been successfully tested with iODBC, including issuing a query - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC connection RJ Juneau Chief Technology Officer Maxxian Integration Inc. 155 Westhampton Drive Thornhill, Ontario Canada L4J 7X2 E-mail: rj@maxxian.com Phone: +1 905 482 9429 Cell: +1 416 897 6682 Toll free: +1 866 758 9161 Fax: +1 647 722 2038 -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050506/aef33361/attachment-0015.htm From mal at egenix.com Fri May 6 18:27:37 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 16 16:00:56 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC In-Reply-To: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> References: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Message-ID: <427B8CE9.1010601@egenix.com> RJ Juneau wrote: > Still on eval for the product. > > I cannot get a stable connection to Sybase via the iODBC drivers. > > - The Sybase ODBC connection - including a query - have been verified at > the iODBC level. > - The setup is already working well for ODBC connection to MySQL. > > Symptoms include: > > - If I click on "Open Connection", it still comes back with "Connection > Closed" when I go to a ZSQL method > - Using 'Connect on Demand' is not working either. > - Clicking "Open Connection" gives me the following error: > > Connection string: DSN=lixbox_sybase; > UID=sa; > PWD=XXXXXXX Try writing the connection string on one line and without whitespace. ODBC drivers sometimes have problems with this. > Connection pool entry: 0 > Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection > rejected by data source', 7952) This is a generic error that relates to authentication or firewall problems. It is possible that turning on ODBC tracing the ODBC manager will give more clues as to the real cause of the problem. > The odbc.ini definition for DSN "lixbox_sybase" is as follows: > > [lixbox_sybase] > JetFix = No > NoRowSetSizeLimit = No > Description = Test connection to listbox > Options = LIXBOX > DSQUERY = SQLSERVER > TDSHOST = lixbox > TDSPORT = 5000 > TDSVER = 5.0 > SQLSERVER_CATALOG = N > CURSOR_SENSITIVITY = LOW > UserName = sa > Password = XXXXXXXX > ServerType = Sybase 10/11/12 > Driver = /opt/openlink/lib/sql_mt_lt.so > Database = pubs2 > ReadOnly = no > NoAutoCommit = No > NoLoginBox = No > FetchBufferSize = 60 > > > Other relevant data: > - Connecting via OpenLink's iODBC > - Zope 2.7.6-final > - Python 2.3.4 > - Connection to Sybase has been successfully tested with iODBC, > including issuing a query > - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC > connection > > > > RJ Juneau > Chief Technology Officer > Maxxian Integration Inc. > 155 Westhampton Drive > Thornhill, Ontario > Canada L4J 7X2 > E-mail: rj@maxxian.com > Phone: +1 905 482 9429 > Cell: +1 416 897 6682 > Toll free: +1 866 758 9161 > Fax: +1 647 722 2038 > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 06 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From calisp at gmail.com Sun May 15 23:49:03 2005 From: calisp at gmail.com (calisp@gmail.com) Date: Mon Jan 16 16:00:56 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK Message-ID: Hi, I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the following error... 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the last phase of a two-phase commit. This shouldn't happen. Traceback (most recent call last): File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one jar.tpc_finish(self) File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish try: self._finish() File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could not perform COMMIT or ROLLBACK', 1023) What could be causing this? Can I get the mxODBCZopeDA source from somewhere? It would make debugging this much easier. Thanks, Calisp. From mal at egenix.com Mon May 16 13:52:12 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 16 16:00:56 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK In-Reply-To: References: Message-ID: <42887B5C.4010109@egenix.com> calisp@gmail.com wrote: > Hi, > > I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with > unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the > following error... > > 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the > last phase of a two-phase commit. This shouldn't happen. > Traceback (most recent call last): > File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one > jar.tpc_finish(self) > File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish > try: self._finish() > File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish > File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler > ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could > not perform COMMIT or ROLLBACK', 1023) You should have a look at the database logs to see what prevented the commit from being completed. > What could be causing this? Hard to say: mxODBCZopeDA is trying to commit the transaction, but the driver or database failed to complete the request. The above error was generated by the ODBC driver. This could be network or DNS problems, or be related to a bug in FreeTDS (which is getting more stable with every new release, but should still be considered beta quality software at the moment). > Can I get the mxODBCZopeDA source from > somewhere? It would make debugging this much easier. Getting the source is not an option and won't help much either since the source of the problem is not mxODBCZopeDA. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 16 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Sun May 1 21:29:25 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 16 20:00:53 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <427259F3.4090806@egenix.com> References: <20050427130906.52878.qmail@web30008.mail.mud.yahoo.com> <427259F3.4090806@egenix.com> Message-ID: <42752005.7080904@egenix.com> M.-A. Lemburg wrote: > David Rushby wrote: > >> --- "M.-A. Lemburg" wrote: >> >>> Are you using the standard mxDateTime build or one >>> with WANT_SUBCLASSABLE_TYPES defined... >> >> >> >> Presumably "the standard", since I just built with 'py24d setup.py >> build', making no attempt to enable special directives. >> >> >>> ... (mxDateTime_Deallocate is only used by the latter)? >> >> >> >> That's true in 2.1.0-2005-04-15, but not in 2.1.0b5. >> >> >>> In any case, please try our latest snapshot: >>> >>> >> >> http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-04-15.zip >> >>> to see if that makes any difference. >> >> >> >> I can't build it out of the box: > > > Hmm, looks like distutils' sdist command doesn't like our new > repository layout which uses symlinks (after we've switched to > subversion). > > We'll have to debug distutils first, I guess :-( Ok, we've found the problem and fixed it. Here's the new release (which does build out of the box at least on our boxes ;-): http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 01 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From davidrushby at yahoo.com Mon May 2 15:49:53 2005 From: davidrushby at yahoo.com (David Rushby) Date: Mon Jan 16 20:00:53 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Ok, we've found the problem and fixed it. Here's the new > release (which does build out of the box at least on our > boxes ;-): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip It does build now, but: py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" still behaves as it did when I submitted my original message: Fatal Python error: UNREF invalid object Aborted This is the same debug build of Python 2.4.1 that I was previously using, running the same configuration (CentOS Linux 4.0/i386, everything compiled with GCC 3.4.3). Have you examined my original claim as to the cause of the bug? __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 10:21:55 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 16 20:00:53 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> References: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> Message-ID: <42772693.8050306@egenix.com> David Rushby wrote: > --- "M.-A. Lemburg" wrote: > >>Ok, we've found the problem and fixed it. Here's the new >>release (which does build out of the box at least on our >>boxes ;-): >> >> > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip > > It does build now, but: > py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" > still behaves as it did when I submitted my original message: > Fatal Python error: UNREF invalid object > Aborted > > This is the same debug build of Python 2.4.1 that I was previously > using, running the same configuration (CentOS Linux 4.0/i386, > everything compiled with GCC 3.4.3). > > Have you examined my original claim as to the cause of the bug? No. We haven't had time for looking into it. I'm not sure whether your analysis of the problem is correct: if you don't define WANT_SUBCLASSABLE_TYPES, the API mxDateTime_Deallocate() is neither defined nor used. Furthermore, PyObject_Del() is only called by mxDateTime_Free() if you have explicitely edited mxDateTime.c to disabled the free list #defines. In a standard build, PyObject_Del() is only called at module finalization time. Note that the reason we call mxDateTime_Free() in the constructor is that we don't want the destructor of the object to be called. Py_DECREF() would call the destructor (mxDateTime_Deallocate). It is possible that the debug code in Python complains about the refcount in the object not being 0 at the time the object is finalized (module finalization time), but I don't see any such checks in PyObject_Free() (which is what PyObject_Del() maps to). Again, all of this does not happen in regular non-debug Python builds. Please be aware that we don't support debug builds, so fixing the problem (if there is one - gcc has some serious optimization problems on some combinations of platform and version) will take a while. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 09:27:37 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Mon Jan 16 20:00:53 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 Message-ID: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Hi all- I am trying to build the mx-base package, v.2.0.6. This will be used with postgresql 7.3.9, psycopg 1.1.18, and Roundup 0.8.2. RHEL 3.0 Python 2.3 egenix-mx-base-2.0.6.tar.gz I performed a: /usr/local/bin/python2.3 setup.py install Everything looks proper with the exeception of this series of warning statements: ----------------- gcc -pthread -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fno-strict-aliasing -fPIC -Imx/BeeBase/mxBeeBase -I/usr/local/incl ude/python2.3 -I/usr/local/include -c mx/BeeBase/mxBeeBase/btr.c -o build/temp.linux-i686-2.3/mx/BeeBase/mxBeeBase/mxBeeBa se/mx/BeeBase/mxBeeBase/btr.o mx/BeeBase/mxBeeBase/btr.c: In function `dumpBuf': mx/BeeBase/mxBeeBase/btr.c:249: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:250: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:255: warning: unsigned int format, long unsigned int arg (arg 4) mx/BeeBase/mxBeeBase/btr.c:256: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c: In function `_validateTree': mx/BeeBase/mxBeeBase/btr.c:330: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:337: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:339: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:349: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:351: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 3) creating build/lib.linux-i686-2.3/mx/BeeBase creating build/lib.linux-i686-2.3/mx/BeeBase/mxBeeBase -------------- Would someone be kind enough to let me know whether these messages were expected, and if not, how I might resolve these? Thanks! DC __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 22:06:33 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 16 20:00:53 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> References: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Message-ID: <4277CBB9.8020302@egenix.com> Dianne Chen wrote: > Hi all- > > I am trying to build the mx-base package, v.2.0.6. > This will be used with postgresql 7.3.9, psycopg > 1.1.18, and Roundup 0.8.2. > > RHEL 3.0 > Python 2.3 > egenix-mx-base-2.0.6.tar.gz > > I performed a: > > /usr/local/bin/python2.3 setup.py install > > Everything looks proper with the exeception of this > series of warning statements: > > ----------------- > ... > -------------- > > Would someone be kind enough to let me know whether > these messages were expected, and if not, how I might > resolve these? These warning can safely be ignored. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 13:41:14 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Mon Jan 16 20:00:53 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: 6667 Message-ID: <20050503194114.72091.qmail@web31414.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Dianne Chen wrote: > > Hi all- > > > > I am trying to build the mx-base package, v.2.0.6. > > This will be used with postgresql 7.3.9, psycopg > > 1.1.18, and Roundup 0.8.2. > > > > RHEL 3.0 > > Python 2.3 > > egenix-mx-base-2.0.6.tar.gz > > > > I performed a: > > > > /usr/local/bin/python2.3 setup.py install > > > > Everything looks proper with the exeception of > this > > series of warning statements: > > > > ----------------- > > ... > > -------------- > > > > Would someone be kind enough to let me know > whether > > these messages were expected, and if not, how I > might > > resolve these? > > These warning can safely be ignored. > > -- > Marc-Andre Lemburg > eGenix.com > Marc- Thank you very much for the reply. It helps greatly. With kind regards, DC __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From davidrushby at yahoo.com Tue May 3 17:18:46 2005 From: davidrushby at yahoo.com (David Rushby) Date: Mon Jan 16 20:00:53 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050503231846.35012.qmail@web30009.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > I'm not sure whether your analysis of the problem is correct... Indeed, my original analysis wasn't correct; I think this one is. The fatal error I'm complaining about only arises if the arguments to DateTime.DateTime are invalid, so that the object is deallocated in the onError block of mxDateTime_FromDateAndTime. If the object is created successfully, and later deallocated by Python's garbage collector, the fatal error doesn't arise. Here's my analysis of the problem: --- If the debugging directive Py_TRACE_REFS is enabled, as it is in my case, the Python interpreter maintains a doubly linked list of all Python objects (named refchain) via the _ob_next and _ob_prev pointers added to PyObject via _PyObject_HEAD_EXTRA. Each object is inserted into refchain by the _Py_AddToAllObjects call in _Py_NewReference, and removed from refchain by the _Py_ForgetReference call in _Py_Dealloc. _Py_ForgetReference performs an integrity check on the object being deallocated (op) to make sure that its neighbors in refchain recognize it. Specifically, _Py_ForgetReference verifies that the _ob_next pointer of the previous object in refchain (op->_ob_prev->_ob_next) points to op, and that the _ob_prev pointer of the next object in refchain (op->_ob_next->_ob_prev) points to op. If either of those conditions is false, the interpreter raises the fatal error I'm seeing. After mxDateTime_New pulls an mxDateTimeObject out of the free list, it calls _Py_NewReference on that object to transform it from a "conceptually deallocated" object to a "conceptually allocated" one. _Py_NewReference inserts the object into refchain. Later, when the object is being "conceptually deallocated", it should be removed from refchain with _Py_ForgetReference. The version of _Py_Dealloc that's active when Py_TRACE_REFS is enabled does this (_Py_Dealloc is the element of Py_DECREF that performs the actual destruction). _Py_Dealloc first calls _Py_ForgetReference to remove the object from refchain, then calls the object's destructor (op->ob_type->tp_dealloc). If WANT_SUBCLASSABLE_TYPES is not defined (it is not in my case), the destructor for mxDateTime_Type is mxDateTime_Free. So, if a DateTime object is deallocated normally, as a result of its reference count falling to zero, _Py_Dealloc is called on the object, which first removes it from refchain, then passes it to mxDateTime_Free. If a DateTime object is destroyed prematurely, as a result of invalid arguments to its destructor, the onError handler calls mxDateTime_Free, so the object is "conceptually deallocated" (placed in the free list), *but* the object is not removed from refchain. So if a refchain-membership-integrity-check is performed on the object in question or one of its immediate neighbors in refchain, that integrity check fails, leading to the fatal error. --- The solution is to 'Py_DECREF(...)' the object in the onError handler of its constructor, instead of passing the object directly to mxDateTime_Free. That change solves two problems: 1) It causes _Py_Dealloc to execute, which in turn executes _Py_ForgetReference, so the object is removed from refchain, as it should be. 2) At present, objects that are created successfully and later deallocated by normal reference count mechanics have a reference count of 0 when they enter the free list, whereas objects whose constructors abort their creation due to invalid arguments have a reference count of 1 when they enter the free list. Although AFAIK this doesn't cause an actual execution problem (because the object's reference count is *explicitly set to 1* rather than *incremented by 1* when the object is later "conceptually allocated" by _Py_NewReference), it is likely to confuse future maintainers and thereby lead to the introduction of an actual execution problem. I assume that if you agree that this is a reasonable solution, you'll want to apply the change not only to mxDateTime_FromDateAndTime, but to all similar constructors in mxDateTime.c. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From rj at maxxian.com Thu May 5 01:57:40 2005 From: rj at maxxian.com (RJ Juneau) Date: Mon Jan 16 20:00:53 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c5512e$f72798c0$6505a8c0@rjlaptop> I'm on the 30 day evaluation for mxodbc_zope_da. I'm getting the following error when I submit some queries: Error Type: KeyError Error Value: 'query' I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 with UCS4. The error seems to be caused by multiple rows being returned. I did see an earlier posting with the same error message. The response suggested a template error, but this is clearly not the case here. The additional evidence I've gathered so far: - I'm running the test directly from the ZSQL method, so there's no template involved. - If I use the same query with an additional "where" clause to ensure that only one row is returned, it works - If I use a value in the 'where' clause with no rows returned, it works - The same ZSQL query is being used on a Windows machine running Zope and the free ZODBC module without a problem - The query has been verified directly in mysql-client-browser Other info: - The database is MySQL 4.1.10A-0 - iODBC is the DB driver RJ Juneau -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050505/68d278bf/attachment-0016.htm From mal at egenix.com Thu May 5 12:37:43 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 16 20:00:53 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c5512e$f72798c0$6505a8c0@rjlaptop> References: <000301c5512e$f72798c0$6505a8c0@rjlaptop> Message-ID: <4279E967.6010904@egenix.com> RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 > with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 09:37:42 2005 From: rj at maxxian.com (RJ Juneau) Date: Mon Jan 16 20:00:53 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000101c5516f$3b96de90$6505a8c0@rjlaptop> More interesting info on the problem: If I execute the query directly in the "test" window of the base eGenix mxODBC Database Connection window, it works fine and returns the 20 lines expected. That could point to a problem in the rendering, which seems to be where the traceback ends. Note that within the same Zope system I also have an ODBC connection to a Sybase database, and I have successfully tested multi-line ZSQL queries there. This is the traceback: Time 2005/05/05 07:55:15.294 GMT-4 Exception Type KeyError Exception Value 'query' Traceback (innermost last): Module ZPublisher.Publish, line 101, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 39, in call_object Module Shared.DC.ZRDB.DA, line 337, in manage_test Module DocumentTemplate.DT_String, line 474, in __call__ Module DocumentTemplate.DT_In, line 602, in renderwb Module DocumentTemplate.DT_Var, line 219, in render KeyError: 'query' I don't think the following is an issue, but I'll include it for completeness.I am also getting the following iODBC warnings and errors in the Zope console log, which are related to the ODBC parameters being passed by iODBC. Note that these errors also appear for all of the successful queries. [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (Setup). [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (UsageCount). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Timeout). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Reuse). As for the ZSQL snippet from the template... Since there's no template involved yet (I'm still testing directly from the ZSQL method), I assume you mean the SQL code? select h.host_name, s.system_name, s.system_handle, count(*) from terminal t, system_map s, host h where t.system_index = s.system_index and s.host_index = h.host_index group by s.system_name order by h.host_name Nothing complicated here. There are no parameters passed to the query. RJ -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: May 5, 2005 5:38 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: Re: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is > 2.3.4 with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ---------------------------------------------------------------------- > -- > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 16:00:32 2005 From: charlie at egenix.com (Charlie Clark) Date: Mon Jan 16 20:00:53 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000101c5516f$3b96de90$6505a8c0@rjlaptop> References: <000101c5516f$3b96de90$6505a8c0@rjlaptop> Message-ID: <20050505150032.644.1@bepc.1115296715.fake> On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base eGenix > mxODBC Database Connection window, it works fine and returns the 20 > lines expected. That could point to a problem in the rendering, which > seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection to > a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 10:22:17 2005 From: rj at maxxian.com (RJ Juneau) Date: Mon Jan 16 20:00:53 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505150032.644.1@bepc.1115296715.fake> Message-ID: <000201c55175$75bcad10$6505a8c0@rjlaptop> At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 11:47:14 2005 From: rj at maxxian.com (RJ Juneau) Date: Mon Jan 16 20:00:53 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c55181$549be0e0$6505a8c0@rjlaptop> Charlie, I found a fix. Here it is in case anyone else runs into this. You were correct - the problem is in another part of Zope. Based on your feedback, I did a bit more searching and found something here: http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. html The problem appears to be in Zope versions after 2.7.0. I'm running 2.7.6, and the post indicates that it also happens in 2.7.4. The solution: Edit file /lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. There are two lines in the file that start with . Edit them as follows: Change first line to: Change second line to: Just to be after, I shut down Zope before I made the changes and restarted it after. Thanks for the help! RJ -----Original Message----- From: RJ Juneau [mailto:rj@maxxian.com] Sent: May 5, 2005 9:22 AM To: 'Charlie Clark' Cc: 'egenix-users@lists.egenix.com' Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 17:57:25 2005 From: charlie at egenix.com (Charlie Clark) Date: Mon Jan 16 20:00:53 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <20050505165725.3380.2@bepc.1115296715.fake> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Thu May 5 09:15:21 2005 From: charlie at egenix.com (Charlie Clark) Date: Mon Jan 16 20:00:53 2006 Subject: [Zope-DB] RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <000001c55185$41477730$6b00a8c0@fonacier.local> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________ Zope-DB mailing list Zope-DB@zope.org http://mail.zope.org/mailman/listinfo/zope-db From rj at maxxian.com Thu May 5 12:38:00 2005 From: rj at maxxian.com (RJ Juneau) Date: Mon Jan 16 20:00:53 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000001c55188$6b841eb0$6505a8c0@rjlaptop> I just double-checked. Zope-2.7.6-final. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 12:49:16 2005 From: rj at maxxian.com (RJ Juneau) Date: Mon Jan 16 20:00:53 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000501c55189$fe149ba0$6505a8c0@rjlaptop> Charlie, The fix has only been applied for 2.7.7, 2.8b2. The info is in the original bug report which is closed and can be found here: http://www.zope.org/Collectors/Zope/1745 RJ -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Fri May 6 11:50:09 2005 From: rj at maxxian.com (RJ Juneau) Date: Mon Jan 16 20:00:53 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC Message-ID: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Still on eval for the product. I cannot get a stable connection to Sybase via the iODBC drivers. - The Sybase ODBC connection - including a query - have been verified at the iODBC level. - The setup is already working well for ODBC connection to MySQL. Symptoms include: - If I click on "Open Connection", it still comes back with "Connection Closed" when I go to a ZSQL method - Using 'Connect on Demand' is not working either. - Clicking "Open Connection" gives me the following error: Connection string: DSN=lixbox_sybase; UID=sa; PWD=XXXXXXX Connection pool entry: 0 Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection rejected by data source', 7952) The odbc.ini definition for DSN "lixbox_sybase" is as follows: [lixbox_sybase] JetFix = No NoRowSetSizeLimit = No Description = Test connection to listbox Options = LIXBOX DSQUERY = SQLSERVER TDSHOST = lixbox TDSPORT = 5000 TDSVER = 5.0 SQLSERVER_CATALOG = N CURSOR_SENSITIVITY = LOW UserName = sa Password = XXXXXXXX ServerType = Sybase 10/11/12 Driver = /opt/openlink/lib/sql_mt_lt.so Database = pubs2 ReadOnly = no NoAutoCommit = No NoLoginBox = No FetchBufferSize = 60 Other relevant data: - Connecting via OpenLink's iODBC - Zope 2.7.6-final - Python 2.3.4 - Connection to Sybase has been successfully tested with iODBC, including issuing a query - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC connection RJ Juneau Chief Technology Officer Maxxian Integration Inc. 155 Westhampton Drive Thornhill, Ontario Canada L4J 7X2 E-mail: rj@maxxian.com Phone: +1 905 482 9429 Cell: +1 416 897 6682 Toll free: +1 866 758 9161 Fax: +1 647 722 2038 -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050506/aef33361/attachment-0016.htm From mal at egenix.com Fri May 6 18:27:37 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 16 20:00:53 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC In-Reply-To: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> References: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Message-ID: <427B8CE9.1010601@egenix.com> RJ Juneau wrote: > Still on eval for the product. > > I cannot get a stable connection to Sybase via the iODBC drivers. > > - The Sybase ODBC connection - including a query - have been verified at > the iODBC level. > - The setup is already working well for ODBC connection to MySQL. > > Symptoms include: > > - If I click on "Open Connection", it still comes back with "Connection > Closed" when I go to a ZSQL method > - Using 'Connect on Demand' is not working either. > - Clicking "Open Connection" gives me the following error: > > Connection string: DSN=lixbox_sybase; > UID=sa; > PWD=XXXXXXX Try writing the connection string on one line and without whitespace. ODBC drivers sometimes have problems with this. > Connection pool entry: 0 > Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection > rejected by data source', 7952) This is a generic error that relates to authentication or firewall problems. It is possible that turning on ODBC tracing the ODBC manager will give more clues as to the real cause of the problem. > The odbc.ini definition for DSN "lixbox_sybase" is as follows: > > [lixbox_sybase] > JetFix = No > NoRowSetSizeLimit = No > Description = Test connection to listbox > Options = LIXBOX > DSQUERY = SQLSERVER > TDSHOST = lixbox > TDSPORT = 5000 > TDSVER = 5.0 > SQLSERVER_CATALOG = N > CURSOR_SENSITIVITY = LOW > UserName = sa > Password = XXXXXXXX > ServerType = Sybase 10/11/12 > Driver = /opt/openlink/lib/sql_mt_lt.so > Database = pubs2 > ReadOnly = no > NoAutoCommit = No > NoLoginBox = No > FetchBufferSize = 60 > > > Other relevant data: > - Connecting via OpenLink's iODBC > - Zope 2.7.6-final > - Python 2.3.4 > - Connection to Sybase has been successfully tested with iODBC, > including issuing a query > - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC > connection > > > > RJ Juneau > Chief Technology Officer > Maxxian Integration Inc. > 155 Westhampton Drive > Thornhill, Ontario > Canada L4J 7X2 > E-mail: rj@maxxian.com > Phone: +1 905 482 9429 > Cell: +1 416 897 6682 > Toll free: +1 866 758 9161 > Fax: +1 647 722 2038 > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 06 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From calisp at gmail.com Sun May 15 23:49:03 2005 From: calisp at gmail.com (calisp@gmail.com) Date: Mon Jan 16 20:00:53 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK Message-ID: Hi, I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the following error... 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the last phase of a two-phase commit. This shouldn't happen. Traceback (most recent call last): File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one jar.tpc_finish(self) File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish try: self._finish() File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could not perform COMMIT or ROLLBACK', 1023) What could be causing this? Can I get the mxODBCZopeDA source from somewhere? It would make debugging this much easier. Thanks, Calisp. From mal at egenix.com Mon May 16 13:52:12 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 16 20:00:53 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK In-Reply-To: References: Message-ID: <42887B5C.4010109@egenix.com> calisp@gmail.com wrote: > Hi, > > I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with > unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the > following error... > > 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the > last phase of a two-phase commit. This shouldn't happen. > Traceback (most recent call last): > File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one > jar.tpc_finish(self) > File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish > try: self._finish() > File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish > File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler > ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could > not perform COMMIT or ROLLBACK', 1023) You should have a look at the database logs to see what prevented the commit from being completed. > What could be causing this? Hard to say: mxODBCZopeDA is trying to commit the transaction, but the driver or database failed to complete the request. The above error was generated by the ODBC driver. This could be network or DNS problems, or be related to a bug in FreeTDS (which is getting more stable with every new release, but should still be considered beta quality software at the moment). > Can I get the mxODBCZopeDA source from > somewhere? It would make debugging this much easier. Getting the source is not an option and won't help much either since the source of the problem is not mxODBCZopeDA. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 16 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Sun May 1 21:29:25 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 17 08:02:46 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <427259F3.4090806@egenix.com> References: <20050427130906.52878.qmail@web30008.mail.mud.yahoo.com> <427259F3.4090806@egenix.com> Message-ID: <42752005.7080904@egenix.com> M.-A. Lemburg wrote: > David Rushby wrote: > >> --- "M.-A. Lemburg" wrote: >> >>> Are you using the standard mxDateTime build or one >>> with WANT_SUBCLASSABLE_TYPES defined... >> >> >> >> Presumably "the standard", since I just built with 'py24d setup.py >> build', making no attempt to enable special directives. >> >> >>> ... (mxDateTime_Deallocate is only used by the latter)? >> >> >> >> That's true in 2.1.0-2005-04-15, but not in 2.1.0b5. >> >> >>> In any case, please try our latest snapshot: >>> >>> >> >> http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-04-15.zip >> >>> to see if that makes any difference. >> >> >> >> I can't build it out of the box: > > > Hmm, looks like distutils' sdist command doesn't like our new > repository layout which uses symlinks (after we've switched to > subversion). > > We'll have to debug distutils first, I guess :-( Ok, we've found the problem and fixed it. Here's the new release (which does build out of the box at least on our boxes ;-): http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 01 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From davidrushby at yahoo.com Mon May 2 15:49:53 2005 From: davidrushby at yahoo.com (David Rushby) Date: Tue Jan 17 08:02:47 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Ok, we've found the problem and fixed it. Here's the new > release (which does build out of the box at least on our > boxes ;-): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip It does build now, but: py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" still behaves as it did when I submitted my original message: Fatal Python error: UNREF invalid object Aborted This is the same debug build of Python 2.4.1 that I was previously using, running the same configuration (CentOS Linux 4.0/i386, everything compiled with GCC 3.4.3). Have you examined my original claim as to the cause of the bug? __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 10:21:55 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 17 08:02:47 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> References: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> Message-ID: <42772693.8050306@egenix.com> David Rushby wrote: > --- "M.-A. Lemburg" wrote: > >>Ok, we've found the problem and fixed it. Here's the new >>release (which does build out of the box at least on our >>boxes ;-): >> >> > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip > > It does build now, but: > py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" > still behaves as it did when I submitted my original message: > Fatal Python error: UNREF invalid object > Aborted > > This is the same debug build of Python 2.4.1 that I was previously > using, running the same configuration (CentOS Linux 4.0/i386, > everything compiled with GCC 3.4.3). > > Have you examined my original claim as to the cause of the bug? No. We haven't had time for looking into it. I'm not sure whether your analysis of the problem is correct: if you don't define WANT_SUBCLASSABLE_TYPES, the API mxDateTime_Deallocate() is neither defined nor used. Furthermore, PyObject_Del() is only called by mxDateTime_Free() if you have explicitely edited mxDateTime.c to disabled the free list #defines. In a standard build, PyObject_Del() is only called at module finalization time. Note that the reason we call mxDateTime_Free() in the constructor is that we don't want the destructor of the object to be called. Py_DECREF() would call the destructor (mxDateTime_Deallocate). It is possible that the debug code in Python complains about the refcount in the object not being 0 at the time the object is finalized (module finalization time), but I don't see any such checks in PyObject_Free() (which is what PyObject_Del() maps to). Again, all of this does not happen in regular non-debug Python builds. Please be aware that we don't support debug builds, so fixing the problem (if there is one - gcc has some serious optimization problems on some combinations of platform and version) will take a while. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 09:27:37 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Tue Jan 17 08:02:47 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 Message-ID: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Hi all- I am trying to build the mx-base package, v.2.0.6. This will be used with postgresql 7.3.9, psycopg 1.1.18, and Roundup 0.8.2. RHEL 3.0 Python 2.3 egenix-mx-base-2.0.6.tar.gz I performed a: /usr/local/bin/python2.3 setup.py install Everything looks proper with the exeception of this series of warning statements: ----------------- gcc -pthread -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fno-strict-aliasing -fPIC -Imx/BeeBase/mxBeeBase -I/usr/local/incl ude/python2.3 -I/usr/local/include -c mx/BeeBase/mxBeeBase/btr.c -o build/temp.linux-i686-2.3/mx/BeeBase/mxBeeBase/mxBeeBa se/mx/BeeBase/mxBeeBase/btr.o mx/BeeBase/mxBeeBase/btr.c: In function `dumpBuf': mx/BeeBase/mxBeeBase/btr.c:249: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:250: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:255: warning: unsigned int format, long unsigned int arg (arg 4) mx/BeeBase/mxBeeBase/btr.c:256: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c: In function `_validateTree': mx/BeeBase/mxBeeBase/btr.c:330: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:337: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:339: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:349: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:351: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 3) creating build/lib.linux-i686-2.3/mx/BeeBase creating build/lib.linux-i686-2.3/mx/BeeBase/mxBeeBase -------------- Would someone be kind enough to let me know whether these messages were expected, and if not, how I might resolve these? Thanks! DC __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 22:06:33 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 17 08:02:47 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> References: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Message-ID: <4277CBB9.8020302@egenix.com> Dianne Chen wrote: > Hi all- > > I am trying to build the mx-base package, v.2.0.6. > This will be used with postgresql 7.3.9, psycopg > 1.1.18, and Roundup 0.8.2. > > RHEL 3.0 > Python 2.3 > egenix-mx-base-2.0.6.tar.gz > > I performed a: > > /usr/local/bin/python2.3 setup.py install > > Everything looks proper with the exeception of this > series of warning statements: > > ----------------- > ... > -------------- > > Would someone be kind enough to let me know whether > these messages were expected, and if not, how I might > resolve these? These warning can safely be ignored. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 13:41:14 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Tue Jan 17 08:02:47 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: 6667 Message-ID: <20050503194114.72091.qmail@web31414.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Dianne Chen wrote: > > Hi all- > > > > I am trying to build the mx-base package, v.2.0.6. > > This will be used with postgresql 7.3.9, psycopg > > 1.1.18, and Roundup 0.8.2. > > > > RHEL 3.0 > > Python 2.3 > > egenix-mx-base-2.0.6.tar.gz > > > > I performed a: > > > > /usr/local/bin/python2.3 setup.py install > > > > Everything looks proper with the exeception of > this > > series of warning statements: > > > > ----------------- > > ... > > -------------- > > > > Would someone be kind enough to let me know > whether > > these messages were expected, and if not, how I > might > > resolve these? > > These warning can safely be ignored. > > -- > Marc-Andre Lemburg > eGenix.com > Marc- Thank you very much for the reply. It helps greatly. With kind regards, DC __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From davidrushby at yahoo.com Tue May 3 17:18:46 2005 From: davidrushby at yahoo.com (David Rushby) Date: Tue Jan 17 08:02:47 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050503231846.35012.qmail@web30009.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > I'm not sure whether your analysis of the problem is correct... Indeed, my original analysis wasn't correct; I think this one is. The fatal error I'm complaining about only arises if the arguments to DateTime.DateTime are invalid, so that the object is deallocated in the onError block of mxDateTime_FromDateAndTime. If the object is created successfully, and later deallocated by Python's garbage collector, the fatal error doesn't arise. Here's my analysis of the problem: --- If the debugging directive Py_TRACE_REFS is enabled, as it is in my case, the Python interpreter maintains a doubly linked list of all Python objects (named refchain) via the _ob_next and _ob_prev pointers added to PyObject via _PyObject_HEAD_EXTRA. Each object is inserted into refchain by the _Py_AddToAllObjects call in _Py_NewReference, and removed from refchain by the _Py_ForgetReference call in _Py_Dealloc. _Py_ForgetReference performs an integrity check on the object being deallocated (op) to make sure that its neighbors in refchain recognize it. Specifically, _Py_ForgetReference verifies that the _ob_next pointer of the previous object in refchain (op->_ob_prev->_ob_next) points to op, and that the _ob_prev pointer of the next object in refchain (op->_ob_next->_ob_prev) points to op. If either of those conditions is false, the interpreter raises the fatal error I'm seeing. After mxDateTime_New pulls an mxDateTimeObject out of the free list, it calls _Py_NewReference on that object to transform it from a "conceptually deallocated" object to a "conceptually allocated" one. _Py_NewReference inserts the object into refchain. Later, when the object is being "conceptually deallocated", it should be removed from refchain with _Py_ForgetReference. The version of _Py_Dealloc that's active when Py_TRACE_REFS is enabled does this (_Py_Dealloc is the element of Py_DECREF that performs the actual destruction). _Py_Dealloc first calls _Py_ForgetReference to remove the object from refchain, then calls the object's destructor (op->ob_type->tp_dealloc). If WANT_SUBCLASSABLE_TYPES is not defined (it is not in my case), the destructor for mxDateTime_Type is mxDateTime_Free. So, if a DateTime object is deallocated normally, as a result of its reference count falling to zero, _Py_Dealloc is called on the object, which first removes it from refchain, then passes it to mxDateTime_Free. If a DateTime object is destroyed prematurely, as a result of invalid arguments to its destructor, the onError handler calls mxDateTime_Free, so the object is "conceptually deallocated" (placed in the free list), *but* the object is not removed from refchain. So if a refchain-membership-integrity-check is performed on the object in question or one of its immediate neighbors in refchain, that integrity check fails, leading to the fatal error. --- The solution is to 'Py_DECREF(...)' the object in the onError handler of its constructor, instead of passing the object directly to mxDateTime_Free. That change solves two problems: 1) It causes _Py_Dealloc to execute, which in turn executes _Py_ForgetReference, so the object is removed from refchain, as it should be. 2) At present, objects that are created successfully and later deallocated by normal reference count mechanics have a reference count of 0 when they enter the free list, whereas objects whose constructors abort their creation due to invalid arguments have a reference count of 1 when they enter the free list. Although AFAIK this doesn't cause an actual execution problem (because the object's reference count is *explicitly set to 1* rather than *incremented by 1* when the object is later "conceptually allocated" by _Py_NewReference), it is likely to confuse future maintainers and thereby lead to the introduction of an actual execution problem. I assume that if you agree that this is a reasonable solution, you'll want to apply the change not only to mxDateTime_FromDateAndTime, but to all similar constructors in mxDateTime.c. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From rj at maxxian.com Thu May 5 01:57:40 2005 From: rj at maxxian.com (RJ Juneau) Date: Tue Jan 17 08:02:47 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c5512e$f72798c0$6505a8c0@rjlaptop> I'm on the 30 day evaluation for mxodbc_zope_da. I'm getting the following error when I submit some queries: Error Type: KeyError Error Value: 'query' I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 with UCS4. The error seems to be caused by multiple rows being returned. I did see an earlier posting with the same error message. The response suggested a template error, but this is clearly not the case here. The additional evidence I've gathered so far: - I'm running the test directly from the ZSQL method, so there's no template involved. - If I use the same query with an additional "where" clause to ensure that only one row is returned, it works - If I use a value in the 'where' clause with no rows returned, it works - The same ZSQL query is being used on a Windows machine running Zope and the free ZODBC module without a problem - The query has been verified directly in mysql-client-browser Other info: - The database is MySQL 4.1.10A-0 - iODBC is the DB driver RJ Juneau -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050505/68d278bf/attachment-0017.htm From mal at egenix.com Thu May 5 12:37:43 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 17 08:02:47 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c5512e$f72798c0$6505a8c0@rjlaptop> References: <000301c5512e$f72798c0$6505a8c0@rjlaptop> Message-ID: <4279E967.6010904@egenix.com> RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 > with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 09:37:42 2005 From: rj at maxxian.com (RJ Juneau) Date: Tue Jan 17 08:02:47 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000101c5516f$3b96de90$6505a8c0@rjlaptop> More interesting info on the problem: If I execute the query directly in the "test" window of the base eGenix mxODBC Database Connection window, it works fine and returns the 20 lines expected. That could point to a problem in the rendering, which seems to be where the traceback ends. Note that within the same Zope system I also have an ODBC connection to a Sybase database, and I have successfully tested multi-line ZSQL queries there. This is the traceback: Time 2005/05/05 07:55:15.294 GMT-4 Exception Type KeyError Exception Value 'query' Traceback (innermost last): Module ZPublisher.Publish, line 101, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 39, in call_object Module Shared.DC.ZRDB.DA, line 337, in manage_test Module DocumentTemplate.DT_String, line 474, in __call__ Module DocumentTemplate.DT_In, line 602, in renderwb Module DocumentTemplate.DT_Var, line 219, in render KeyError: 'query' I don't think the following is an issue, but I'll include it for completeness.I am also getting the following iODBC warnings and errors in the Zope console log, which are related to the ODBC parameters being passed by iODBC. Note that these errors also appear for all of the successful queries. [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (Setup). [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (UsageCount). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Timeout). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Reuse). As for the ZSQL snippet from the template... Since there's no template involved yet (I'm still testing directly from the ZSQL method), I assume you mean the SQL code? select h.host_name, s.system_name, s.system_handle, count(*) from terminal t, system_map s, host h where t.system_index = s.system_index and s.host_index = h.host_index group by s.system_name order by h.host_name Nothing complicated here. There are no parameters passed to the query. RJ -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: May 5, 2005 5:38 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: Re: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is > 2.3.4 with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ---------------------------------------------------------------------- > -- > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 16:00:32 2005 From: charlie at egenix.com (Charlie Clark) Date: Tue Jan 17 08:02:47 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000101c5516f$3b96de90$6505a8c0@rjlaptop> References: <000101c5516f$3b96de90$6505a8c0@rjlaptop> Message-ID: <20050505150032.644.1@bepc.1115296715.fake> On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base eGenix > mxODBC Database Connection window, it works fine and returns the 20 > lines expected. That could point to a problem in the rendering, which > seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection to > a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 10:22:17 2005 From: rj at maxxian.com (RJ Juneau) Date: Tue Jan 17 08:02:47 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505150032.644.1@bepc.1115296715.fake> Message-ID: <000201c55175$75bcad10$6505a8c0@rjlaptop> At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 11:47:14 2005 From: rj at maxxian.com (RJ Juneau) Date: Tue Jan 17 08:02:47 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c55181$549be0e0$6505a8c0@rjlaptop> Charlie, I found a fix. Here it is in case anyone else runs into this. You were correct - the problem is in another part of Zope. Based on your feedback, I did a bit more searching and found something here: http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. html The problem appears to be in Zope versions after 2.7.0. I'm running 2.7.6, and the post indicates that it also happens in 2.7.4. The solution: Edit file /lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. There are two lines in the file that start with . Edit them as follows: Change first line to: Change second line to: Just to be after, I shut down Zope before I made the changes and restarted it after. Thanks for the help! RJ -----Original Message----- From: RJ Juneau [mailto:rj@maxxian.com] Sent: May 5, 2005 9:22 AM To: 'Charlie Clark' Cc: 'egenix-users@lists.egenix.com' Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 17:57:25 2005 From: charlie at egenix.com (Charlie Clark) Date: Tue Jan 17 08:02:47 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <20050505165725.3380.2@bepc.1115296715.fake> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Thu May 5 09:15:21 2005 From: charlie at egenix.com (Charlie Clark) Date: Tue Jan 17 08:02:47 2006 Subject: [Zope-DB] RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <000001c55185$41477730$6b00a8c0@fonacier.local> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________ Zope-DB mailing list Zope-DB@zope.org http://mail.zope.org/mailman/listinfo/zope-db From rj at maxxian.com Thu May 5 12:38:00 2005 From: rj at maxxian.com (RJ Juneau) Date: Tue Jan 17 08:02:47 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000001c55188$6b841eb0$6505a8c0@rjlaptop> I just double-checked. Zope-2.7.6-final. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 12:49:16 2005 From: rj at maxxian.com (RJ Juneau) Date: Tue Jan 17 08:02:47 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000501c55189$fe149ba0$6505a8c0@rjlaptop> Charlie, The fix has only been applied for 2.7.7, 2.8b2. The info is in the original bug report which is closed and can be found here: http://www.zope.org/Collectors/Zope/1745 RJ -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Fri May 6 11:50:09 2005 From: rj at maxxian.com (RJ Juneau) Date: Tue Jan 17 08:02:47 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC Message-ID: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Still on eval for the product. I cannot get a stable connection to Sybase via the iODBC drivers. - The Sybase ODBC connection - including a query - have been verified at the iODBC level. - The setup is already working well for ODBC connection to MySQL. Symptoms include: - If I click on "Open Connection", it still comes back with "Connection Closed" when I go to a ZSQL method - Using 'Connect on Demand' is not working either. - Clicking "Open Connection" gives me the following error: Connection string: DSN=lixbox_sybase; UID=sa; PWD=XXXXXXX Connection pool entry: 0 Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection rejected by data source', 7952) The odbc.ini definition for DSN "lixbox_sybase" is as follows: [lixbox_sybase] JetFix = No NoRowSetSizeLimit = No Description = Test connection to listbox Options = LIXBOX DSQUERY = SQLSERVER TDSHOST = lixbox TDSPORT = 5000 TDSVER = 5.0 SQLSERVER_CATALOG = N CURSOR_SENSITIVITY = LOW UserName = sa Password = XXXXXXXX ServerType = Sybase 10/11/12 Driver = /opt/openlink/lib/sql_mt_lt.so Database = pubs2 ReadOnly = no NoAutoCommit = No NoLoginBox = No FetchBufferSize = 60 Other relevant data: - Connecting via OpenLink's iODBC - Zope 2.7.6-final - Python 2.3.4 - Connection to Sybase has been successfully tested with iODBC, including issuing a query - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC connection RJ Juneau Chief Technology Officer Maxxian Integration Inc. 155 Westhampton Drive Thornhill, Ontario Canada L4J 7X2 E-mail: rj@maxxian.com Phone: +1 905 482 9429 Cell: +1 416 897 6682 Toll free: +1 866 758 9161 Fax: +1 647 722 2038 -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050506/aef33361/attachment-0017.htm From mal at egenix.com Fri May 6 18:27:37 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 17 08:02:47 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC In-Reply-To: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> References: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Message-ID: <427B8CE9.1010601@egenix.com> RJ Juneau wrote: > Still on eval for the product. > > I cannot get a stable connection to Sybase via the iODBC drivers. > > - The Sybase ODBC connection - including a query - have been verified at > the iODBC level. > - The setup is already working well for ODBC connection to MySQL. > > Symptoms include: > > - If I click on "Open Connection", it still comes back with "Connection > Closed" when I go to a ZSQL method > - Using 'Connect on Demand' is not working either. > - Clicking "Open Connection" gives me the following error: > > Connection string: DSN=lixbox_sybase; > UID=sa; > PWD=XXXXXXX Try writing the connection string on one line and without whitespace. ODBC drivers sometimes have problems with this. > Connection pool entry: 0 > Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection > rejected by data source', 7952) This is a generic error that relates to authentication or firewall problems. It is possible that turning on ODBC tracing the ODBC manager will give more clues as to the real cause of the problem. > The odbc.ini definition for DSN "lixbox_sybase" is as follows: > > [lixbox_sybase] > JetFix = No > NoRowSetSizeLimit = No > Description = Test connection to listbox > Options = LIXBOX > DSQUERY = SQLSERVER > TDSHOST = lixbox > TDSPORT = 5000 > TDSVER = 5.0 > SQLSERVER_CATALOG = N > CURSOR_SENSITIVITY = LOW > UserName = sa > Password = XXXXXXXX > ServerType = Sybase 10/11/12 > Driver = /opt/openlink/lib/sql_mt_lt.so > Database = pubs2 > ReadOnly = no > NoAutoCommit = No > NoLoginBox = No > FetchBufferSize = 60 > > > Other relevant data: > - Connecting via OpenLink's iODBC > - Zope 2.7.6-final > - Python 2.3.4 > - Connection to Sybase has been successfully tested with iODBC, > including issuing a query > - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC > connection > > > > RJ Juneau > Chief Technology Officer > Maxxian Integration Inc. > 155 Westhampton Drive > Thornhill, Ontario > Canada L4J 7X2 > E-mail: rj@maxxian.com > Phone: +1 905 482 9429 > Cell: +1 416 897 6682 > Toll free: +1 866 758 9161 > Fax: +1 647 722 2038 > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 06 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From calisp at gmail.com Sun May 15 23:49:03 2005 From: calisp at gmail.com (calisp@gmail.com) Date: Tue Jan 17 08:02:47 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK Message-ID: Hi, I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the following error... 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the last phase of a two-phase commit. This shouldn't happen. Traceback (most recent call last): File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one jar.tpc_finish(self) File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish try: self._finish() File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could not perform COMMIT or ROLLBACK', 1023) What could be causing this? Can I get the mxODBCZopeDA source from somewhere? It would make debugging this much easier. Thanks, Calisp. From mal at egenix.com Mon May 16 13:52:12 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 17 08:02:47 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK In-Reply-To: References: Message-ID: <42887B5C.4010109@egenix.com> calisp@gmail.com wrote: > Hi, > > I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with > unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the > following error... > > 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the > last phase of a two-phase commit. This shouldn't happen. > Traceback (most recent call last): > File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one > jar.tpc_finish(self) > File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish > try: self._finish() > File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish > File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler > ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could > not perform COMMIT or ROLLBACK', 1023) You should have a look at the database logs to see what prevented the commit from being completed. > What could be causing this? Hard to say: mxODBCZopeDA is trying to commit the transaction, but the driver or database failed to complete the request. The above error was generated by the ODBC driver. This could be network or DNS problems, or be related to a bug in FreeTDS (which is getting more stable with every new release, but should still be considered beta quality software at the moment). > Can I get the mxODBCZopeDA source from > somewhere? It would make debugging this much easier. Getting the source is not an option and won't help much either since the source of the problem is not mxODBCZopeDA. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 16 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Sun May 1 21:29:25 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 17 12:01:13 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <427259F3.4090806@egenix.com> References: <20050427130906.52878.qmail@web30008.mail.mud.yahoo.com> <427259F3.4090806@egenix.com> Message-ID: <42752005.7080904@egenix.com> M.-A. Lemburg wrote: > David Rushby wrote: > >> --- "M.-A. Lemburg" wrote: >> >>> Are you using the standard mxDateTime build or one >>> with WANT_SUBCLASSABLE_TYPES defined... >> >> >> >> Presumably "the standard", since I just built with 'py24d setup.py >> build', making no attempt to enable special directives. >> >> >>> ... (mxDateTime_Deallocate is only used by the latter)? >> >> >> >> That's true in 2.1.0-2005-04-15, but not in 2.1.0b5. >> >> >>> In any case, please try our latest snapshot: >>> >>> >> >> http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-04-15.zip >> >>> to see if that makes any difference. >> >> >> >> I can't build it out of the box: > > > Hmm, looks like distutils' sdist command doesn't like our new > repository layout which uses symlinks (after we've switched to > subversion). > > We'll have to debug distutils first, I guess :-( Ok, we've found the problem and fixed it. Here's the new release (which does build out of the box at least on our boxes ;-): http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 01 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From davidrushby at yahoo.com Mon May 2 15:49:53 2005 From: davidrushby at yahoo.com (David Rushby) Date: Tue Jan 17 12:01:13 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Ok, we've found the problem and fixed it. Here's the new > release (which does build out of the box at least on our > boxes ;-): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip It does build now, but: py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" still behaves as it did when I submitted my original message: Fatal Python error: UNREF invalid object Aborted This is the same debug build of Python 2.4.1 that I was previously using, running the same configuration (CentOS Linux 4.0/i386, everything compiled with GCC 3.4.3). Have you examined my original claim as to the cause of the bug? __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 10:21:55 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 17 12:01:13 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> References: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> Message-ID: <42772693.8050306@egenix.com> David Rushby wrote: > --- "M.-A. Lemburg" wrote: > >>Ok, we've found the problem and fixed it. Here's the new >>release (which does build out of the box at least on our >>boxes ;-): >> >> > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip > > It does build now, but: > py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" > still behaves as it did when I submitted my original message: > Fatal Python error: UNREF invalid object > Aborted > > This is the same debug build of Python 2.4.1 that I was previously > using, running the same configuration (CentOS Linux 4.0/i386, > everything compiled with GCC 3.4.3). > > Have you examined my original claim as to the cause of the bug? No. We haven't had time for looking into it. I'm not sure whether your analysis of the problem is correct: if you don't define WANT_SUBCLASSABLE_TYPES, the API mxDateTime_Deallocate() is neither defined nor used. Furthermore, PyObject_Del() is only called by mxDateTime_Free() if you have explicitely edited mxDateTime.c to disabled the free list #defines. In a standard build, PyObject_Del() is only called at module finalization time. Note that the reason we call mxDateTime_Free() in the constructor is that we don't want the destructor of the object to be called. Py_DECREF() would call the destructor (mxDateTime_Deallocate). It is possible that the debug code in Python complains about the refcount in the object not being 0 at the time the object is finalized (module finalization time), but I don't see any such checks in PyObject_Free() (which is what PyObject_Del() maps to). Again, all of this does not happen in regular non-debug Python builds. Please be aware that we don't support debug builds, so fixing the problem (if there is one - gcc has some serious optimization problems on some combinations of platform and version) will take a while. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 09:27:37 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Tue Jan 17 12:01:13 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 Message-ID: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Hi all- I am trying to build the mx-base package, v.2.0.6. This will be used with postgresql 7.3.9, psycopg 1.1.18, and Roundup 0.8.2. RHEL 3.0 Python 2.3 egenix-mx-base-2.0.6.tar.gz I performed a: /usr/local/bin/python2.3 setup.py install Everything looks proper with the exeception of this series of warning statements: ----------------- gcc -pthread -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fno-strict-aliasing -fPIC -Imx/BeeBase/mxBeeBase -I/usr/local/incl ude/python2.3 -I/usr/local/include -c mx/BeeBase/mxBeeBase/btr.c -o build/temp.linux-i686-2.3/mx/BeeBase/mxBeeBase/mxBeeBa se/mx/BeeBase/mxBeeBase/btr.o mx/BeeBase/mxBeeBase/btr.c: In function `dumpBuf': mx/BeeBase/mxBeeBase/btr.c:249: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:250: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:255: warning: unsigned int format, long unsigned int arg (arg 4) mx/BeeBase/mxBeeBase/btr.c:256: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c: In function `_validateTree': mx/BeeBase/mxBeeBase/btr.c:330: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:337: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:339: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:349: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:351: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 3) creating build/lib.linux-i686-2.3/mx/BeeBase creating build/lib.linux-i686-2.3/mx/BeeBase/mxBeeBase -------------- Would someone be kind enough to let me know whether these messages were expected, and if not, how I might resolve these? Thanks! DC __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 22:06:33 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 17 12:01:13 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> References: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Message-ID: <4277CBB9.8020302@egenix.com> Dianne Chen wrote: > Hi all- > > I am trying to build the mx-base package, v.2.0.6. > This will be used with postgresql 7.3.9, psycopg > 1.1.18, and Roundup 0.8.2. > > RHEL 3.0 > Python 2.3 > egenix-mx-base-2.0.6.tar.gz > > I performed a: > > /usr/local/bin/python2.3 setup.py install > > Everything looks proper with the exeception of this > series of warning statements: > > ----------------- > ... > -------------- > > Would someone be kind enough to let me know whether > these messages were expected, and if not, how I might > resolve these? These warning can safely be ignored. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 13:41:14 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Tue Jan 17 12:01:13 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: 6667 Message-ID: <20050503194114.72091.qmail@web31414.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Dianne Chen wrote: > > Hi all- > > > > I am trying to build the mx-base package, v.2.0.6. > > This will be used with postgresql 7.3.9, psycopg > > 1.1.18, and Roundup 0.8.2. > > > > RHEL 3.0 > > Python 2.3 > > egenix-mx-base-2.0.6.tar.gz > > > > I performed a: > > > > /usr/local/bin/python2.3 setup.py install > > > > Everything looks proper with the exeception of > this > > series of warning statements: > > > > ----------------- > > ... > > -------------- > > > > Would someone be kind enough to let me know > whether > > these messages were expected, and if not, how I > might > > resolve these? > > These warning can safely be ignored. > > -- > Marc-Andre Lemburg > eGenix.com > Marc- Thank you very much for the reply. It helps greatly. With kind regards, DC __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From davidrushby at yahoo.com Tue May 3 17:18:46 2005 From: davidrushby at yahoo.com (David Rushby) Date: Tue Jan 17 12:01:14 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050503231846.35012.qmail@web30009.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > I'm not sure whether your analysis of the problem is correct... Indeed, my original analysis wasn't correct; I think this one is. The fatal error I'm complaining about only arises if the arguments to DateTime.DateTime are invalid, so that the object is deallocated in the onError block of mxDateTime_FromDateAndTime. If the object is created successfully, and later deallocated by Python's garbage collector, the fatal error doesn't arise. Here's my analysis of the problem: --- If the debugging directive Py_TRACE_REFS is enabled, as it is in my case, the Python interpreter maintains a doubly linked list of all Python objects (named refchain) via the _ob_next and _ob_prev pointers added to PyObject via _PyObject_HEAD_EXTRA. Each object is inserted into refchain by the _Py_AddToAllObjects call in _Py_NewReference, and removed from refchain by the _Py_ForgetReference call in _Py_Dealloc. _Py_ForgetReference performs an integrity check on the object being deallocated (op) to make sure that its neighbors in refchain recognize it. Specifically, _Py_ForgetReference verifies that the _ob_next pointer of the previous object in refchain (op->_ob_prev->_ob_next) points to op, and that the _ob_prev pointer of the next object in refchain (op->_ob_next->_ob_prev) points to op. If either of those conditions is false, the interpreter raises the fatal error I'm seeing. After mxDateTime_New pulls an mxDateTimeObject out of the free list, it calls _Py_NewReference on that object to transform it from a "conceptually deallocated" object to a "conceptually allocated" one. _Py_NewReference inserts the object into refchain. Later, when the object is being "conceptually deallocated", it should be removed from refchain with _Py_ForgetReference. The version of _Py_Dealloc that's active when Py_TRACE_REFS is enabled does this (_Py_Dealloc is the element of Py_DECREF that performs the actual destruction). _Py_Dealloc first calls _Py_ForgetReference to remove the object from refchain, then calls the object's destructor (op->ob_type->tp_dealloc). If WANT_SUBCLASSABLE_TYPES is not defined (it is not in my case), the destructor for mxDateTime_Type is mxDateTime_Free. So, if a DateTime object is deallocated normally, as a result of its reference count falling to zero, _Py_Dealloc is called on the object, which first removes it from refchain, then passes it to mxDateTime_Free. If a DateTime object is destroyed prematurely, as a result of invalid arguments to its destructor, the onError handler calls mxDateTime_Free, so the object is "conceptually deallocated" (placed in the free list), *but* the object is not removed from refchain. So if a refchain-membership-integrity-check is performed on the object in question or one of its immediate neighbors in refchain, that integrity check fails, leading to the fatal error. --- The solution is to 'Py_DECREF(...)' the object in the onError handler of its constructor, instead of passing the object directly to mxDateTime_Free. That change solves two problems: 1) It causes _Py_Dealloc to execute, which in turn executes _Py_ForgetReference, so the object is removed from refchain, as it should be. 2) At present, objects that are created successfully and later deallocated by normal reference count mechanics have a reference count of 0 when they enter the free list, whereas objects whose constructors abort their creation due to invalid arguments have a reference count of 1 when they enter the free list. Although AFAIK this doesn't cause an actual execution problem (because the object's reference count is *explicitly set to 1* rather than *incremented by 1* when the object is later "conceptually allocated" by _Py_NewReference), it is likely to confuse future maintainers and thereby lead to the introduction of an actual execution problem. I assume that if you agree that this is a reasonable solution, you'll want to apply the change not only to mxDateTime_FromDateAndTime, but to all similar constructors in mxDateTime.c. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From rj at maxxian.com Thu May 5 01:57:40 2005 From: rj at maxxian.com (RJ Juneau) Date: Tue Jan 17 12:01:14 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c5512e$f72798c0$6505a8c0@rjlaptop> I'm on the 30 day evaluation for mxodbc_zope_da. I'm getting the following error when I submit some queries: Error Type: KeyError Error Value: 'query' I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 with UCS4. The error seems to be caused by multiple rows being returned. I did see an earlier posting with the same error message. The response suggested a template error, but this is clearly not the case here. The additional evidence I've gathered so far: - I'm running the test directly from the ZSQL method, so there's no template involved. - If I use the same query with an additional "where" clause to ensure that only one row is returned, it works - If I use a value in the 'where' clause with no rows returned, it works - The same ZSQL query is being used on a Windows machine running Zope and the free ZODBC module without a problem - The query has been verified directly in mysql-client-browser Other info: - The database is MySQL 4.1.10A-0 - iODBC is the DB driver RJ Juneau -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050505/68d278bf/attachment-0018.htm From mal at egenix.com Thu May 5 12:37:43 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 17 12:01:14 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c5512e$f72798c0$6505a8c0@rjlaptop> References: <000301c5512e$f72798c0$6505a8c0@rjlaptop> Message-ID: <4279E967.6010904@egenix.com> RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 > with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 09:37:42 2005 From: rj at maxxian.com (RJ Juneau) Date: Tue Jan 17 12:01:14 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000101c5516f$3b96de90$6505a8c0@rjlaptop> More interesting info on the problem: If I execute the query directly in the "test" window of the base eGenix mxODBC Database Connection window, it works fine and returns the 20 lines expected. That could point to a problem in the rendering, which seems to be where the traceback ends. Note that within the same Zope system I also have an ODBC connection to a Sybase database, and I have successfully tested multi-line ZSQL queries there. This is the traceback: Time 2005/05/05 07:55:15.294 GMT-4 Exception Type KeyError Exception Value 'query' Traceback (innermost last): Module ZPublisher.Publish, line 101, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 39, in call_object Module Shared.DC.ZRDB.DA, line 337, in manage_test Module DocumentTemplate.DT_String, line 474, in __call__ Module DocumentTemplate.DT_In, line 602, in renderwb Module DocumentTemplate.DT_Var, line 219, in render KeyError: 'query' I don't think the following is an issue, but I'll include it for completeness.I am also getting the following iODBC warnings and errors in the Zope console log, which are related to the ODBC parameters being passed by iODBC. Note that these errors also appear for all of the successful queries. [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (Setup). [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (UsageCount). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Timeout). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Reuse). As for the ZSQL snippet from the template... Since there's no template involved yet (I'm still testing directly from the ZSQL method), I assume you mean the SQL code? select h.host_name, s.system_name, s.system_handle, count(*) from terminal t, system_map s, host h where t.system_index = s.system_index and s.host_index = h.host_index group by s.system_name order by h.host_name Nothing complicated here. There are no parameters passed to the query. RJ -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: May 5, 2005 5:38 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: Re: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is > 2.3.4 with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ---------------------------------------------------------------------- > -- > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 16:00:32 2005 From: charlie at egenix.com (Charlie Clark) Date: Tue Jan 17 12:01:14 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000101c5516f$3b96de90$6505a8c0@rjlaptop> References: <000101c5516f$3b96de90$6505a8c0@rjlaptop> Message-ID: <20050505150032.644.1@bepc.1115296715.fake> On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base eGenix > mxODBC Database Connection window, it works fine and returns the 20 > lines expected. That could point to a problem in the rendering, which > seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection to > a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 10:22:17 2005 From: rj at maxxian.com (RJ Juneau) Date: Tue Jan 17 12:01:14 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505150032.644.1@bepc.1115296715.fake> Message-ID: <000201c55175$75bcad10$6505a8c0@rjlaptop> At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 11:47:14 2005 From: rj at maxxian.com (RJ Juneau) Date: Tue Jan 17 12:01:14 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c55181$549be0e0$6505a8c0@rjlaptop> Charlie, I found a fix. Here it is in case anyone else runs into this. You were correct - the problem is in another part of Zope. Based on your feedback, I did a bit more searching and found something here: http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. html The problem appears to be in Zope versions after 2.7.0. I'm running 2.7.6, and the post indicates that it also happens in 2.7.4. The solution: Edit file /lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. There are two lines in the file that start with . Edit them as follows: Change first line to: Change second line to: Just to be after, I shut down Zope before I made the changes and restarted it after. Thanks for the help! RJ -----Original Message----- From: RJ Juneau [mailto:rj@maxxian.com] Sent: May 5, 2005 9:22 AM To: 'Charlie Clark' Cc: 'egenix-users@lists.egenix.com' Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 17:57:25 2005 From: charlie at egenix.com (Charlie Clark) Date: Tue Jan 17 12:01:14 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <20050505165725.3380.2@bepc.1115296715.fake> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Thu May 5 09:15:21 2005 From: charlie at egenix.com (Charlie Clark) Date: Tue Jan 17 12:01:14 2006 Subject: [Zope-DB] RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <000001c55185$41477730$6b00a8c0@fonacier.local> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________ Zope-DB mailing list Zope-DB@zope.org http://mail.zope.org/mailman/listinfo/zope-db From rj at maxxian.com Thu May 5 12:38:00 2005 From: rj at maxxian.com (RJ Juneau) Date: Tue Jan 17 12:01:14 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000001c55188$6b841eb0$6505a8c0@rjlaptop> I just double-checked. Zope-2.7.6-final. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 12:49:16 2005 From: rj at maxxian.com (RJ Juneau) Date: Tue Jan 17 12:01:14 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000501c55189$fe149ba0$6505a8c0@rjlaptop> Charlie, The fix has only been applied for 2.7.7, 2.8b2. The info is in the original bug report which is closed and can be found here: http://www.zope.org/Collectors/Zope/1745 RJ -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Fri May 6 11:50:09 2005 From: rj at maxxian.com (RJ Juneau) Date: Tue Jan 17 12:01:14 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC Message-ID: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Still on eval for the product. I cannot get a stable connection to Sybase via the iODBC drivers. - The Sybase ODBC connection - including a query - have been verified at the iODBC level. - The setup is already working well for ODBC connection to MySQL. Symptoms include: - If I click on "Open Connection", it still comes back with "Connection Closed" when I go to a ZSQL method - Using 'Connect on Demand' is not working either. - Clicking "Open Connection" gives me the following error: Connection string: DSN=lixbox_sybase; UID=sa; PWD=XXXXXXX Connection pool entry: 0 Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection rejected by data source', 7952) The odbc.ini definition for DSN "lixbox_sybase" is as follows: [lixbox_sybase] JetFix = No NoRowSetSizeLimit = No Description = Test connection to listbox Options = LIXBOX DSQUERY = SQLSERVER TDSHOST = lixbox TDSPORT = 5000 TDSVER = 5.0 SQLSERVER_CATALOG = N CURSOR_SENSITIVITY = LOW UserName = sa Password = XXXXXXXX ServerType = Sybase 10/11/12 Driver = /opt/openlink/lib/sql_mt_lt.so Database = pubs2 ReadOnly = no NoAutoCommit = No NoLoginBox = No FetchBufferSize = 60 Other relevant data: - Connecting via OpenLink's iODBC - Zope 2.7.6-final - Python 2.3.4 - Connection to Sybase has been successfully tested with iODBC, including issuing a query - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC connection RJ Juneau Chief Technology Officer Maxxian Integration Inc. 155 Westhampton Drive Thornhill, Ontario Canada L4J 7X2 E-mail: rj@maxxian.com Phone: +1 905 482 9429 Cell: +1 416 897 6682 Toll free: +1 866 758 9161 Fax: +1 647 722 2038 -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050506/aef33361/attachment-0018.htm From mal at egenix.com Fri May 6 18:27:37 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 17 12:01:14 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC In-Reply-To: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> References: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Message-ID: <427B8CE9.1010601@egenix.com> RJ Juneau wrote: > Still on eval for the product. > > I cannot get a stable connection to Sybase via the iODBC drivers. > > - The Sybase ODBC connection - including a query - have been verified at > the iODBC level. > - The setup is already working well for ODBC connection to MySQL. > > Symptoms include: > > - If I click on "Open Connection", it still comes back with "Connection > Closed" when I go to a ZSQL method > - Using 'Connect on Demand' is not working either. > - Clicking "Open Connection" gives me the following error: > > Connection string: DSN=lixbox_sybase; > UID=sa; > PWD=XXXXXXX Try writing the connection string on one line and without whitespace. ODBC drivers sometimes have problems with this. > Connection pool entry: 0 > Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection > rejected by data source', 7952) This is a generic error that relates to authentication or firewall problems. It is possible that turning on ODBC tracing the ODBC manager will give more clues as to the real cause of the problem. > The odbc.ini definition for DSN "lixbox_sybase" is as follows: > > [lixbox_sybase] > JetFix = No > NoRowSetSizeLimit = No > Description = Test connection to listbox > Options = LIXBOX > DSQUERY = SQLSERVER > TDSHOST = lixbox > TDSPORT = 5000 > TDSVER = 5.0 > SQLSERVER_CATALOG = N > CURSOR_SENSITIVITY = LOW > UserName = sa > Password = XXXXXXXX > ServerType = Sybase 10/11/12 > Driver = /opt/openlink/lib/sql_mt_lt.so > Database = pubs2 > ReadOnly = no > NoAutoCommit = No > NoLoginBox = No > FetchBufferSize = 60 > > > Other relevant data: > - Connecting via OpenLink's iODBC > - Zope 2.7.6-final > - Python 2.3.4 > - Connection to Sybase has been successfully tested with iODBC, > including issuing a query > - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC > connection > > > > RJ Juneau > Chief Technology Officer > Maxxian Integration Inc. > 155 Westhampton Drive > Thornhill, Ontario > Canada L4J 7X2 > E-mail: rj@maxxian.com > Phone: +1 905 482 9429 > Cell: +1 416 897 6682 > Toll free: +1 866 758 9161 > Fax: +1 647 722 2038 > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 06 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From calisp at gmail.com Sun May 15 23:49:03 2005 From: calisp at gmail.com (calisp@gmail.com) Date: Tue Jan 17 12:01:14 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK Message-ID: Hi, I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the following error... 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the last phase of a two-phase commit. This shouldn't happen. Traceback (most recent call last): File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one jar.tpc_finish(self) File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish try: self._finish() File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could not perform COMMIT or ROLLBACK', 1023) What could be causing this? Can I get the mxODBCZopeDA source from somewhere? It would make debugging this much easier. Thanks, Calisp. From mal at egenix.com Mon May 16 13:52:12 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 17 12:01:14 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK In-Reply-To: References: Message-ID: <42887B5C.4010109@egenix.com> calisp@gmail.com wrote: > Hi, > > I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with > unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the > following error... > > 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the > last phase of a two-phase commit. This shouldn't happen. > Traceback (most recent call last): > File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one > jar.tpc_finish(self) > File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish > try: self._finish() > File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish > File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler > ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could > not perform COMMIT or ROLLBACK', 1023) You should have a look at the database logs to see what prevented the commit from being completed. > What could be causing this? Hard to say: mxODBCZopeDA is trying to commit the transaction, but the driver or database failed to complete the request. The above error was generated by the ODBC driver. This could be network or DNS problems, or be related to a bug in FreeTDS (which is getting more stable with every new release, but should still be considered beta quality software at the moment). > Can I get the mxODBCZopeDA source from > somewhere? It would make debugging this much easier. Getting the source is not an option and won't help much either since the source of the problem is not mxODBCZopeDA. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 16 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Sun May 1 21:29:25 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 17 16:00:59 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <427259F3.4090806@egenix.com> References: <20050427130906.52878.qmail@web30008.mail.mud.yahoo.com> <427259F3.4090806@egenix.com> Message-ID: <42752005.7080904@egenix.com> M.-A. Lemburg wrote: > David Rushby wrote: > >> --- "M.-A. Lemburg" wrote: >> >>> Are you using the standard mxDateTime build or one >>> with WANT_SUBCLASSABLE_TYPES defined... >> >> >> >> Presumably "the standard", since I just built with 'py24d setup.py >> build', making no attempt to enable special directives. >> >> >>> ... (mxDateTime_Deallocate is only used by the latter)? >> >> >> >> That's true in 2.1.0-2005-04-15, but not in 2.1.0b5. >> >> >>> In any case, please try our latest snapshot: >>> >>> >> >> http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-04-15.zip >> >>> to see if that makes any difference. >> >> >> >> I can't build it out of the box: > > > Hmm, looks like distutils' sdist command doesn't like our new > repository layout which uses symlinks (after we've switched to > subversion). > > We'll have to debug distutils first, I guess :-( Ok, we've found the problem and fixed it. Here's the new release (which does build out of the box at least on our boxes ;-): http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 01 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From davidrushby at yahoo.com Mon May 2 15:49:53 2005 From: davidrushby at yahoo.com (David Rushby) Date: Tue Jan 17 16:01:00 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Ok, we've found the problem and fixed it. Here's the new > release (which does build out of the box at least on our > boxes ;-): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip It does build now, but: py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" still behaves as it did when I submitted my original message: Fatal Python error: UNREF invalid object Aborted This is the same debug build of Python 2.4.1 that I was previously using, running the same configuration (CentOS Linux 4.0/i386, everything compiled with GCC 3.4.3). Have you examined my original claim as to the cause of the bug? __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 10:21:55 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 17 16:01:00 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> References: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> Message-ID: <42772693.8050306@egenix.com> David Rushby wrote: > --- "M.-A. Lemburg" wrote: > >>Ok, we've found the problem and fixed it. Here's the new >>release (which does build out of the box at least on our >>boxes ;-): >> >> > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip > > It does build now, but: > py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" > still behaves as it did when I submitted my original message: > Fatal Python error: UNREF invalid object > Aborted > > This is the same debug build of Python 2.4.1 that I was previously > using, running the same configuration (CentOS Linux 4.0/i386, > everything compiled with GCC 3.4.3). > > Have you examined my original claim as to the cause of the bug? No. We haven't had time for looking into it. I'm not sure whether your analysis of the problem is correct: if you don't define WANT_SUBCLASSABLE_TYPES, the API mxDateTime_Deallocate() is neither defined nor used. Furthermore, PyObject_Del() is only called by mxDateTime_Free() if you have explicitely edited mxDateTime.c to disabled the free list #defines. In a standard build, PyObject_Del() is only called at module finalization time. Note that the reason we call mxDateTime_Free() in the constructor is that we don't want the destructor of the object to be called. Py_DECREF() would call the destructor (mxDateTime_Deallocate). It is possible that the debug code in Python complains about the refcount in the object not being 0 at the time the object is finalized (module finalization time), but I don't see any such checks in PyObject_Free() (which is what PyObject_Del() maps to). Again, all of this does not happen in regular non-debug Python builds. Please be aware that we don't support debug builds, so fixing the problem (if there is one - gcc has some serious optimization problems on some combinations of platform and version) will take a while. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 09:27:37 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Tue Jan 17 16:01:00 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 Message-ID: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Hi all- I am trying to build the mx-base package, v.2.0.6. This will be used with postgresql 7.3.9, psycopg 1.1.18, and Roundup 0.8.2. RHEL 3.0 Python 2.3 egenix-mx-base-2.0.6.tar.gz I performed a: /usr/local/bin/python2.3 setup.py install Everything looks proper with the exeception of this series of warning statements: ----------------- gcc -pthread -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fno-strict-aliasing -fPIC -Imx/BeeBase/mxBeeBase -I/usr/local/incl ude/python2.3 -I/usr/local/include -c mx/BeeBase/mxBeeBase/btr.c -o build/temp.linux-i686-2.3/mx/BeeBase/mxBeeBase/mxBeeBa se/mx/BeeBase/mxBeeBase/btr.o mx/BeeBase/mxBeeBase/btr.c: In function `dumpBuf': mx/BeeBase/mxBeeBase/btr.c:249: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:250: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:255: warning: unsigned int format, long unsigned int arg (arg 4) mx/BeeBase/mxBeeBase/btr.c:256: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c: In function `_validateTree': mx/BeeBase/mxBeeBase/btr.c:330: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:337: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:339: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:349: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:351: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 3) creating build/lib.linux-i686-2.3/mx/BeeBase creating build/lib.linux-i686-2.3/mx/BeeBase/mxBeeBase -------------- Would someone be kind enough to let me know whether these messages were expected, and if not, how I might resolve these? Thanks! DC __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 22:06:33 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 17 16:01:00 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> References: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Message-ID: <4277CBB9.8020302@egenix.com> Dianne Chen wrote: > Hi all- > > I am trying to build the mx-base package, v.2.0.6. > This will be used with postgresql 7.3.9, psycopg > 1.1.18, and Roundup 0.8.2. > > RHEL 3.0 > Python 2.3 > egenix-mx-base-2.0.6.tar.gz > > I performed a: > > /usr/local/bin/python2.3 setup.py install > > Everything looks proper with the exeception of this > series of warning statements: > > ----------------- > ... > -------------- > > Would someone be kind enough to let me know whether > these messages were expected, and if not, how I might > resolve these? These warning can safely be ignored. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 13:41:14 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Tue Jan 17 16:01:00 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: 6667 Message-ID: <20050503194114.72091.qmail@web31414.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Dianne Chen wrote: > > Hi all- > > > > I am trying to build the mx-base package, v.2.0.6. > > This will be used with postgresql 7.3.9, psycopg > > 1.1.18, and Roundup 0.8.2. > > > > RHEL 3.0 > > Python 2.3 > > egenix-mx-base-2.0.6.tar.gz > > > > I performed a: > > > > /usr/local/bin/python2.3 setup.py install > > > > Everything looks proper with the exeception of > this > > series of warning statements: > > > > ----------------- > > ... > > -------------- > > > > Would someone be kind enough to let me know > whether > > these messages were expected, and if not, how I > might > > resolve these? > > These warning can safely be ignored. > > -- > Marc-Andre Lemburg > eGenix.com > Marc- Thank you very much for the reply. It helps greatly. With kind regards, DC __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From davidrushby at yahoo.com Tue May 3 17:18:46 2005 From: davidrushby at yahoo.com (David Rushby) Date: Tue Jan 17 16:01:00 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050503231846.35012.qmail@web30009.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > I'm not sure whether your analysis of the problem is correct... Indeed, my original analysis wasn't correct; I think this one is. The fatal error I'm complaining about only arises if the arguments to DateTime.DateTime are invalid, so that the object is deallocated in the onError block of mxDateTime_FromDateAndTime. If the object is created successfully, and later deallocated by Python's garbage collector, the fatal error doesn't arise. Here's my analysis of the problem: --- If the debugging directive Py_TRACE_REFS is enabled, as it is in my case, the Python interpreter maintains a doubly linked list of all Python objects (named refchain) via the _ob_next and _ob_prev pointers added to PyObject via _PyObject_HEAD_EXTRA. Each object is inserted into refchain by the _Py_AddToAllObjects call in _Py_NewReference, and removed from refchain by the _Py_ForgetReference call in _Py_Dealloc. _Py_ForgetReference performs an integrity check on the object being deallocated (op) to make sure that its neighbors in refchain recognize it. Specifically, _Py_ForgetReference verifies that the _ob_next pointer of the previous object in refchain (op->_ob_prev->_ob_next) points to op, and that the _ob_prev pointer of the next object in refchain (op->_ob_next->_ob_prev) points to op. If either of those conditions is false, the interpreter raises the fatal error I'm seeing. After mxDateTime_New pulls an mxDateTimeObject out of the free list, it calls _Py_NewReference on that object to transform it from a "conceptually deallocated" object to a "conceptually allocated" one. _Py_NewReference inserts the object into refchain. Later, when the object is being "conceptually deallocated", it should be removed from refchain with _Py_ForgetReference. The version of _Py_Dealloc that's active when Py_TRACE_REFS is enabled does this (_Py_Dealloc is the element of Py_DECREF that performs the actual destruction). _Py_Dealloc first calls _Py_ForgetReference to remove the object from refchain, then calls the object's destructor (op->ob_type->tp_dealloc). If WANT_SUBCLASSABLE_TYPES is not defined (it is not in my case), the destructor for mxDateTime_Type is mxDateTime_Free. So, if a DateTime object is deallocated normally, as a result of its reference count falling to zero, _Py_Dealloc is called on the object, which first removes it from refchain, then passes it to mxDateTime_Free. If a DateTime object is destroyed prematurely, as a result of invalid arguments to its destructor, the onError handler calls mxDateTime_Free, so the object is "conceptually deallocated" (placed in the free list), *but* the object is not removed from refchain. So if a refchain-membership-integrity-check is performed on the object in question or one of its immediate neighbors in refchain, that integrity check fails, leading to the fatal error. --- The solution is to 'Py_DECREF(...)' the object in the onError handler of its constructor, instead of passing the object directly to mxDateTime_Free. That change solves two problems: 1) It causes _Py_Dealloc to execute, which in turn executes _Py_ForgetReference, so the object is removed from refchain, as it should be. 2) At present, objects that are created successfully and later deallocated by normal reference count mechanics have a reference count of 0 when they enter the free list, whereas objects whose constructors abort their creation due to invalid arguments have a reference count of 1 when they enter the free list. Although AFAIK this doesn't cause an actual execution problem (because the object's reference count is *explicitly set to 1* rather than *incremented by 1* when the object is later "conceptually allocated" by _Py_NewReference), it is likely to confuse future maintainers and thereby lead to the introduction of an actual execution problem. I assume that if you agree that this is a reasonable solution, you'll want to apply the change not only to mxDateTime_FromDateAndTime, but to all similar constructors in mxDateTime.c. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From rj at maxxian.com Thu May 5 01:57:40 2005 From: rj at maxxian.com (RJ Juneau) Date: Tue Jan 17 16:01:00 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c5512e$f72798c0$6505a8c0@rjlaptop> I'm on the 30 day evaluation for mxodbc_zope_da. I'm getting the following error when I submit some queries: Error Type: KeyError Error Value: 'query' I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 with UCS4. The error seems to be caused by multiple rows being returned. I did see an earlier posting with the same error message. The response suggested a template error, but this is clearly not the case here. The additional evidence I've gathered so far: - I'm running the test directly from the ZSQL method, so there's no template involved. - If I use the same query with an additional "where" clause to ensure that only one row is returned, it works - If I use a value in the 'where' clause with no rows returned, it works - The same ZSQL query is being used on a Windows machine running Zope and the free ZODBC module without a problem - The query has been verified directly in mysql-client-browser Other info: - The database is MySQL 4.1.10A-0 - iODBC is the DB driver RJ Juneau -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050505/68d278bf/attachment-0019.htm From mal at egenix.com Thu May 5 12:37:43 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 17 16:01:00 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c5512e$f72798c0$6505a8c0@rjlaptop> References: <000301c5512e$f72798c0$6505a8c0@rjlaptop> Message-ID: <4279E967.6010904@egenix.com> RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 > with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 09:37:42 2005 From: rj at maxxian.com (RJ Juneau) Date: Tue Jan 17 16:01:00 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000101c5516f$3b96de90$6505a8c0@rjlaptop> More interesting info on the problem: If I execute the query directly in the "test" window of the base eGenix mxODBC Database Connection window, it works fine and returns the 20 lines expected. That could point to a problem in the rendering, which seems to be where the traceback ends. Note that within the same Zope system I also have an ODBC connection to a Sybase database, and I have successfully tested multi-line ZSQL queries there. This is the traceback: Time 2005/05/05 07:55:15.294 GMT-4 Exception Type KeyError Exception Value 'query' Traceback (innermost last): Module ZPublisher.Publish, line 101, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 39, in call_object Module Shared.DC.ZRDB.DA, line 337, in manage_test Module DocumentTemplate.DT_String, line 474, in __call__ Module DocumentTemplate.DT_In, line 602, in renderwb Module DocumentTemplate.DT_Var, line 219, in render KeyError: 'query' I don't think the following is an issue, but I'll include it for completeness.I am also getting the following iODBC warnings and errors in the Zope console log, which are related to the ODBC parameters being passed by iODBC. Note that these errors also appear for all of the successful queries. [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (Setup). [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (UsageCount). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Timeout). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Reuse). As for the ZSQL snippet from the template... Since there's no template involved yet (I'm still testing directly from the ZSQL method), I assume you mean the SQL code? select h.host_name, s.system_name, s.system_handle, count(*) from terminal t, system_map s, host h where t.system_index = s.system_index and s.host_index = h.host_index group by s.system_name order by h.host_name Nothing complicated here. There are no parameters passed to the query. RJ -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: May 5, 2005 5:38 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: Re: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is > 2.3.4 with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ---------------------------------------------------------------------- > -- > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 16:00:32 2005 From: charlie at egenix.com (Charlie Clark) Date: Tue Jan 17 16:01:00 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000101c5516f$3b96de90$6505a8c0@rjlaptop> References: <000101c5516f$3b96de90$6505a8c0@rjlaptop> Message-ID: <20050505150032.644.1@bepc.1115296715.fake> On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base eGenix > mxODBC Database Connection window, it works fine and returns the 20 > lines expected. That could point to a problem in the rendering, which > seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection to > a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 10:22:17 2005 From: rj at maxxian.com (RJ Juneau) Date: Tue Jan 17 16:01:00 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505150032.644.1@bepc.1115296715.fake> Message-ID: <000201c55175$75bcad10$6505a8c0@rjlaptop> At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 11:47:14 2005 From: rj at maxxian.com (RJ Juneau) Date: Tue Jan 17 16:01:00 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c55181$549be0e0$6505a8c0@rjlaptop> Charlie, I found a fix. Here it is in case anyone else runs into this. You were correct - the problem is in another part of Zope. Based on your feedback, I did a bit more searching and found something here: http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. html The problem appears to be in Zope versions after 2.7.0. I'm running 2.7.6, and the post indicates that it also happens in 2.7.4. The solution: Edit file /lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. There are two lines in the file that start with . Edit them as follows: Change first line to: Change second line to: Just to be after, I shut down Zope before I made the changes and restarted it after. Thanks for the help! RJ -----Original Message----- From: RJ Juneau [mailto:rj@maxxian.com] Sent: May 5, 2005 9:22 AM To: 'Charlie Clark' Cc: 'egenix-users@lists.egenix.com' Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 17:57:25 2005 From: charlie at egenix.com (Charlie Clark) Date: Tue Jan 17 16:01:00 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <20050505165725.3380.2@bepc.1115296715.fake> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Thu May 5 09:15:21 2005 From: charlie at egenix.com (Charlie Clark) Date: Tue Jan 17 16:01:00 2006 Subject: [Zope-DB] RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <000001c55185$41477730$6b00a8c0@fonacier.local> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________ Zope-DB mailing list Zope-DB@zope.org http://mail.zope.org/mailman/listinfo/zope-db From rj at maxxian.com Thu May 5 12:38:00 2005 From: rj at maxxian.com (RJ Juneau) Date: Tue Jan 17 16:01:00 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000001c55188$6b841eb0$6505a8c0@rjlaptop> I just double-checked. Zope-2.7.6-final. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 12:49:16 2005 From: rj at maxxian.com (RJ Juneau) Date: Tue Jan 17 16:01:00 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000501c55189$fe149ba0$6505a8c0@rjlaptop> Charlie, The fix has only been applied for 2.7.7, 2.8b2. The info is in the original bug report which is closed and can be found here: http://www.zope.org/Collectors/Zope/1745 RJ -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Fri May 6 11:50:09 2005 From: rj at maxxian.com (RJ Juneau) Date: Tue Jan 17 16:01:00 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC Message-ID: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Still on eval for the product. I cannot get a stable connection to Sybase via the iODBC drivers. - The Sybase ODBC connection - including a query - have been verified at the iODBC level. - The setup is already working well for ODBC connection to MySQL. Symptoms include: - If I click on "Open Connection", it still comes back with "Connection Closed" when I go to a ZSQL method - Using 'Connect on Demand' is not working either. - Clicking "Open Connection" gives me the following error: Connection string: DSN=lixbox_sybase; UID=sa; PWD=XXXXXXX Connection pool entry: 0 Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection rejected by data source', 7952) The odbc.ini definition for DSN "lixbox_sybase" is as follows: [lixbox_sybase] JetFix = No NoRowSetSizeLimit = No Description = Test connection to listbox Options = LIXBOX DSQUERY = SQLSERVER TDSHOST = lixbox TDSPORT = 5000 TDSVER = 5.0 SQLSERVER_CATALOG = N CURSOR_SENSITIVITY = LOW UserName = sa Password = XXXXXXXX ServerType = Sybase 10/11/12 Driver = /opt/openlink/lib/sql_mt_lt.so Database = pubs2 ReadOnly = no NoAutoCommit = No NoLoginBox = No FetchBufferSize = 60 Other relevant data: - Connecting via OpenLink's iODBC - Zope 2.7.6-final - Python 2.3.4 - Connection to Sybase has been successfully tested with iODBC, including issuing a query - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC connection RJ Juneau Chief Technology Officer Maxxian Integration Inc. 155 Westhampton Drive Thornhill, Ontario Canada L4J 7X2 E-mail: rj@maxxian.com Phone: +1 905 482 9429 Cell: +1 416 897 6682 Toll free: +1 866 758 9161 Fax: +1 647 722 2038 -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050506/aef33361/attachment-0019.htm From mal at egenix.com Fri May 6 18:27:37 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 17 16:01:00 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC In-Reply-To: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> References: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Message-ID: <427B8CE9.1010601@egenix.com> RJ Juneau wrote: > Still on eval for the product. > > I cannot get a stable connection to Sybase via the iODBC drivers. > > - The Sybase ODBC connection - including a query - have been verified at > the iODBC level. > - The setup is already working well for ODBC connection to MySQL. > > Symptoms include: > > - If I click on "Open Connection", it still comes back with "Connection > Closed" when I go to a ZSQL method > - Using 'Connect on Demand' is not working either. > - Clicking "Open Connection" gives me the following error: > > Connection string: DSN=lixbox_sybase; > UID=sa; > PWD=XXXXXXX Try writing the connection string on one line and without whitespace. ODBC drivers sometimes have problems with this. > Connection pool entry: 0 > Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection > rejected by data source', 7952) This is a generic error that relates to authentication or firewall problems. It is possible that turning on ODBC tracing the ODBC manager will give more clues as to the real cause of the problem. > The odbc.ini definition for DSN "lixbox_sybase" is as follows: > > [lixbox_sybase] > JetFix = No > NoRowSetSizeLimit = No > Description = Test connection to listbox > Options = LIXBOX > DSQUERY = SQLSERVER > TDSHOST = lixbox > TDSPORT = 5000 > TDSVER = 5.0 > SQLSERVER_CATALOG = N > CURSOR_SENSITIVITY = LOW > UserName = sa > Password = XXXXXXXX > ServerType = Sybase 10/11/12 > Driver = /opt/openlink/lib/sql_mt_lt.so > Database = pubs2 > ReadOnly = no > NoAutoCommit = No > NoLoginBox = No > FetchBufferSize = 60 > > > Other relevant data: > - Connecting via OpenLink's iODBC > - Zope 2.7.6-final > - Python 2.3.4 > - Connection to Sybase has been successfully tested with iODBC, > including issuing a query > - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC > connection > > > > RJ Juneau > Chief Technology Officer > Maxxian Integration Inc. > 155 Westhampton Drive > Thornhill, Ontario > Canada L4J 7X2 > E-mail: rj@maxxian.com > Phone: +1 905 482 9429 > Cell: +1 416 897 6682 > Toll free: +1 866 758 9161 > Fax: +1 647 722 2038 > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 06 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From calisp at gmail.com Sun May 15 23:49:03 2005 From: calisp at gmail.com (calisp@gmail.com) Date: Tue Jan 17 16:01:00 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK Message-ID: Hi, I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the following error... 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the last phase of a two-phase commit. This shouldn't happen. Traceback (most recent call last): File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one jar.tpc_finish(self) File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish try: self._finish() File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could not perform COMMIT or ROLLBACK', 1023) What could be causing this? Can I get the mxODBCZopeDA source from somewhere? It would make debugging this much easier. Thanks, Calisp. From mal at egenix.com Mon May 16 13:52:12 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 17 16:01:00 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK In-Reply-To: References: Message-ID: <42887B5C.4010109@egenix.com> calisp@gmail.com wrote: > Hi, > > I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with > unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the > following error... > > 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the > last phase of a two-phase commit. This shouldn't happen. > Traceback (most recent call last): > File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one > jar.tpc_finish(self) > File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish > try: self._finish() > File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish > File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler > ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could > not perform COMMIT or ROLLBACK', 1023) You should have a look at the database logs to see what prevented the commit from being completed. > What could be causing this? Hard to say: mxODBCZopeDA is trying to commit the transaction, but the driver or database failed to complete the request. The above error was generated by the ODBC driver. This could be network or DNS problems, or be related to a bug in FreeTDS (which is getting more stable with every new release, but should still be considered beta quality software at the moment). > Can I get the mxODBCZopeDA source from > somewhere? It would make debugging this much easier. Getting the source is not an option and won't help much either since the source of the problem is not mxODBCZopeDA. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 16 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Sun May 1 21:29:25 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 17 20:00:59 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <427259F3.4090806@egenix.com> References: <20050427130906.52878.qmail@web30008.mail.mud.yahoo.com> <427259F3.4090806@egenix.com> Message-ID: <42752005.7080904@egenix.com> M.-A. Lemburg wrote: > David Rushby wrote: > >> --- "M.-A. Lemburg" wrote: >> >>> Are you using the standard mxDateTime build or one >>> with WANT_SUBCLASSABLE_TYPES defined... >> >> >> >> Presumably "the standard", since I just built with 'py24d setup.py >> build', making no attempt to enable special directives. >> >> >>> ... (mxDateTime_Deallocate is only used by the latter)? >> >> >> >> That's true in 2.1.0-2005-04-15, but not in 2.1.0b5. >> >> >>> In any case, please try our latest snapshot: >>> >>> >> >> http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-04-15.zip >> >>> to see if that makes any difference. >> >> >> >> I can't build it out of the box: > > > Hmm, looks like distutils' sdist command doesn't like our new > repository layout which uses symlinks (after we've switched to > subversion). > > We'll have to debug distutils first, I guess :-( Ok, we've found the problem and fixed it. Here's the new release (which does build out of the box at least on our boxes ;-): http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 01 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From davidrushby at yahoo.com Mon May 2 15:49:53 2005 From: davidrushby at yahoo.com (David Rushby) Date: Tue Jan 17 20:00:59 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Ok, we've found the problem and fixed it. Here's the new > release (which does build out of the box at least on our > boxes ;-): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip It does build now, but: py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" still behaves as it did when I submitted my original message: Fatal Python error: UNREF invalid object Aborted This is the same debug build of Python 2.4.1 that I was previously using, running the same configuration (CentOS Linux 4.0/i386, everything compiled with GCC 3.4.3). Have you examined my original claim as to the cause of the bug? __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 10:21:55 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 17 20:00:59 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> References: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> Message-ID: <42772693.8050306@egenix.com> David Rushby wrote: > --- "M.-A. Lemburg" wrote: > >>Ok, we've found the problem and fixed it. Here's the new >>release (which does build out of the box at least on our >>boxes ;-): >> >> > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip > > It does build now, but: > py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" > still behaves as it did when I submitted my original message: > Fatal Python error: UNREF invalid object > Aborted > > This is the same debug build of Python 2.4.1 that I was previously > using, running the same configuration (CentOS Linux 4.0/i386, > everything compiled with GCC 3.4.3). > > Have you examined my original claim as to the cause of the bug? No. We haven't had time for looking into it. I'm not sure whether your analysis of the problem is correct: if you don't define WANT_SUBCLASSABLE_TYPES, the API mxDateTime_Deallocate() is neither defined nor used. Furthermore, PyObject_Del() is only called by mxDateTime_Free() if you have explicitely edited mxDateTime.c to disabled the free list #defines. In a standard build, PyObject_Del() is only called at module finalization time. Note that the reason we call mxDateTime_Free() in the constructor is that we don't want the destructor of the object to be called. Py_DECREF() would call the destructor (mxDateTime_Deallocate). It is possible that the debug code in Python complains about the refcount in the object not being 0 at the time the object is finalized (module finalization time), but I don't see any such checks in PyObject_Free() (which is what PyObject_Del() maps to). Again, all of this does not happen in regular non-debug Python builds. Please be aware that we don't support debug builds, so fixing the problem (if there is one - gcc has some serious optimization problems on some combinations of platform and version) will take a while. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 09:27:37 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Tue Jan 17 20:00:59 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 Message-ID: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Hi all- I am trying to build the mx-base package, v.2.0.6. This will be used with postgresql 7.3.9, psycopg 1.1.18, and Roundup 0.8.2. RHEL 3.0 Python 2.3 egenix-mx-base-2.0.6.tar.gz I performed a: /usr/local/bin/python2.3 setup.py install Everything looks proper with the exeception of this series of warning statements: ----------------- gcc -pthread -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fno-strict-aliasing -fPIC -Imx/BeeBase/mxBeeBase -I/usr/local/incl ude/python2.3 -I/usr/local/include -c mx/BeeBase/mxBeeBase/btr.c -o build/temp.linux-i686-2.3/mx/BeeBase/mxBeeBase/mxBeeBa se/mx/BeeBase/mxBeeBase/btr.o mx/BeeBase/mxBeeBase/btr.c: In function `dumpBuf': mx/BeeBase/mxBeeBase/btr.c:249: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:250: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:255: warning: unsigned int format, long unsigned int arg (arg 4) mx/BeeBase/mxBeeBase/btr.c:256: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c: In function `_validateTree': mx/BeeBase/mxBeeBase/btr.c:330: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:337: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:339: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:349: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:351: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 3) creating build/lib.linux-i686-2.3/mx/BeeBase creating build/lib.linux-i686-2.3/mx/BeeBase/mxBeeBase -------------- Would someone be kind enough to let me know whether these messages were expected, and if not, how I might resolve these? Thanks! DC __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 22:06:33 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 17 20:00:59 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> References: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Message-ID: <4277CBB9.8020302@egenix.com> Dianne Chen wrote: > Hi all- > > I am trying to build the mx-base package, v.2.0.6. > This will be used with postgresql 7.3.9, psycopg > 1.1.18, and Roundup 0.8.2. > > RHEL 3.0 > Python 2.3 > egenix-mx-base-2.0.6.tar.gz > > I performed a: > > /usr/local/bin/python2.3 setup.py install > > Everything looks proper with the exeception of this > series of warning statements: > > ----------------- > ... > -------------- > > Would someone be kind enough to let me know whether > these messages were expected, and if not, how I might > resolve these? These warning can safely be ignored. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 13:41:14 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Tue Jan 17 20:00:59 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: 6667 Message-ID: <20050503194114.72091.qmail@web31414.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Dianne Chen wrote: > > Hi all- > > > > I am trying to build the mx-base package, v.2.0.6. > > This will be used with postgresql 7.3.9, psycopg > > 1.1.18, and Roundup 0.8.2. > > > > RHEL 3.0 > > Python 2.3 > > egenix-mx-base-2.0.6.tar.gz > > > > I performed a: > > > > /usr/local/bin/python2.3 setup.py install > > > > Everything looks proper with the exeception of > this > > series of warning statements: > > > > ----------------- > > ... > > -------------- > > > > Would someone be kind enough to let me know > whether > > these messages were expected, and if not, how I > might > > resolve these? > > These warning can safely be ignored. > > -- > Marc-Andre Lemburg > eGenix.com > Marc- Thank you very much for the reply. It helps greatly. With kind regards, DC __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From davidrushby at yahoo.com Tue May 3 17:18:46 2005 From: davidrushby at yahoo.com (David Rushby) Date: Tue Jan 17 20:00:59 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050503231846.35012.qmail@web30009.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > I'm not sure whether your analysis of the problem is correct... Indeed, my original analysis wasn't correct; I think this one is. The fatal error I'm complaining about only arises if the arguments to DateTime.DateTime are invalid, so that the object is deallocated in the onError block of mxDateTime_FromDateAndTime. If the object is created successfully, and later deallocated by Python's garbage collector, the fatal error doesn't arise. Here's my analysis of the problem: --- If the debugging directive Py_TRACE_REFS is enabled, as it is in my case, the Python interpreter maintains a doubly linked list of all Python objects (named refchain) via the _ob_next and _ob_prev pointers added to PyObject via _PyObject_HEAD_EXTRA. Each object is inserted into refchain by the _Py_AddToAllObjects call in _Py_NewReference, and removed from refchain by the _Py_ForgetReference call in _Py_Dealloc. _Py_ForgetReference performs an integrity check on the object being deallocated (op) to make sure that its neighbors in refchain recognize it. Specifically, _Py_ForgetReference verifies that the _ob_next pointer of the previous object in refchain (op->_ob_prev->_ob_next) points to op, and that the _ob_prev pointer of the next object in refchain (op->_ob_next->_ob_prev) points to op. If either of those conditions is false, the interpreter raises the fatal error I'm seeing. After mxDateTime_New pulls an mxDateTimeObject out of the free list, it calls _Py_NewReference on that object to transform it from a "conceptually deallocated" object to a "conceptually allocated" one. _Py_NewReference inserts the object into refchain. Later, when the object is being "conceptually deallocated", it should be removed from refchain with _Py_ForgetReference. The version of _Py_Dealloc that's active when Py_TRACE_REFS is enabled does this (_Py_Dealloc is the element of Py_DECREF that performs the actual destruction). _Py_Dealloc first calls _Py_ForgetReference to remove the object from refchain, then calls the object's destructor (op->ob_type->tp_dealloc). If WANT_SUBCLASSABLE_TYPES is not defined (it is not in my case), the destructor for mxDateTime_Type is mxDateTime_Free. So, if a DateTime object is deallocated normally, as a result of its reference count falling to zero, _Py_Dealloc is called on the object, which first removes it from refchain, then passes it to mxDateTime_Free. If a DateTime object is destroyed prematurely, as a result of invalid arguments to its destructor, the onError handler calls mxDateTime_Free, so the object is "conceptually deallocated" (placed in the free list), *but* the object is not removed from refchain. So if a refchain-membership-integrity-check is performed on the object in question or one of its immediate neighbors in refchain, that integrity check fails, leading to the fatal error. --- The solution is to 'Py_DECREF(...)' the object in the onError handler of its constructor, instead of passing the object directly to mxDateTime_Free. That change solves two problems: 1) It causes _Py_Dealloc to execute, which in turn executes _Py_ForgetReference, so the object is removed from refchain, as it should be. 2) At present, objects that are created successfully and later deallocated by normal reference count mechanics have a reference count of 0 when they enter the free list, whereas objects whose constructors abort their creation due to invalid arguments have a reference count of 1 when they enter the free list. Although AFAIK this doesn't cause an actual execution problem (because the object's reference count is *explicitly set to 1* rather than *incremented by 1* when the object is later "conceptually allocated" by _Py_NewReference), it is likely to confuse future maintainers and thereby lead to the introduction of an actual execution problem. I assume that if you agree that this is a reasonable solution, you'll want to apply the change not only to mxDateTime_FromDateAndTime, but to all similar constructors in mxDateTime.c. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From rj at maxxian.com Thu May 5 01:57:40 2005 From: rj at maxxian.com (RJ Juneau) Date: Tue Jan 17 20:00:59 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c5512e$f72798c0$6505a8c0@rjlaptop> I'm on the 30 day evaluation for mxodbc_zope_da. I'm getting the following error when I submit some queries: Error Type: KeyError Error Value: 'query' I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 with UCS4. The error seems to be caused by multiple rows being returned. I did see an earlier posting with the same error message. The response suggested a template error, but this is clearly not the case here. The additional evidence I've gathered so far: - I'm running the test directly from the ZSQL method, so there's no template involved. - If I use the same query with an additional "where" clause to ensure that only one row is returned, it works - If I use a value in the 'where' clause with no rows returned, it works - The same ZSQL query is being used on a Windows machine running Zope and the free ZODBC module without a problem - The query has been verified directly in mysql-client-browser Other info: - The database is MySQL 4.1.10A-0 - iODBC is the DB driver RJ Juneau -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050505/68d278bf/attachment-0020.htm From mal at egenix.com Thu May 5 12:37:43 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 17 20:00:59 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c5512e$f72798c0$6505a8c0@rjlaptop> References: <000301c5512e$f72798c0$6505a8c0@rjlaptop> Message-ID: <4279E967.6010904@egenix.com> RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 > with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 09:37:42 2005 From: rj at maxxian.com (RJ Juneau) Date: Tue Jan 17 20:00:59 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000101c5516f$3b96de90$6505a8c0@rjlaptop> More interesting info on the problem: If I execute the query directly in the "test" window of the base eGenix mxODBC Database Connection window, it works fine and returns the 20 lines expected. That could point to a problem in the rendering, which seems to be where the traceback ends. Note that within the same Zope system I also have an ODBC connection to a Sybase database, and I have successfully tested multi-line ZSQL queries there. This is the traceback: Time 2005/05/05 07:55:15.294 GMT-4 Exception Type KeyError Exception Value 'query' Traceback (innermost last): Module ZPublisher.Publish, line 101, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 39, in call_object Module Shared.DC.ZRDB.DA, line 337, in manage_test Module DocumentTemplate.DT_String, line 474, in __call__ Module DocumentTemplate.DT_In, line 602, in renderwb Module DocumentTemplate.DT_Var, line 219, in render KeyError: 'query' I don't think the following is an issue, but I'll include it for completeness.I am also getting the following iODBC warnings and errors in the Zope console log, which are related to the ODBC parameters being passed by iODBC. Note that these errors also appear for all of the successful queries. [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (Setup). [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (UsageCount). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Timeout). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Reuse). As for the ZSQL snippet from the template... Since there's no template involved yet (I'm still testing directly from the ZSQL method), I assume you mean the SQL code? select h.host_name, s.system_name, s.system_handle, count(*) from terminal t, system_map s, host h where t.system_index = s.system_index and s.host_index = h.host_index group by s.system_name order by h.host_name Nothing complicated here. There are no parameters passed to the query. RJ -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: May 5, 2005 5:38 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: Re: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is > 2.3.4 with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ---------------------------------------------------------------------- > -- > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 16:00:32 2005 From: charlie at egenix.com (Charlie Clark) Date: Tue Jan 17 20:00:59 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000101c5516f$3b96de90$6505a8c0@rjlaptop> References: <000101c5516f$3b96de90$6505a8c0@rjlaptop> Message-ID: <20050505150032.644.1@bepc.1115296715.fake> On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base eGenix > mxODBC Database Connection window, it works fine and returns the 20 > lines expected. That could point to a problem in the rendering, which > seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection to > a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 10:22:17 2005 From: rj at maxxian.com (RJ Juneau) Date: Tue Jan 17 20:00:59 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505150032.644.1@bepc.1115296715.fake> Message-ID: <000201c55175$75bcad10$6505a8c0@rjlaptop> At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 11:47:14 2005 From: rj at maxxian.com (RJ Juneau) Date: Tue Jan 17 20:00:59 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c55181$549be0e0$6505a8c0@rjlaptop> Charlie, I found a fix. Here it is in case anyone else runs into this. You were correct - the problem is in another part of Zope. Based on your feedback, I did a bit more searching and found something here: http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. html The problem appears to be in Zope versions after 2.7.0. I'm running 2.7.6, and the post indicates that it also happens in 2.7.4. The solution: Edit file /lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. There are two lines in the file that start with . Edit them as follows: Change first line to: Change second line to: Just to be after, I shut down Zope before I made the changes and restarted it after. Thanks for the help! RJ -----Original Message----- From: RJ Juneau [mailto:rj@maxxian.com] Sent: May 5, 2005 9:22 AM To: 'Charlie Clark' Cc: 'egenix-users@lists.egenix.com' Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 17:57:25 2005 From: charlie at egenix.com (Charlie Clark) Date: Tue Jan 17 20:00:59 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <20050505165725.3380.2@bepc.1115296715.fake> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Thu May 5 09:15:21 2005 From: charlie at egenix.com (Charlie Clark) Date: Tue Jan 17 20:00:59 2006 Subject: [Zope-DB] RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <000001c55185$41477730$6b00a8c0@fonacier.local> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________ Zope-DB mailing list Zope-DB@zope.org http://mail.zope.org/mailman/listinfo/zope-db From rj at maxxian.com Thu May 5 12:38:00 2005 From: rj at maxxian.com (RJ Juneau) Date: Tue Jan 17 20:00:59 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000001c55188$6b841eb0$6505a8c0@rjlaptop> I just double-checked. Zope-2.7.6-final. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 12:49:16 2005 From: rj at maxxian.com (RJ Juneau) Date: Tue Jan 17 20:00:59 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000501c55189$fe149ba0$6505a8c0@rjlaptop> Charlie, The fix has only been applied for 2.7.7, 2.8b2. The info is in the original bug report which is closed and can be found here: http://www.zope.org/Collectors/Zope/1745 RJ -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Fri May 6 11:50:09 2005 From: rj at maxxian.com (RJ Juneau) Date: Tue Jan 17 20:00:59 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC Message-ID: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Still on eval for the product. I cannot get a stable connection to Sybase via the iODBC drivers. - The Sybase ODBC connection - including a query - have been verified at the iODBC level. - The setup is already working well for ODBC connection to MySQL. Symptoms include: - If I click on "Open Connection", it still comes back with "Connection Closed" when I go to a ZSQL method - Using 'Connect on Demand' is not working either. - Clicking "Open Connection" gives me the following error: Connection string: DSN=lixbox_sybase; UID=sa; PWD=XXXXXXX Connection pool entry: 0 Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection rejected by data source', 7952) The odbc.ini definition for DSN "lixbox_sybase" is as follows: [lixbox_sybase] JetFix = No NoRowSetSizeLimit = No Description = Test connection to listbox Options = LIXBOX DSQUERY = SQLSERVER TDSHOST = lixbox TDSPORT = 5000 TDSVER = 5.0 SQLSERVER_CATALOG = N CURSOR_SENSITIVITY = LOW UserName = sa Password = XXXXXXXX ServerType = Sybase 10/11/12 Driver = /opt/openlink/lib/sql_mt_lt.so Database = pubs2 ReadOnly = no NoAutoCommit = No NoLoginBox = No FetchBufferSize = 60 Other relevant data: - Connecting via OpenLink's iODBC - Zope 2.7.6-final - Python 2.3.4 - Connection to Sybase has been successfully tested with iODBC, including issuing a query - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC connection RJ Juneau Chief Technology Officer Maxxian Integration Inc. 155 Westhampton Drive Thornhill, Ontario Canada L4J 7X2 E-mail: rj@maxxian.com Phone: +1 905 482 9429 Cell: +1 416 897 6682 Toll free: +1 866 758 9161 Fax: +1 647 722 2038 -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050506/aef33361/attachment-0020.htm From mal at egenix.com Fri May 6 18:27:37 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 17 20:00:59 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC In-Reply-To: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> References: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Message-ID: <427B8CE9.1010601@egenix.com> RJ Juneau wrote: > Still on eval for the product. > > I cannot get a stable connection to Sybase via the iODBC drivers. > > - The Sybase ODBC connection - including a query - have been verified at > the iODBC level. > - The setup is already working well for ODBC connection to MySQL. > > Symptoms include: > > - If I click on "Open Connection", it still comes back with "Connection > Closed" when I go to a ZSQL method > - Using 'Connect on Demand' is not working either. > - Clicking "Open Connection" gives me the following error: > > Connection string: DSN=lixbox_sybase; > UID=sa; > PWD=XXXXXXX Try writing the connection string on one line and without whitespace. ODBC drivers sometimes have problems with this. > Connection pool entry: 0 > Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection > rejected by data source', 7952) This is a generic error that relates to authentication or firewall problems. It is possible that turning on ODBC tracing the ODBC manager will give more clues as to the real cause of the problem. > The odbc.ini definition for DSN "lixbox_sybase" is as follows: > > [lixbox_sybase] > JetFix = No > NoRowSetSizeLimit = No > Description = Test connection to listbox > Options = LIXBOX > DSQUERY = SQLSERVER > TDSHOST = lixbox > TDSPORT = 5000 > TDSVER = 5.0 > SQLSERVER_CATALOG = N > CURSOR_SENSITIVITY = LOW > UserName = sa > Password = XXXXXXXX > ServerType = Sybase 10/11/12 > Driver = /opt/openlink/lib/sql_mt_lt.so > Database = pubs2 > ReadOnly = no > NoAutoCommit = No > NoLoginBox = No > FetchBufferSize = 60 > > > Other relevant data: > - Connecting via OpenLink's iODBC > - Zope 2.7.6-final > - Python 2.3.4 > - Connection to Sybase has been successfully tested with iODBC, > including issuing a query > - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC > connection > > > > RJ Juneau > Chief Technology Officer > Maxxian Integration Inc. > 155 Westhampton Drive > Thornhill, Ontario > Canada L4J 7X2 > E-mail: rj@maxxian.com > Phone: +1 905 482 9429 > Cell: +1 416 897 6682 > Toll free: +1 866 758 9161 > Fax: +1 647 722 2038 > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 06 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From calisp at gmail.com Sun May 15 23:49:03 2005 From: calisp at gmail.com (calisp@gmail.com) Date: Tue Jan 17 20:00:59 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK Message-ID: Hi, I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the following error... 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the last phase of a two-phase commit. This shouldn't happen. Traceback (most recent call last): File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one jar.tpc_finish(self) File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish try: self._finish() File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could not perform COMMIT or ROLLBACK', 1023) What could be causing this? Can I get the mxODBCZopeDA source from somewhere? It would make debugging this much easier. Thanks, Calisp. From mal at egenix.com Mon May 16 13:52:12 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 17 20:00:59 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK In-Reply-To: References: Message-ID: <42887B5C.4010109@egenix.com> calisp@gmail.com wrote: > Hi, > > I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with > unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the > following error... > > 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the > last phase of a two-phase commit. This shouldn't happen. > Traceback (most recent call last): > File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one > jar.tpc_finish(self) > File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish > try: self._finish() > File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish > File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler > ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could > not perform COMMIT or ROLLBACK', 1023) You should have a look at the database logs to see what prevented the commit from being completed. > What could be causing this? Hard to say: mxODBCZopeDA is trying to commit the transaction, but the driver or database failed to complete the request. The above error was generated by the ODBC driver. This could be network or DNS problems, or be related to a bug in FreeTDS (which is getting more stable with every new release, but should still be considered beta quality software at the moment). > Can I get the mxODBCZopeDA source from > somewhere? It would make debugging this much easier. Getting the source is not an option and won't help much either since the source of the problem is not mxODBCZopeDA. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 16 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Sun May 1 21:29:25 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Jan 18 08:04:33 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <427259F3.4090806@egenix.com> References: <20050427130906.52878.qmail@web30008.mail.mud.yahoo.com> <427259F3.4090806@egenix.com> Message-ID: <42752005.7080904@egenix.com> M.-A. Lemburg wrote: > David Rushby wrote: > >> --- "M.-A. Lemburg" wrote: >> >>> Are you using the standard mxDateTime build or one >>> with WANT_SUBCLASSABLE_TYPES defined... >> >> >> >> Presumably "the standard", since I just built with 'py24d setup.py >> build', making no attempt to enable special directives. >> >> >>> ... (mxDateTime_Deallocate is only used by the latter)? >> >> >> >> That's true in 2.1.0-2005-04-15, but not in 2.1.0b5. >> >> >>> In any case, please try our latest snapshot: >>> >>> >> >> http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-04-15.zip >> >>> to see if that makes any difference. >> >> >> >> I can't build it out of the box: > > > Hmm, looks like distutils' sdist command doesn't like our new > repository layout which uses symlinks (after we've switched to > subversion). > > We'll have to debug distutils first, I guess :-( Ok, we've found the problem and fixed it. Here's the new release (which does build out of the box at least on our boxes ;-): http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 01 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From davidrushby at yahoo.com Mon May 2 15:49:53 2005 From: davidrushby at yahoo.com (David Rushby) Date: Wed Jan 18 08:04:33 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Ok, we've found the problem and fixed it. Here's the new > release (which does build out of the box at least on our > boxes ;-): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip It does build now, but: py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" still behaves as it did when I submitted my original message: Fatal Python error: UNREF invalid object Aborted This is the same debug build of Python 2.4.1 that I was previously using, running the same configuration (CentOS Linux 4.0/i386, everything compiled with GCC 3.4.3). Have you examined my original claim as to the cause of the bug? __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 10:21:55 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Jan 18 08:04:33 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> References: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> Message-ID: <42772693.8050306@egenix.com> David Rushby wrote: > --- "M.-A. Lemburg" wrote: > >>Ok, we've found the problem and fixed it. Here's the new >>release (which does build out of the box at least on our >>boxes ;-): >> >> > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip > > It does build now, but: > py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" > still behaves as it did when I submitted my original message: > Fatal Python error: UNREF invalid object > Aborted > > This is the same debug build of Python 2.4.1 that I was previously > using, running the same configuration (CentOS Linux 4.0/i386, > everything compiled with GCC 3.4.3). > > Have you examined my original claim as to the cause of the bug? No. We haven't had time for looking into it. I'm not sure whether your analysis of the problem is correct: if you don't define WANT_SUBCLASSABLE_TYPES, the API mxDateTime_Deallocate() is neither defined nor used. Furthermore, PyObject_Del() is only called by mxDateTime_Free() if you have explicitely edited mxDateTime.c to disabled the free list #defines. In a standard build, PyObject_Del() is only called at module finalization time. Note that the reason we call mxDateTime_Free() in the constructor is that we don't want the destructor of the object to be called. Py_DECREF() would call the destructor (mxDateTime_Deallocate). It is possible that the debug code in Python complains about the refcount in the object not being 0 at the time the object is finalized (module finalization time), but I don't see any such checks in PyObject_Free() (which is what PyObject_Del() maps to). Again, all of this does not happen in regular non-debug Python builds. Please be aware that we don't support debug builds, so fixing the problem (if there is one - gcc has some serious optimization problems on some combinations of platform and version) will take a while. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 09:27:37 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Wed Jan 18 08:04:33 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 Message-ID: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Hi all- I am trying to build the mx-base package, v.2.0.6. This will be used with postgresql 7.3.9, psycopg 1.1.18, and Roundup 0.8.2. RHEL 3.0 Python 2.3 egenix-mx-base-2.0.6.tar.gz I performed a: /usr/local/bin/python2.3 setup.py install Everything looks proper with the exeception of this series of warning statements: ----------------- gcc -pthread -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fno-strict-aliasing -fPIC -Imx/BeeBase/mxBeeBase -I/usr/local/incl ude/python2.3 -I/usr/local/include -c mx/BeeBase/mxBeeBase/btr.c -o build/temp.linux-i686-2.3/mx/BeeBase/mxBeeBase/mxBeeBa se/mx/BeeBase/mxBeeBase/btr.o mx/BeeBase/mxBeeBase/btr.c: In function `dumpBuf': mx/BeeBase/mxBeeBase/btr.c:249: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:250: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:255: warning: unsigned int format, long unsigned int arg (arg 4) mx/BeeBase/mxBeeBase/btr.c:256: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c: In function `_validateTree': mx/BeeBase/mxBeeBase/btr.c:330: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:337: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:339: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:349: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:351: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 3) creating build/lib.linux-i686-2.3/mx/BeeBase creating build/lib.linux-i686-2.3/mx/BeeBase/mxBeeBase -------------- Would someone be kind enough to let me know whether these messages were expected, and if not, how I might resolve these? Thanks! DC __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 22:06:33 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Jan 18 08:04:33 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> References: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Message-ID: <4277CBB9.8020302@egenix.com> Dianne Chen wrote: > Hi all- > > I am trying to build the mx-base package, v.2.0.6. > This will be used with postgresql 7.3.9, psycopg > 1.1.18, and Roundup 0.8.2. > > RHEL 3.0 > Python 2.3 > egenix-mx-base-2.0.6.tar.gz > > I performed a: > > /usr/local/bin/python2.3 setup.py install > > Everything looks proper with the exeception of this > series of warning statements: > > ----------------- > ... > -------------- > > Would someone be kind enough to let me know whether > these messages were expected, and if not, how I might > resolve these? These warning can safely be ignored. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 13:41:14 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Wed Jan 18 08:04:33 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: 6667 Message-ID: <20050503194114.72091.qmail@web31414.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Dianne Chen wrote: > > Hi all- > > > > I am trying to build the mx-base package, v.2.0.6. > > This will be used with postgresql 7.3.9, psycopg > > 1.1.18, and Roundup 0.8.2. > > > > RHEL 3.0 > > Python 2.3 > > egenix-mx-base-2.0.6.tar.gz > > > > I performed a: > > > > /usr/local/bin/python2.3 setup.py install > > > > Everything looks proper with the exeception of > this > > series of warning statements: > > > > ----------------- > > ... > > -------------- > > > > Would someone be kind enough to let me know > whether > > these messages were expected, and if not, how I > might > > resolve these? > > These warning can safely be ignored. > > -- > Marc-Andre Lemburg > eGenix.com > Marc- Thank you very much for the reply. It helps greatly. With kind regards, DC __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From davidrushby at yahoo.com Tue May 3 17:18:46 2005 From: davidrushby at yahoo.com (David Rushby) Date: Wed Jan 18 08:04:33 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050503231846.35012.qmail@web30009.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > I'm not sure whether your analysis of the problem is correct... Indeed, my original analysis wasn't correct; I think this one is. The fatal error I'm complaining about only arises if the arguments to DateTime.DateTime are invalid, so that the object is deallocated in the onError block of mxDateTime_FromDateAndTime. If the object is created successfully, and later deallocated by Python's garbage collector, the fatal error doesn't arise. Here's my analysis of the problem: --- If the debugging directive Py_TRACE_REFS is enabled, as it is in my case, the Python interpreter maintains a doubly linked list of all Python objects (named refchain) via the _ob_next and _ob_prev pointers added to PyObject via _PyObject_HEAD_EXTRA. Each object is inserted into refchain by the _Py_AddToAllObjects call in _Py_NewReference, and removed from refchain by the _Py_ForgetReference call in _Py_Dealloc. _Py_ForgetReference performs an integrity check on the object being deallocated (op) to make sure that its neighbors in refchain recognize it. Specifically, _Py_ForgetReference verifies that the _ob_next pointer of the previous object in refchain (op->_ob_prev->_ob_next) points to op, and that the _ob_prev pointer of the next object in refchain (op->_ob_next->_ob_prev) points to op. If either of those conditions is false, the interpreter raises the fatal error I'm seeing. After mxDateTime_New pulls an mxDateTimeObject out of the free list, it calls _Py_NewReference on that object to transform it from a "conceptually deallocated" object to a "conceptually allocated" one. _Py_NewReference inserts the object into refchain. Later, when the object is being "conceptually deallocated", it should be removed from refchain with _Py_ForgetReference. The version of _Py_Dealloc that's active when Py_TRACE_REFS is enabled does this (_Py_Dealloc is the element of Py_DECREF that performs the actual destruction). _Py_Dealloc first calls _Py_ForgetReference to remove the object from refchain, then calls the object's destructor (op->ob_type->tp_dealloc). If WANT_SUBCLASSABLE_TYPES is not defined (it is not in my case), the destructor for mxDateTime_Type is mxDateTime_Free. So, if a DateTime object is deallocated normally, as a result of its reference count falling to zero, _Py_Dealloc is called on the object, which first removes it from refchain, then passes it to mxDateTime_Free. If a DateTime object is destroyed prematurely, as a result of invalid arguments to its destructor, the onError handler calls mxDateTime_Free, so the object is "conceptually deallocated" (placed in the free list), *but* the object is not removed from refchain. So if a refchain-membership-integrity-check is performed on the object in question or one of its immediate neighbors in refchain, that integrity check fails, leading to the fatal error. --- The solution is to 'Py_DECREF(...)' the object in the onError handler of its constructor, instead of passing the object directly to mxDateTime_Free. That change solves two problems: 1) It causes _Py_Dealloc to execute, which in turn executes _Py_ForgetReference, so the object is removed from refchain, as it should be. 2) At present, objects that are created successfully and later deallocated by normal reference count mechanics have a reference count of 0 when they enter the free list, whereas objects whose constructors abort their creation due to invalid arguments have a reference count of 1 when they enter the free list. Although AFAIK this doesn't cause an actual execution problem (because the object's reference count is *explicitly set to 1* rather than *incremented by 1* when the object is later "conceptually allocated" by _Py_NewReference), it is likely to confuse future maintainers and thereby lead to the introduction of an actual execution problem. I assume that if you agree that this is a reasonable solution, you'll want to apply the change not only to mxDateTime_FromDateAndTime, but to all similar constructors in mxDateTime.c. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From rj at maxxian.com Thu May 5 01:57:40 2005 From: rj at maxxian.com (RJ Juneau) Date: Wed Jan 18 08:04:33 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c5512e$f72798c0$6505a8c0@rjlaptop> I'm on the 30 day evaluation for mxodbc_zope_da. I'm getting the following error when I submit some queries: Error Type: KeyError Error Value: 'query' I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 with UCS4. The error seems to be caused by multiple rows being returned. I did see an earlier posting with the same error message. The response suggested a template error, but this is clearly not the case here. The additional evidence I've gathered so far: - I'm running the test directly from the ZSQL method, so there's no template involved. - If I use the same query with an additional "where" clause to ensure that only one row is returned, it works - If I use a value in the 'where' clause with no rows returned, it works - The same ZSQL query is being used on a Windows machine running Zope and the free ZODBC module without a problem - The query has been verified directly in mysql-client-browser Other info: - The database is MySQL 4.1.10A-0 - iODBC is the DB driver RJ Juneau -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050505/68d278bf/attachment-0021.htm From mal at egenix.com Thu May 5 12:37:43 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Jan 18 08:04:33 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c5512e$f72798c0$6505a8c0@rjlaptop> References: <000301c5512e$f72798c0$6505a8c0@rjlaptop> Message-ID: <4279E967.6010904@egenix.com> RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 > with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 09:37:42 2005 From: rj at maxxian.com (RJ Juneau) Date: Wed Jan 18 08:04:33 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000101c5516f$3b96de90$6505a8c0@rjlaptop> More interesting info on the problem: If I execute the query directly in the "test" window of the base eGenix mxODBC Database Connection window, it works fine and returns the 20 lines expected. That could point to a problem in the rendering, which seems to be where the traceback ends. Note that within the same Zope system I also have an ODBC connection to a Sybase database, and I have successfully tested multi-line ZSQL queries there. This is the traceback: Time 2005/05/05 07:55:15.294 GMT-4 Exception Type KeyError Exception Value 'query' Traceback (innermost last): Module ZPublisher.Publish, line 101, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 39, in call_object Module Shared.DC.ZRDB.DA, line 337, in manage_test Module DocumentTemplate.DT_String, line 474, in __call__ Module DocumentTemplate.DT_In, line 602, in renderwb Module DocumentTemplate.DT_Var, line 219, in render KeyError: 'query' I don't think the following is an issue, but I'll include it for completeness.I am also getting the following iODBC warnings and errors in the Zope console log, which are related to the ODBC parameters being passed by iODBC. Note that these errors also appear for all of the successful queries. [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (Setup). [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (UsageCount). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Timeout). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Reuse). As for the ZSQL snippet from the template... Since there's no template involved yet (I'm still testing directly from the ZSQL method), I assume you mean the SQL code? select h.host_name, s.system_name, s.system_handle, count(*) from terminal t, system_map s, host h where t.system_index = s.system_index and s.host_index = h.host_index group by s.system_name order by h.host_name Nothing complicated here. There are no parameters passed to the query. RJ -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: May 5, 2005 5:38 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: Re: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is > 2.3.4 with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ---------------------------------------------------------------------- > -- > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 16:00:32 2005 From: charlie at egenix.com (Charlie Clark) Date: Wed Jan 18 08:04:33 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000101c5516f$3b96de90$6505a8c0@rjlaptop> References: <000101c5516f$3b96de90$6505a8c0@rjlaptop> Message-ID: <20050505150032.644.1@bepc.1115296715.fake> On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base eGenix > mxODBC Database Connection window, it works fine and returns the 20 > lines expected. That could point to a problem in the rendering, which > seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection to > a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 10:22:17 2005 From: rj at maxxian.com (RJ Juneau) Date: Wed Jan 18 08:04:33 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505150032.644.1@bepc.1115296715.fake> Message-ID: <000201c55175$75bcad10$6505a8c0@rjlaptop> At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 11:47:14 2005 From: rj at maxxian.com (RJ Juneau) Date: Wed Jan 18 08:04:33 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c55181$549be0e0$6505a8c0@rjlaptop> Charlie, I found a fix. Here it is in case anyone else runs into this. You were correct - the problem is in another part of Zope. Based on your feedback, I did a bit more searching and found something here: http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. html The problem appears to be in Zope versions after 2.7.0. I'm running 2.7.6, and the post indicates that it also happens in 2.7.4. The solution: Edit file /lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. There are two lines in the file that start with . Edit them as follows: Change first line to: Change second line to: Just to be after, I shut down Zope before I made the changes and restarted it after. Thanks for the help! RJ -----Original Message----- From: RJ Juneau [mailto:rj@maxxian.com] Sent: May 5, 2005 9:22 AM To: 'Charlie Clark' Cc: 'egenix-users@lists.egenix.com' Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 17:57:25 2005 From: charlie at egenix.com (Charlie Clark) Date: Wed Jan 18 08:04:33 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <20050505165725.3380.2@bepc.1115296715.fake> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Thu May 5 09:15:21 2005 From: charlie at egenix.com (Charlie Clark) Date: Wed Jan 18 08:04:33 2006 Subject: [Zope-DB] RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <000001c55185$41477730$6b00a8c0@fonacier.local> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________ Zope-DB mailing list Zope-DB@zope.org http://mail.zope.org/mailman/listinfo/zope-db From rj at maxxian.com Thu May 5 12:38:00 2005 From: rj at maxxian.com (RJ Juneau) Date: Wed Jan 18 08:04:33 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000001c55188$6b841eb0$6505a8c0@rjlaptop> I just double-checked. Zope-2.7.6-final. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 12:49:16 2005 From: rj at maxxian.com (RJ Juneau) Date: Wed Jan 18 08:04:33 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000501c55189$fe149ba0$6505a8c0@rjlaptop> Charlie, The fix has only been applied for 2.7.7, 2.8b2. The info is in the original bug report which is closed and can be found here: http://www.zope.org/Collectors/Zope/1745 RJ -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Fri May 6 11:50:09 2005 From: rj at maxxian.com (RJ Juneau) Date: Wed Jan 18 08:04:33 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC Message-ID: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Still on eval for the product. I cannot get a stable connection to Sybase via the iODBC drivers. - The Sybase ODBC connection - including a query - have been verified at the iODBC level. - The setup is already working well for ODBC connection to MySQL. Symptoms include: - If I click on "Open Connection", it still comes back with "Connection Closed" when I go to a ZSQL method - Using 'Connect on Demand' is not working either. - Clicking "Open Connection" gives me the following error: Connection string: DSN=lixbox_sybase; UID=sa; PWD=XXXXXXX Connection pool entry: 0 Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection rejected by data source', 7952) The odbc.ini definition for DSN "lixbox_sybase" is as follows: [lixbox_sybase] JetFix = No NoRowSetSizeLimit = No Description = Test connection to listbox Options = LIXBOX DSQUERY = SQLSERVER TDSHOST = lixbox TDSPORT = 5000 TDSVER = 5.0 SQLSERVER_CATALOG = N CURSOR_SENSITIVITY = LOW UserName = sa Password = XXXXXXXX ServerType = Sybase 10/11/12 Driver = /opt/openlink/lib/sql_mt_lt.so Database = pubs2 ReadOnly = no NoAutoCommit = No NoLoginBox = No FetchBufferSize = 60 Other relevant data: - Connecting via OpenLink's iODBC - Zope 2.7.6-final - Python 2.3.4 - Connection to Sybase has been successfully tested with iODBC, including issuing a query - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC connection RJ Juneau Chief Technology Officer Maxxian Integration Inc. 155 Westhampton Drive Thornhill, Ontario Canada L4J 7X2 E-mail: rj@maxxian.com Phone: +1 905 482 9429 Cell: +1 416 897 6682 Toll free: +1 866 758 9161 Fax: +1 647 722 2038 -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050506/aef33361/attachment-0021.htm From mal at egenix.com Fri May 6 18:27:37 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Jan 18 08:04:33 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC In-Reply-To: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> References: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Message-ID: <427B8CE9.1010601@egenix.com> RJ Juneau wrote: > Still on eval for the product. > > I cannot get a stable connection to Sybase via the iODBC drivers. > > - The Sybase ODBC connection - including a query - have been verified at > the iODBC level. > - The setup is already working well for ODBC connection to MySQL. > > Symptoms include: > > - If I click on "Open Connection", it still comes back with "Connection > Closed" when I go to a ZSQL method > - Using 'Connect on Demand' is not working either. > - Clicking "Open Connection" gives me the following error: > > Connection string: DSN=lixbox_sybase; > UID=sa; > PWD=XXXXXXX Try writing the connection string on one line and without whitespace. ODBC drivers sometimes have problems with this. > Connection pool entry: 0 > Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection > rejected by data source', 7952) This is a generic error that relates to authentication or firewall problems. It is possible that turning on ODBC tracing the ODBC manager will give more clues as to the real cause of the problem. > The odbc.ini definition for DSN "lixbox_sybase" is as follows: > > [lixbox_sybase] > JetFix = No > NoRowSetSizeLimit = No > Description = Test connection to listbox > Options = LIXBOX > DSQUERY = SQLSERVER > TDSHOST = lixbox > TDSPORT = 5000 > TDSVER = 5.0 > SQLSERVER_CATALOG = N > CURSOR_SENSITIVITY = LOW > UserName = sa > Password = XXXXXXXX > ServerType = Sybase 10/11/12 > Driver = /opt/openlink/lib/sql_mt_lt.so > Database = pubs2 > ReadOnly = no > NoAutoCommit = No > NoLoginBox = No > FetchBufferSize = 60 > > > Other relevant data: > - Connecting via OpenLink's iODBC > - Zope 2.7.6-final > - Python 2.3.4 > - Connection to Sybase has been successfully tested with iODBC, > including issuing a query > - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC > connection > > > > RJ Juneau > Chief Technology Officer > Maxxian Integration Inc. > 155 Westhampton Drive > Thornhill, Ontario > Canada L4J 7X2 > E-mail: rj@maxxian.com > Phone: +1 905 482 9429 > Cell: +1 416 897 6682 > Toll free: +1 866 758 9161 > Fax: +1 647 722 2038 > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 06 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From calisp at gmail.com Sun May 15 23:49:03 2005 From: calisp at gmail.com (calisp@gmail.com) Date: Wed Jan 18 08:04:33 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK Message-ID: Hi, I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the following error... 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the last phase of a two-phase commit. This shouldn't happen. Traceback (most recent call last): File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one jar.tpc_finish(self) File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish try: self._finish() File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could not perform COMMIT or ROLLBACK', 1023) What could be causing this? Can I get the mxODBCZopeDA source from somewhere? It would make debugging this much easier. Thanks, Calisp. From mal at egenix.com Mon May 16 13:52:12 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Jan 18 08:04:33 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK In-Reply-To: References: Message-ID: <42887B5C.4010109@egenix.com> calisp@gmail.com wrote: > Hi, > > I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with > unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the > following error... > > 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the > last phase of a two-phase commit. This shouldn't happen. > Traceback (most recent call last): > File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one > jar.tpc_finish(self) > File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish > try: self._finish() > File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish > File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler > ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could > not perform COMMIT or ROLLBACK', 1023) You should have a look at the database logs to see what prevented the commit from being completed. > What could be causing this? Hard to say: mxODBCZopeDA is trying to commit the transaction, but the driver or database failed to complete the request. The above error was generated by the ODBC driver. This could be network or DNS problems, or be related to a bug in FreeTDS (which is getting more stable with every new release, but should still be considered beta quality software at the moment). > Can I get the mxODBCZopeDA source from > somewhere? It would make debugging this much easier. Getting the source is not an option and won't help much either since the source of the problem is not mxODBCZopeDA. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 16 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Sun May 1 21:29:25 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Jan 18 12:01:15 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <427259F3.4090806@egenix.com> References: <20050427130906.52878.qmail@web30008.mail.mud.yahoo.com> <427259F3.4090806@egenix.com> Message-ID: <42752005.7080904@egenix.com> M.-A. Lemburg wrote: > David Rushby wrote: > >> --- "M.-A. Lemburg" wrote: >> >>> Are you using the standard mxDateTime build or one >>> with WANT_SUBCLASSABLE_TYPES defined... >> >> >> >> Presumably "the standard", since I just built with 'py24d setup.py >> build', making no attempt to enable special directives. >> >> >>> ... (mxDateTime_Deallocate is only used by the latter)? >> >> >> >> That's true in 2.1.0-2005-04-15, but not in 2.1.0b5. >> >> >>> In any case, please try our latest snapshot: >>> >>> >> >> http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-04-15.zip >> >>> to see if that makes any difference. >> >> >> >> I can't build it out of the box: > > > Hmm, looks like distutils' sdist command doesn't like our new > repository layout which uses symlinks (after we've switched to > subversion). > > We'll have to debug distutils first, I guess :-( Ok, we've found the problem and fixed it. Here's the new release (which does build out of the box at least on our boxes ;-): http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 01 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From davidrushby at yahoo.com Mon May 2 15:49:53 2005 From: davidrushby at yahoo.com (David Rushby) Date: Wed Jan 18 12:01:15 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Ok, we've found the problem and fixed it. Here's the new > release (which does build out of the box at least on our > boxes ;-): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip It does build now, but: py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" still behaves as it did when I submitted my original message: Fatal Python error: UNREF invalid object Aborted This is the same debug build of Python 2.4.1 that I was previously using, running the same configuration (CentOS Linux 4.0/i386, everything compiled with GCC 3.4.3). Have you examined my original claim as to the cause of the bug? __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 10:21:55 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Jan 18 12:01:15 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> References: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> Message-ID: <42772693.8050306@egenix.com> David Rushby wrote: > --- "M.-A. Lemburg" wrote: > >>Ok, we've found the problem and fixed it. Here's the new >>release (which does build out of the box at least on our >>boxes ;-): >> >> > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip > > It does build now, but: > py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" > still behaves as it did when I submitted my original message: > Fatal Python error: UNREF invalid object > Aborted > > This is the same debug build of Python 2.4.1 that I was previously > using, running the same configuration (CentOS Linux 4.0/i386, > everything compiled with GCC 3.4.3). > > Have you examined my original claim as to the cause of the bug? No. We haven't had time for looking into it. I'm not sure whether your analysis of the problem is correct: if you don't define WANT_SUBCLASSABLE_TYPES, the API mxDateTime_Deallocate() is neither defined nor used. Furthermore, PyObject_Del() is only called by mxDateTime_Free() if you have explicitely edited mxDateTime.c to disabled the free list #defines. In a standard build, PyObject_Del() is only called at module finalization time. Note that the reason we call mxDateTime_Free() in the constructor is that we don't want the destructor of the object to be called. Py_DECREF() would call the destructor (mxDateTime_Deallocate). It is possible that the debug code in Python complains about the refcount in the object not being 0 at the time the object is finalized (module finalization time), but I don't see any such checks in PyObject_Free() (which is what PyObject_Del() maps to). Again, all of this does not happen in regular non-debug Python builds. Please be aware that we don't support debug builds, so fixing the problem (if there is one - gcc has some serious optimization problems on some combinations of platform and version) will take a while. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 09:27:37 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Wed Jan 18 12:01:15 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 Message-ID: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Hi all- I am trying to build the mx-base package, v.2.0.6. This will be used with postgresql 7.3.9, psycopg 1.1.18, and Roundup 0.8.2. RHEL 3.0 Python 2.3 egenix-mx-base-2.0.6.tar.gz I performed a: /usr/local/bin/python2.3 setup.py install Everything looks proper with the exeception of this series of warning statements: ----------------- gcc -pthread -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fno-strict-aliasing -fPIC -Imx/BeeBase/mxBeeBase -I/usr/local/incl ude/python2.3 -I/usr/local/include -c mx/BeeBase/mxBeeBase/btr.c -o build/temp.linux-i686-2.3/mx/BeeBase/mxBeeBase/mxBeeBa se/mx/BeeBase/mxBeeBase/btr.o mx/BeeBase/mxBeeBase/btr.c: In function `dumpBuf': mx/BeeBase/mxBeeBase/btr.c:249: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:250: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:255: warning: unsigned int format, long unsigned int arg (arg 4) mx/BeeBase/mxBeeBase/btr.c:256: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c: In function `_validateTree': mx/BeeBase/mxBeeBase/btr.c:330: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:337: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:339: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:349: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:351: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 3) creating build/lib.linux-i686-2.3/mx/BeeBase creating build/lib.linux-i686-2.3/mx/BeeBase/mxBeeBase -------------- Would someone be kind enough to let me know whether these messages were expected, and if not, how I might resolve these? Thanks! DC __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 22:06:33 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Jan 18 12:01:15 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> References: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Message-ID: <4277CBB9.8020302@egenix.com> Dianne Chen wrote: > Hi all- > > I am trying to build the mx-base package, v.2.0.6. > This will be used with postgresql 7.3.9, psycopg > 1.1.18, and Roundup 0.8.2. > > RHEL 3.0 > Python 2.3 > egenix-mx-base-2.0.6.tar.gz > > I performed a: > > /usr/local/bin/python2.3 setup.py install > > Everything looks proper with the exeception of this > series of warning statements: > > ----------------- > ... > -------------- > > Would someone be kind enough to let me know whether > these messages were expected, and if not, how I might > resolve these? These warning can safely be ignored. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 13:41:14 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Wed Jan 18 12:01:15 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: 6667 Message-ID: <20050503194114.72091.qmail@web31414.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Dianne Chen wrote: > > Hi all- > > > > I am trying to build the mx-base package, v.2.0.6. > > This will be used with postgresql 7.3.9, psycopg > > 1.1.18, and Roundup 0.8.2. > > > > RHEL 3.0 > > Python 2.3 > > egenix-mx-base-2.0.6.tar.gz > > > > I performed a: > > > > /usr/local/bin/python2.3 setup.py install > > > > Everything looks proper with the exeception of > this > > series of warning statements: > > > > ----------------- > > ... > > -------------- > > > > Would someone be kind enough to let me know > whether > > these messages were expected, and if not, how I > might > > resolve these? > > These warning can safely be ignored. > > -- > Marc-Andre Lemburg > eGenix.com > Marc- Thank you very much for the reply. It helps greatly. With kind regards, DC __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From davidrushby at yahoo.com Tue May 3 17:18:46 2005 From: davidrushby at yahoo.com (David Rushby) Date: Wed Jan 18 12:01:15 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050503231846.35012.qmail@web30009.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > I'm not sure whether your analysis of the problem is correct... Indeed, my original analysis wasn't correct; I think this one is. The fatal error I'm complaining about only arises if the arguments to DateTime.DateTime are invalid, so that the object is deallocated in the onError block of mxDateTime_FromDateAndTime. If the object is created successfully, and later deallocated by Python's garbage collector, the fatal error doesn't arise. Here's my analysis of the problem: --- If the debugging directive Py_TRACE_REFS is enabled, as it is in my case, the Python interpreter maintains a doubly linked list of all Python objects (named refchain) via the _ob_next and _ob_prev pointers added to PyObject via _PyObject_HEAD_EXTRA. Each object is inserted into refchain by the _Py_AddToAllObjects call in _Py_NewReference, and removed from refchain by the _Py_ForgetReference call in _Py_Dealloc. _Py_ForgetReference performs an integrity check on the object being deallocated (op) to make sure that its neighbors in refchain recognize it. Specifically, _Py_ForgetReference verifies that the _ob_next pointer of the previous object in refchain (op->_ob_prev->_ob_next) points to op, and that the _ob_prev pointer of the next object in refchain (op->_ob_next->_ob_prev) points to op. If either of those conditions is false, the interpreter raises the fatal error I'm seeing. After mxDateTime_New pulls an mxDateTimeObject out of the free list, it calls _Py_NewReference on that object to transform it from a "conceptually deallocated" object to a "conceptually allocated" one. _Py_NewReference inserts the object into refchain. Later, when the object is being "conceptually deallocated", it should be removed from refchain with _Py_ForgetReference. The version of _Py_Dealloc that's active when Py_TRACE_REFS is enabled does this (_Py_Dealloc is the element of Py_DECREF that performs the actual destruction). _Py_Dealloc first calls _Py_ForgetReference to remove the object from refchain, then calls the object's destructor (op->ob_type->tp_dealloc). If WANT_SUBCLASSABLE_TYPES is not defined (it is not in my case), the destructor for mxDateTime_Type is mxDateTime_Free. So, if a DateTime object is deallocated normally, as a result of its reference count falling to zero, _Py_Dealloc is called on the object, which first removes it from refchain, then passes it to mxDateTime_Free. If a DateTime object is destroyed prematurely, as a result of invalid arguments to its destructor, the onError handler calls mxDateTime_Free, so the object is "conceptually deallocated" (placed in the free list), *but* the object is not removed from refchain. So if a refchain-membership-integrity-check is performed on the object in question or one of its immediate neighbors in refchain, that integrity check fails, leading to the fatal error. --- The solution is to 'Py_DECREF(...)' the object in the onError handler of its constructor, instead of passing the object directly to mxDateTime_Free. That change solves two problems: 1) It causes _Py_Dealloc to execute, which in turn executes _Py_ForgetReference, so the object is removed from refchain, as it should be. 2) At present, objects that are created successfully and later deallocated by normal reference count mechanics have a reference count of 0 when they enter the free list, whereas objects whose constructors abort their creation due to invalid arguments have a reference count of 1 when they enter the free list. Although AFAIK this doesn't cause an actual execution problem (because the object's reference count is *explicitly set to 1* rather than *incremented by 1* when the object is later "conceptually allocated" by _Py_NewReference), it is likely to confuse future maintainers and thereby lead to the introduction of an actual execution problem. I assume that if you agree that this is a reasonable solution, you'll want to apply the change not only to mxDateTime_FromDateAndTime, but to all similar constructors in mxDateTime.c. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From rj at maxxian.com Thu May 5 01:57:40 2005 From: rj at maxxian.com (RJ Juneau) Date: Wed Jan 18 12:01:15 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c5512e$f72798c0$6505a8c0@rjlaptop> I'm on the 30 day evaluation for mxodbc_zope_da. I'm getting the following error when I submit some queries: Error Type: KeyError Error Value: 'query' I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 with UCS4. The error seems to be caused by multiple rows being returned. I did see an earlier posting with the same error message. The response suggested a template error, but this is clearly not the case here. The additional evidence I've gathered so far: - I'm running the test directly from the ZSQL method, so there's no template involved. - If I use the same query with an additional "where" clause to ensure that only one row is returned, it works - If I use a value in the 'where' clause with no rows returned, it works - The same ZSQL query is being used on a Windows machine running Zope and the free ZODBC module without a problem - The query has been verified directly in mysql-client-browser Other info: - The database is MySQL 4.1.10A-0 - iODBC is the DB driver RJ Juneau -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050505/68d278bf/attachment-0022.htm From mal at egenix.com Thu May 5 12:37:43 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Jan 18 12:01:15 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c5512e$f72798c0$6505a8c0@rjlaptop> References: <000301c5512e$f72798c0$6505a8c0@rjlaptop> Message-ID: <4279E967.6010904@egenix.com> RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 > with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 09:37:42 2005 From: rj at maxxian.com (RJ Juneau) Date: Wed Jan 18 12:01:15 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000101c5516f$3b96de90$6505a8c0@rjlaptop> More interesting info on the problem: If I execute the query directly in the "test" window of the base eGenix mxODBC Database Connection window, it works fine and returns the 20 lines expected. That could point to a problem in the rendering, which seems to be where the traceback ends. Note that within the same Zope system I also have an ODBC connection to a Sybase database, and I have successfully tested multi-line ZSQL queries there. This is the traceback: Time 2005/05/05 07:55:15.294 GMT-4 Exception Type KeyError Exception Value 'query' Traceback (innermost last): Module ZPublisher.Publish, line 101, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 39, in call_object Module Shared.DC.ZRDB.DA, line 337, in manage_test Module DocumentTemplate.DT_String, line 474, in __call__ Module DocumentTemplate.DT_In, line 602, in renderwb Module DocumentTemplate.DT_Var, line 219, in render KeyError: 'query' I don't think the following is an issue, but I'll include it for completeness.I am also getting the following iODBC warnings and errors in the Zope console log, which are related to the ODBC parameters being passed by iODBC. Note that these errors also appear for all of the successful queries. [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (Setup). [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (UsageCount). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Timeout). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Reuse). As for the ZSQL snippet from the template... Since there's no template involved yet (I'm still testing directly from the ZSQL method), I assume you mean the SQL code? select h.host_name, s.system_name, s.system_handle, count(*) from terminal t, system_map s, host h where t.system_index = s.system_index and s.host_index = h.host_index group by s.system_name order by h.host_name Nothing complicated here. There are no parameters passed to the query. RJ -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: May 5, 2005 5:38 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: Re: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is > 2.3.4 with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ---------------------------------------------------------------------- > -- > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 16:00:32 2005 From: charlie at egenix.com (Charlie Clark) Date: Wed Jan 18 12:01:15 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000101c5516f$3b96de90$6505a8c0@rjlaptop> References: <000101c5516f$3b96de90$6505a8c0@rjlaptop> Message-ID: <20050505150032.644.1@bepc.1115296715.fake> On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base eGenix > mxODBC Database Connection window, it works fine and returns the 20 > lines expected. That could point to a problem in the rendering, which > seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection to > a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 10:22:17 2005 From: rj at maxxian.com (RJ Juneau) Date: Wed Jan 18 12:01:15 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505150032.644.1@bepc.1115296715.fake> Message-ID: <000201c55175$75bcad10$6505a8c0@rjlaptop> At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 11:47:14 2005 From: rj at maxxian.com (RJ Juneau) Date: Wed Jan 18 12:01:15 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c55181$549be0e0$6505a8c0@rjlaptop> Charlie, I found a fix. Here it is in case anyone else runs into this. You were correct - the problem is in another part of Zope. Based on your feedback, I did a bit more searching and found something here: http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. html The problem appears to be in Zope versions after 2.7.0. I'm running 2.7.6, and the post indicates that it also happens in 2.7.4. The solution: Edit file /lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. There are two lines in the file that start with . Edit them as follows: Change first line to: Change second line to: Just to be after, I shut down Zope before I made the changes and restarted it after. Thanks for the help! RJ -----Original Message----- From: RJ Juneau [mailto:rj@maxxian.com] Sent: May 5, 2005 9:22 AM To: 'Charlie Clark' Cc: 'egenix-users@lists.egenix.com' Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 17:57:25 2005 From: charlie at egenix.com (Charlie Clark) Date: Wed Jan 18 12:01:15 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <20050505165725.3380.2@bepc.1115296715.fake> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Thu May 5 09:15:21 2005 From: charlie at egenix.com (Charlie Clark) Date: Wed Jan 18 12:01:15 2006 Subject: [Zope-DB] RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <000001c55185$41477730$6b00a8c0@fonacier.local> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________ Zope-DB mailing list Zope-DB@zope.org http://mail.zope.org/mailman/listinfo/zope-db From rj at maxxian.com Thu May 5 12:38:00 2005 From: rj at maxxian.com (RJ Juneau) Date: Wed Jan 18 12:01:15 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000001c55188$6b841eb0$6505a8c0@rjlaptop> I just double-checked. Zope-2.7.6-final. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 12:49:16 2005 From: rj at maxxian.com (RJ Juneau) Date: Wed Jan 18 12:01:15 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000501c55189$fe149ba0$6505a8c0@rjlaptop> Charlie, The fix has only been applied for 2.7.7, 2.8b2. The info is in the original bug report which is closed and can be found here: http://www.zope.org/Collectors/Zope/1745 RJ -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Fri May 6 11:50:09 2005 From: rj at maxxian.com (RJ Juneau) Date: Wed Jan 18 12:01:15 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC Message-ID: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Still on eval for the product. I cannot get a stable connection to Sybase via the iODBC drivers. - The Sybase ODBC connection - including a query - have been verified at the iODBC level. - The setup is already working well for ODBC connection to MySQL. Symptoms include: - If I click on "Open Connection", it still comes back with "Connection Closed" when I go to a ZSQL method - Using 'Connect on Demand' is not working either. - Clicking "Open Connection" gives me the following error: Connection string: DSN=lixbox_sybase; UID=sa; PWD=XXXXXXX Connection pool entry: 0 Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection rejected by data source', 7952) The odbc.ini definition for DSN "lixbox_sybase" is as follows: [lixbox_sybase] JetFix = No NoRowSetSizeLimit = No Description = Test connection to listbox Options = LIXBOX DSQUERY = SQLSERVER TDSHOST = lixbox TDSPORT = 5000 TDSVER = 5.0 SQLSERVER_CATALOG = N CURSOR_SENSITIVITY = LOW UserName = sa Password = XXXXXXXX ServerType = Sybase 10/11/12 Driver = /opt/openlink/lib/sql_mt_lt.so Database = pubs2 ReadOnly = no NoAutoCommit = No NoLoginBox = No FetchBufferSize = 60 Other relevant data: - Connecting via OpenLink's iODBC - Zope 2.7.6-final - Python 2.3.4 - Connection to Sybase has been successfully tested with iODBC, including issuing a query - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC connection RJ Juneau Chief Technology Officer Maxxian Integration Inc. 155 Westhampton Drive Thornhill, Ontario Canada L4J 7X2 E-mail: rj@maxxian.com Phone: +1 905 482 9429 Cell: +1 416 897 6682 Toll free: +1 866 758 9161 Fax: +1 647 722 2038 -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050506/aef33361/attachment-0022.htm From mal at egenix.com Fri May 6 18:27:37 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Jan 18 12:01:15 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC In-Reply-To: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> References: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Message-ID: <427B8CE9.1010601@egenix.com> RJ Juneau wrote: > Still on eval for the product. > > I cannot get a stable connection to Sybase via the iODBC drivers. > > - The Sybase ODBC connection - including a query - have been verified at > the iODBC level. > - The setup is already working well for ODBC connection to MySQL. > > Symptoms include: > > - If I click on "Open Connection", it still comes back with "Connection > Closed" when I go to a ZSQL method > - Using 'Connect on Demand' is not working either. > - Clicking "Open Connection" gives me the following error: > > Connection string: DSN=lixbox_sybase; > UID=sa; > PWD=XXXXXXX Try writing the connection string on one line and without whitespace. ODBC drivers sometimes have problems with this. > Connection pool entry: 0 > Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection > rejected by data source', 7952) This is a generic error that relates to authentication or firewall problems. It is possible that turning on ODBC tracing the ODBC manager will give more clues as to the real cause of the problem. > The odbc.ini definition for DSN "lixbox_sybase" is as follows: > > [lixbox_sybase] > JetFix = No > NoRowSetSizeLimit = No > Description = Test connection to listbox > Options = LIXBOX > DSQUERY = SQLSERVER > TDSHOST = lixbox > TDSPORT = 5000 > TDSVER = 5.0 > SQLSERVER_CATALOG = N > CURSOR_SENSITIVITY = LOW > UserName = sa > Password = XXXXXXXX > ServerType = Sybase 10/11/12 > Driver = /opt/openlink/lib/sql_mt_lt.so > Database = pubs2 > ReadOnly = no > NoAutoCommit = No > NoLoginBox = No > FetchBufferSize = 60 > > > Other relevant data: > - Connecting via OpenLink's iODBC > - Zope 2.7.6-final > - Python 2.3.4 > - Connection to Sybase has been successfully tested with iODBC, > including issuing a query > - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC > connection > > > > RJ Juneau > Chief Technology Officer > Maxxian Integration Inc. > 155 Westhampton Drive > Thornhill, Ontario > Canada L4J 7X2 > E-mail: rj@maxxian.com > Phone: +1 905 482 9429 > Cell: +1 416 897 6682 > Toll free: +1 866 758 9161 > Fax: +1 647 722 2038 > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 06 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From calisp at gmail.com Sun May 15 23:49:03 2005 From: calisp at gmail.com (calisp@gmail.com) Date: Wed Jan 18 12:01:15 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK Message-ID: Hi, I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the following error... 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the last phase of a two-phase commit. This shouldn't happen. Traceback (most recent call last): File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one jar.tpc_finish(self) File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish try: self._finish() File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could not perform COMMIT or ROLLBACK', 1023) What could be causing this? Can I get the mxODBCZopeDA source from somewhere? It would make debugging this much easier. Thanks, Calisp. From mal at egenix.com Mon May 16 13:52:12 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Jan 18 12:01:15 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK In-Reply-To: References: Message-ID: <42887B5C.4010109@egenix.com> calisp@gmail.com wrote: > Hi, > > I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with > unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the > following error... > > 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the > last phase of a two-phase commit. This shouldn't happen. > Traceback (most recent call last): > File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one > jar.tpc_finish(self) > File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish > try: self._finish() > File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish > File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler > ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could > not perform COMMIT or ROLLBACK', 1023) You should have a look at the database logs to see what prevented the commit from being completed. > What could be causing this? Hard to say: mxODBCZopeDA is trying to commit the transaction, but the driver or database failed to complete the request. The above error was generated by the ODBC driver. This could be network or DNS problems, or be related to a bug in FreeTDS (which is getting more stable with every new release, but should still be considered beta quality software at the moment). > Can I get the mxODBCZopeDA source from > somewhere? It would make debugging this much easier. Getting the source is not an option and won't help much either since the source of the problem is not mxODBCZopeDA. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 16 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Sun May 1 21:29:25 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Jan 18 16:01:46 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <427259F3.4090806@egenix.com> References: <20050427130906.52878.qmail@web30008.mail.mud.yahoo.com> <427259F3.4090806@egenix.com> Message-ID: <42752005.7080904@egenix.com> M.-A. Lemburg wrote: > David Rushby wrote: > >> --- "M.-A. Lemburg" wrote: >> >>> Are you using the standard mxDateTime build or one >>> with WANT_SUBCLASSABLE_TYPES defined... >> >> >> >> Presumably "the standard", since I just built with 'py24d setup.py >> build', making no attempt to enable special directives. >> >> >>> ... (mxDateTime_Deallocate is only used by the latter)? >> >> >> >> That's true in 2.1.0-2005-04-15, but not in 2.1.0b5. >> >> >>> In any case, please try our latest snapshot: >>> >>> >> >> http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-04-15.zip >> >>> to see if that makes any difference. >> >> >> >> I can't build it out of the box: > > > Hmm, looks like distutils' sdist command doesn't like our new > repository layout which uses symlinks (after we've switched to > subversion). > > We'll have to debug distutils first, I guess :-( Ok, we've found the problem and fixed it. Here's the new release (which does build out of the box at least on our boxes ;-): http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 01 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From davidrushby at yahoo.com Mon May 2 15:49:53 2005 From: davidrushby at yahoo.com (David Rushby) Date: Wed Jan 18 16:01:46 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Ok, we've found the problem and fixed it. Here's the new > release (which does build out of the box at least on our > boxes ;-): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip It does build now, but: py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" still behaves as it did when I submitted my original message: Fatal Python error: UNREF invalid object Aborted This is the same debug build of Python 2.4.1 that I was previously using, running the same configuration (CentOS Linux 4.0/i386, everything compiled with GCC 3.4.3). Have you examined my original claim as to the cause of the bug? __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 10:21:55 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Jan 18 16:01:46 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> References: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> Message-ID: <42772693.8050306@egenix.com> David Rushby wrote: > --- "M.-A. Lemburg" wrote: > >>Ok, we've found the problem and fixed it. Here's the new >>release (which does build out of the box at least on our >>boxes ;-): >> >> > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip > > It does build now, but: > py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" > still behaves as it did when I submitted my original message: > Fatal Python error: UNREF invalid object > Aborted > > This is the same debug build of Python 2.4.1 that I was previously > using, running the same configuration (CentOS Linux 4.0/i386, > everything compiled with GCC 3.4.3). > > Have you examined my original claim as to the cause of the bug? No. We haven't had time for looking into it. I'm not sure whether your analysis of the problem is correct: if you don't define WANT_SUBCLASSABLE_TYPES, the API mxDateTime_Deallocate() is neither defined nor used. Furthermore, PyObject_Del() is only called by mxDateTime_Free() if you have explicitely edited mxDateTime.c to disabled the free list #defines. In a standard build, PyObject_Del() is only called at module finalization time. Note that the reason we call mxDateTime_Free() in the constructor is that we don't want the destructor of the object to be called. Py_DECREF() would call the destructor (mxDateTime_Deallocate). It is possible that the debug code in Python complains about the refcount in the object not being 0 at the time the object is finalized (module finalization time), but I don't see any such checks in PyObject_Free() (which is what PyObject_Del() maps to). Again, all of this does not happen in regular non-debug Python builds. Please be aware that we don't support debug builds, so fixing the problem (if there is one - gcc has some serious optimization problems on some combinations of platform and version) will take a while. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 09:27:37 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Wed Jan 18 16:01:46 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 Message-ID: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Hi all- I am trying to build the mx-base package, v.2.0.6. This will be used with postgresql 7.3.9, psycopg 1.1.18, and Roundup 0.8.2. RHEL 3.0 Python 2.3 egenix-mx-base-2.0.6.tar.gz I performed a: /usr/local/bin/python2.3 setup.py install Everything looks proper with the exeception of this series of warning statements: ----------------- gcc -pthread -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fno-strict-aliasing -fPIC -Imx/BeeBase/mxBeeBase -I/usr/local/incl ude/python2.3 -I/usr/local/include -c mx/BeeBase/mxBeeBase/btr.c -o build/temp.linux-i686-2.3/mx/BeeBase/mxBeeBase/mxBeeBa se/mx/BeeBase/mxBeeBase/btr.o mx/BeeBase/mxBeeBase/btr.c: In function `dumpBuf': mx/BeeBase/mxBeeBase/btr.c:249: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:250: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:255: warning: unsigned int format, long unsigned int arg (arg 4) mx/BeeBase/mxBeeBase/btr.c:256: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c: In function `_validateTree': mx/BeeBase/mxBeeBase/btr.c:330: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:337: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:339: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:349: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:351: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 3) creating build/lib.linux-i686-2.3/mx/BeeBase creating build/lib.linux-i686-2.3/mx/BeeBase/mxBeeBase -------------- Would someone be kind enough to let me know whether these messages were expected, and if not, how I might resolve these? Thanks! DC __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 22:06:33 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Jan 18 16:01:46 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> References: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Message-ID: <4277CBB9.8020302@egenix.com> Dianne Chen wrote: > Hi all- > > I am trying to build the mx-base package, v.2.0.6. > This will be used with postgresql 7.3.9, psycopg > 1.1.18, and Roundup 0.8.2. > > RHEL 3.0 > Python 2.3 > egenix-mx-base-2.0.6.tar.gz > > I performed a: > > /usr/local/bin/python2.3 setup.py install > > Everything looks proper with the exeception of this > series of warning statements: > > ----------------- > ... > -------------- > > Would someone be kind enough to let me know whether > these messages were expected, and if not, how I might > resolve these? These warning can safely be ignored. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 13:41:14 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Wed Jan 18 16:01:46 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: 6667 Message-ID: <20050503194114.72091.qmail@web31414.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Dianne Chen wrote: > > Hi all- > > > > I am trying to build the mx-base package, v.2.0.6. > > This will be used with postgresql 7.3.9, psycopg > > 1.1.18, and Roundup 0.8.2. > > > > RHEL 3.0 > > Python 2.3 > > egenix-mx-base-2.0.6.tar.gz > > > > I performed a: > > > > /usr/local/bin/python2.3 setup.py install > > > > Everything looks proper with the exeception of > this > > series of warning statements: > > > > ----------------- > > ... > > -------------- > > > > Would someone be kind enough to let me know > whether > > these messages were expected, and if not, how I > might > > resolve these? > > These warning can safely be ignored. > > -- > Marc-Andre Lemburg > eGenix.com > Marc- Thank you very much for the reply. It helps greatly. With kind regards, DC __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From davidrushby at yahoo.com Tue May 3 17:18:46 2005 From: davidrushby at yahoo.com (David Rushby) Date: Wed Jan 18 16:01:46 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050503231846.35012.qmail@web30009.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > I'm not sure whether your analysis of the problem is correct... Indeed, my original analysis wasn't correct; I think this one is. The fatal error I'm complaining about only arises if the arguments to DateTime.DateTime are invalid, so that the object is deallocated in the onError block of mxDateTime_FromDateAndTime. If the object is created successfully, and later deallocated by Python's garbage collector, the fatal error doesn't arise. Here's my analysis of the problem: --- If the debugging directive Py_TRACE_REFS is enabled, as it is in my case, the Python interpreter maintains a doubly linked list of all Python objects (named refchain) via the _ob_next and _ob_prev pointers added to PyObject via _PyObject_HEAD_EXTRA. Each object is inserted into refchain by the _Py_AddToAllObjects call in _Py_NewReference, and removed from refchain by the _Py_ForgetReference call in _Py_Dealloc. _Py_ForgetReference performs an integrity check on the object being deallocated (op) to make sure that its neighbors in refchain recognize it. Specifically, _Py_ForgetReference verifies that the _ob_next pointer of the previous object in refchain (op->_ob_prev->_ob_next) points to op, and that the _ob_prev pointer of the next object in refchain (op->_ob_next->_ob_prev) points to op. If either of those conditions is false, the interpreter raises the fatal error I'm seeing. After mxDateTime_New pulls an mxDateTimeObject out of the free list, it calls _Py_NewReference on that object to transform it from a "conceptually deallocated" object to a "conceptually allocated" one. _Py_NewReference inserts the object into refchain. Later, when the object is being "conceptually deallocated", it should be removed from refchain with _Py_ForgetReference. The version of _Py_Dealloc that's active when Py_TRACE_REFS is enabled does this (_Py_Dealloc is the element of Py_DECREF that performs the actual destruction). _Py_Dealloc first calls _Py_ForgetReference to remove the object from refchain, then calls the object's destructor (op->ob_type->tp_dealloc). If WANT_SUBCLASSABLE_TYPES is not defined (it is not in my case), the destructor for mxDateTime_Type is mxDateTime_Free. So, if a DateTime object is deallocated normally, as a result of its reference count falling to zero, _Py_Dealloc is called on the object, which first removes it from refchain, then passes it to mxDateTime_Free. If a DateTime object is destroyed prematurely, as a result of invalid arguments to its destructor, the onError handler calls mxDateTime_Free, so the object is "conceptually deallocated" (placed in the free list), *but* the object is not removed from refchain. So if a refchain-membership-integrity-check is performed on the object in question or one of its immediate neighbors in refchain, that integrity check fails, leading to the fatal error. --- The solution is to 'Py_DECREF(...)' the object in the onError handler of its constructor, instead of passing the object directly to mxDateTime_Free. That change solves two problems: 1) It causes _Py_Dealloc to execute, which in turn executes _Py_ForgetReference, so the object is removed from refchain, as it should be. 2) At present, objects that are created successfully and later deallocated by normal reference count mechanics have a reference count of 0 when they enter the free list, whereas objects whose constructors abort their creation due to invalid arguments have a reference count of 1 when they enter the free list. Although AFAIK this doesn't cause an actual execution problem (because the object's reference count is *explicitly set to 1* rather than *incremented by 1* when the object is later "conceptually allocated" by _Py_NewReference), it is likely to confuse future maintainers and thereby lead to the introduction of an actual execution problem. I assume that if you agree that this is a reasonable solution, you'll want to apply the change not only to mxDateTime_FromDateAndTime, but to all similar constructors in mxDateTime.c. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From rj at maxxian.com Thu May 5 01:57:40 2005 From: rj at maxxian.com (RJ Juneau) Date: Wed Jan 18 16:01:46 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c5512e$f72798c0$6505a8c0@rjlaptop> I'm on the 30 day evaluation for mxodbc_zope_da. I'm getting the following error when I submit some queries: Error Type: KeyError Error Value: 'query' I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 with UCS4. The error seems to be caused by multiple rows being returned. I did see an earlier posting with the same error message. The response suggested a template error, but this is clearly not the case here. The additional evidence I've gathered so far: - I'm running the test directly from the ZSQL method, so there's no template involved. - If I use the same query with an additional "where" clause to ensure that only one row is returned, it works - If I use a value in the 'where' clause with no rows returned, it works - The same ZSQL query is being used on a Windows machine running Zope and the free ZODBC module without a problem - The query has been verified directly in mysql-client-browser Other info: - The database is MySQL 4.1.10A-0 - iODBC is the DB driver RJ Juneau -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050505/68d278bf/attachment-0023.htm From mal at egenix.com Thu May 5 12:37:43 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Jan 18 16:01:46 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c5512e$f72798c0$6505a8c0@rjlaptop> References: <000301c5512e$f72798c0$6505a8c0@rjlaptop> Message-ID: <4279E967.6010904@egenix.com> RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 > with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 09:37:42 2005 From: rj at maxxian.com (RJ Juneau) Date: Wed Jan 18 16:01:46 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000101c5516f$3b96de90$6505a8c0@rjlaptop> More interesting info on the problem: If I execute the query directly in the "test" window of the base eGenix mxODBC Database Connection window, it works fine and returns the 20 lines expected. That could point to a problem in the rendering, which seems to be where the traceback ends. Note that within the same Zope system I also have an ODBC connection to a Sybase database, and I have successfully tested multi-line ZSQL queries there. This is the traceback: Time 2005/05/05 07:55:15.294 GMT-4 Exception Type KeyError Exception Value 'query' Traceback (innermost last): Module ZPublisher.Publish, line 101, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 39, in call_object Module Shared.DC.ZRDB.DA, line 337, in manage_test Module DocumentTemplate.DT_String, line 474, in __call__ Module DocumentTemplate.DT_In, line 602, in renderwb Module DocumentTemplate.DT_Var, line 219, in render KeyError: 'query' I don't think the following is an issue, but I'll include it for completeness.I am also getting the following iODBC warnings and errors in the Zope console log, which are related to the ODBC parameters being passed by iODBC. Note that these errors also appear for all of the successful queries. [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (Setup). [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (UsageCount). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Timeout). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Reuse). As for the ZSQL snippet from the template... Since there's no template involved yet (I'm still testing directly from the ZSQL method), I assume you mean the SQL code? select h.host_name, s.system_name, s.system_handle, count(*) from terminal t, system_map s, host h where t.system_index = s.system_index and s.host_index = h.host_index group by s.system_name order by h.host_name Nothing complicated here. There are no parameters passed to the query. RJ -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: May 5, 2005 5:38 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: Re: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is > 2.3.4 with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ---------------------------------------------------------------------- > -- > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 16:00:32 2005 From: charlie at egenix.com (Charlie Clark) Date: Wed Jan 18 16:01:46 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000101c5516f$3b96de90$6505a8c0@rjlaptop> References: <000101c5516f$3b96de90$6505a8c0@rjlaptop> Message-ID: <20050505150032.644.1@bepc.1115296715.fake> On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base eGenix > mxODBC Database Connection window, it works fine and returns the 20 > lines expected. That could point to a problem in the rendering, which > seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection to > a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 10:22:17 2005 From: rj at maxxian.com (RJ Juneau) Date: Wed Jan 18 16:01:46 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505150032.644.1@bepc.1115296715.fake> Message-ID: <000201c55175$75bcad10$6505a8c0@rjlaptop> At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 11:47:14 2005 From: rj at maxxian.com (RJ Juneau) Date: Wed Jan 18 16:01:46 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c55181$549be0e0$6505a8c0@rjlaptop> Charlie, I found a fix. Here it is in case anyone else runs into this. You were correct - the problem is in another part of Zope. Based on your feedback, I did a bit more searching and found something here: http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. html The problem appears to be in Zope versions after 2.7.0. I'm running 2.7.6, and the post indicates that it also happens in 2.7.4. The solution: Edit file /lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. There are two lines in the file that start with . Edit them as follows: Change first line to: Change second line to: Just to be after, I shut down Zope before I made the changes and restarted it after. Thanks for the help! RJ -----Original Message----- From: RJ Juneau [mailto:rj@maxxian.com] Sent: May 5, 2005 9:22 AM To: 'Charlie Clark' Cc: 'egenix-users@lists.egenix.com' Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 17:57:25 2005 From: charlie at egenix.com (Charlie Clark) Date: Wed Jan 18 16:01:46 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <20050505165725.3380.2@bepc.1115296715.fake> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Thu May 5 09:15:21 2005 From: charlie at egenix.com (Charlie Clark) Date: Wed Jan 18 16:01:46 2006 Subject: [Zope-DB] RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <000001c55185$41477730$6b00a8c0@fonacier.local> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________ Zope-DB mailing list Zope-DB@zope.org http://mail.zope.org/mailman/listinfo/zope-db From rj at maxxian.com Thu May 5 12:38:00 2005 From: rj at maxxian.com (RJ Juneau) Date: Wed Jan 18 16:01:46 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000001c55188$6b841eb0$6505a8c0@rjlaptop> I just double-checked. Zope-2.7.6-final. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 12:49:16 2005 From: rj at maxxian.com (RJ Juneau) Date: Wed Jan 18 16:01:46 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000501c55189$fe149ba0$6505a8c0@rjlaptop> Charlie, The fix has only been applied for 2.7.7, 2.8b2. The info is in the original bug report which is closed and can be found here: http://www.zope.org/Collectors/Zope/1745 RJ -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Fri May 6 11:50:09 2005 From: rj at maxxian.com (RJ Juneau) Date: Wed Jan 18 16:01:47 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC Message-ID: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Still on eval for the product. I cannot get a stable connection to Sybase via the iODBC drivers. - The Sybase ODBC connection - including a query - have been verified at the iODBC level. - The setup is already working well for ODBC connection to MySQL. Symptoms include: - If I click on "Open Connection", it still comes back with "Connection Closed" when I go to a ZSQL method - Using 'Connect on Demand' is not working either. - Clicking "Open Connection" gives me the following error: Connection string: DSN=lixbox_sybase; UID=sa; PWD=XXXXXXX Connection pool entry: 0 Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection rejected by data source', 7952) The odbc.ini definition for DSN "lixbox_sybase" is as follows: [lixbox_sybase] JetFix = No NoRowSetSizeLimit = No Description = Test connection to listbox Options = LIXBOX DSQUERY = SQLSERVER TDSHOST = lixbox TDSPORT = 5000 TDSVER = 5.0 SQLSERVER_CATALOG = N CURSOR_SENSITIVITY = LOW UserName = sa Password = XXXXXXXX ServerType = Sybase 10/11/12 Driver = /opt/openlink/lib/sql_mt_lt.so Database = pubs2 ReadOnly = no NoAutoCommit = No NoLoginBox = No FetchBufferSize = 60 Other relevant data: - Connecting via OpenLink's iODBC - Zope 2.7.6-final - Python 2.3.4 - Connection to Sybase has been successfully tested with iODBC, including issuing a query - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC connection RJ Juneau Chief Technology Officer Maxxian Integration Inc. 155 Westhampton Drive Thornhill, Ontario Canada L4J 7X2 E-mail: rj@maxxian.com Phone: +1 905 482 9429 Cell: +1 416 897 6682 Toll free: +1 866 758 9161 Fax: +1 647 722 2038 -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050506/aef33361/attachment-0023.htm From mal at egenix.com Fri May 6 18:27:37 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Jan 18 16:01:47 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC In-Reply-To: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> References: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Message-ID: <427B8CE9.1010601@egenix.com> RJ Juneau wrote: > Still on eval for the product. > > I cannot get a stable connection to Sybase via the iODBC drivers. > > - The Sybase ODBC connection - including a query - have been verified at > the iODBC level. > - The setup is already working well for ODBC connection to MySQL. > > Symptoms include: > > - If I click on "Open Connection", it still comes back with "Connection > Closed" when I go to a ZSQL method > - Using 'Connect on Demand' is not working either. > - Clicking "Open Connection" gives me the following error: > > Connection string: DSN=lixbox_sybase; > UID=sa; > PWD=XXXXXXX Try writing the connection string on one line and without whitespace. ODBC drivers sometimes have problems with this. > Connection pool entry: 0 > Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection > rejected by data source', 7952) This is a generic error that relates to authentication or firewall problems. It is possible that turning on ODBC tracing the ODBC manager will give more clues as to the real cause of the problem. > The odbc.ini definition for DSN "lixbox_sybase" is as follows: > > [lixbox_sybase] > JetFix = No > NoRowSetSizeLimit = No > Description = Test connection to listbox > Options = LIXBOX > DSQUERY = SQLSERVER > TDSHOST = lixbox > TDSPORT = 5000 > TDSVER = 5.0 > SQLSERVER_CATALOG = N > CURSOR_SENSITIVITY = LOW > UserName = sa > Password = XXXXXXXX > ServerType = Sybase 10/11/12 > Driver = /opt/openlink/lib/sql_mt_lt.so > Database = pubs2 > ReadOnly = no > NoAutoCommit = No > NoLoginBox = No > FetchBufferSize = 60 > > > Other relevant data: > - Connecting via OpenLink's iODBC > - Zope 2.7.6-final > - Python 2.3.4 > - Connection to Sybase has been successfully tested with iODBC, > including issuing a query > - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC > connection > > > > RJ Juneau > Chief Technology Officer > Maxxian Integration Inc. > 155 Westhampton Drive > Thornhill, Ontario > Canada L4J 7X2 > E-mail: rj@maxxian.com > Phone: +1 905 482 9429 > Cell: +1 416 897 6682 > Toll free: +1 866 758 9161 > Fax: +1 647 722 2038 > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 06 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From calisp at gmail.com Sun May 15 23:49:03 2005 From: calisp at gmail.com (calisp@gmail.com) Date: Wed Jan 18 16:01:47 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK Message-ID: Hi, I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the following error... 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the last phase of a two-phase commit. This shouldn't happen. Traceback (most recent call last): File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one jar.tpc_finish(self) File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish try: self._finish() File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could not perform COMMIT or ROLLBACK', 1023) What could be causing this? Can I get the mxODBCZopeDA source from somewhere? It would make debugging this much easier. Thanks, Calisp. From mal at egenix.com Mon May 16 13:52:12 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Jan 18 16:01:47 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK In-Reply-To: References: Message-ID: <42887B5C.4010109@egenix.com> calisp@gmail.com wrote: > Hi, > > I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with > unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the > following error... > > 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the > last phase of a two-phase commit. This shouldn't happen. > Traceback (most recent call last): > File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one > jar.tpc_finish(self) > File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish > try: self._finish() > File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish > File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler > ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could > not perform COMMIT or ROLLBACK', 1023) You should have a look at the database logs to see what prevented the commit from being completed. > What could be causing this? Hard to say: mxODBCZopeDA is trying to commit the transaction, but the driver or database failed to complete the request. The above error was generated by the ODBC driver. This could be network or DNS problems, or be related to a bug in FreeTDS (which is getting more stable with every new release, but should still be considered beta quality software at the moment). > Can I get the mxODBCZopeDA source from > somewhere? It would make debugging this much easier. Getting the source is not an option and won't help much either since the source of the problem is not mxODBCZopeDA. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 16 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Sun May 1 21:29:25 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Jan 18 20:01:05 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <427259F3.4090806@egenix.com> References: <20050427130906.52878.qmail@web30008.mail.mud.yahoo.com> <427259F3.4090806@egenix.com> Message-ID: <42752005.7080904@egenix.com> M.-A. Lemburg wrote: > David Rushby wrote: > >> --- "M.-A. Lemburg" wrote: >> >>> Are you using the standard mxDateTime build or one >>> with WANT_SUBCLASSABLE_TYPES defined... >> >> >> >> Presumably "the standard", since I just built with 'py24d setup.py >> build', making no attempt to enable special directives. >> >> >>> ... (mxDateTime_Deallocate is only used by the latter)? >> >> >> >> That's true in 2.1.0-2005-04-15, but not in 2.1.0b5. >> >> >>> In any case, please try our latest snapshot: >>> >>> >> >> http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-04-15.zip >> >>> to see if that makes any difference. >> >> >> >> I can't build it out of the box: > > > Hmm, looks like distutils' sdist command doesn't like our new > repository layout which uses symlinks (after we've switched to > subversion). > > We'll have to debug distutils first, I guess :-( Ok, we've found the problem and fixed it. Here's the new release (which does build out of the box at least on our boxes ;-): http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 01 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From davidrushby at yahoo.com Mon May 2 15:49:53 2005 From: davidrushby at yahoo.com (David Rushby) Date: Wed Jan 18 20:01:06 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Ok, we've found the problem and fixed it. Here's the new > release (which does build out of the box at least on our > boxes ;-): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip It does build now, but: py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" still behaves as it did when I submitted my original message: Fatal Python error: UNREF invalid object Aborted This is the same debug build of Python 2.4.1 that I was previously using, running the same configuration (CentOS Linux 4.0/i386, everything compiled with GCC 3.4.3). Have you examined my original claim as to the cause of the bug? __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 10:21:55 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Jan 18 20:01:06 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> References: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> Message-ID: <42772693.8050306@egenix.com> David Rushby wrote: > --- "M.-A. Lemburg" wrote: > >>Ok, we've found the problem and fixed it. Here's the new >>release (which does build out of the box at least on our >>boxes ;-): >> >> > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip > > It does build now, but: > py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" > still behaves as it did when I submitted my original message: > Fatal Python error: UNREF invalid object > Aborted > > This is the same debug build of Python 2.4.1 that I was previously > using, running the same configuration (CentOS Linux 4.0/i386, > everything compiled with GCC 3.4.3). > > Have you examined my original claim as to the cause of the bug? No. We haven't had time for looking into it. I'm not sure whether your analysis of the problem is correct: if you don't define WANT_SUBCLASSABLE_TYPES, the API mxDateTime_Deallocate() is neither defined nor used. Furthermore, PyObject_Del() is only called by mxDateTime_Free() if you have explicitely edited mxDateTime.c to disabled the free list #defines. In a standard build, PyObject_Del() is only called at module finalization time. Note that the reason we call mxDateTime_Free() in the constructor is that we don't want the destructor of the object to be called. Py_DECREF() would call the destructor (mxDateTime_Deallocate). It is possible that the debug code in Python complains about the refcount in the object not being 0 at the time the object is finalized (module finalization time), but I don't see any such checks in PyObject_Free() (which is what PyObject_Del() maps to). Again, all of this does not happen in regular non-debug Python builds. Please be aware that we don't support debug builds, so fixing the problem (if there is one - gcc has some serious optimization problems on some combinations of platform and version) will take a while. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 09:27:37 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Wed Jan 18 20:01:06 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 Message-ID: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Hi all- I am trying to build the mx-base package, v.2.0.6. This will be used with postgresql 7.3.9, psycopg 1.1.18, and Roundup 0.8.2. RHEL 3.0 Python 2.3 egenix-mx-base-2.0.6.tar.gz I performed a: /usr/local/bin/python2.3 setup.py install Everything looks proper with the exeception of this series of warning statements: ----------------- gcc -pthread -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fno-strict-aliasing -fPIC -Imx/BeeBase/mxBeeBase -I/usr/local/incl ude/python2.3 -I/usr/local/include -c mx/BeeBase/mxBeeBase/btr.c -o build/temp.linux-i686-2.3/mx/BeeBase/mxBeeBase/mxBeeBa se/mx/BeeBase/mxBeeBase/btr.o mx/BeeBase/mxBeeBase/btr.c: In function `dumpBuf': mx/BeeBase/mxBeeBase/btr.c:249: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:250: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:255: warning: unsigned int format, long unsigned int arg (arg 4) mx/BeeBase/mxBeeBase/btr.c:256: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c: In function `_validateTree': mx/BeeBase/mxBeeBase/btr.c:330: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:337: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:339: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:349: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:351: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 3) creating build/lib.linux-i686-2.3/mx/BeeBase creating build/lib.linux-i686-2.3/mx/BeeBase/mxBeeBase -------------- Would someone be kind enough to let me know whether these messages were expected, and if not, how I might resolve these? Thanks! DC __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 22:06:33 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Jan 18 20:01:06 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> References: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Message-ID: <4277CBB9.8020302@egenix.com> Dianne Chen wrote: > Hi all- > > I am trying to build the mx-base package, v.2.0.6. > This will be used with postgresql 7.3.9, psycopg > 1.1.18, and Roundup 0.8.2. > > RHEL 3.0 > Python 2.3 > egenix-mx-base-2.0.6.tar.gz > > I performed a: > > /usr/local/bin/python2.3 setup.py install > > Everything looks proper with the exeception of this > series of warning statements: > > ----------------- > ... > -------------- > > Would someone be kind enough to let me know whether > these messages were expected, and if not, how I might > resolve these? These warning can safely be ignored. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 13:41:14 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Wed Jan 18 20:01:06 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: 6667 Message-ID: <20050503194114.72091.qmail@web31414.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Dianne Chen wrote: > > Hi all- > > > > I am trying to build the mx-base package, v.2.0.6. > > This will be used with postgresql 7.3.9, psycopg > > 1.1.18, and Roundup 0.8.2. > > > > RHEL 3.0 > > Python 2.3 > > egenix-mx-base-2.0.6.tar.gz > > > > I performed a: > > > > /usr/local/bin/python2.3 setup.py install > > > > Everything looks proper with the exeception of > this > > series of warning statements: > > > > ----------------- > > ... > > -------------- > > > > Would someone be kind enough to let me know > whether > > these messages were expected, and if not, how I > might > > resolve these? > > These warning can safely be ignored. > > -- > Marc-Andre Lemburg > eGenix.com > Marc- Thank you very much for the reply. It helps greatly. With kind regards, DC __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From davidrushby at yahoo.com Tue May 3 17:18:46 2005 From: davidrushby at yahoo.com (David Rushby) Date: Wed Jan 18 20:01:06 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050503231846.35012.qmail@web30009.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > I'm not sure whether your analysis of the problem is correct... Indeed, my original analysis wasn't correct; I think this one is. The fatal error I'm complaining about only arises if the arguments to DateTime.DateTime are invalid, so that the object is deallocated in the onError block of mxDateTime_FromDateAndTime. If the object is created successfully, and later deallocated by Python's garbage collector, the fatal error doesn't arise. Here's my analysis of the problem: --- If the debugging directive Py_TRACE_REFS is enabled, as it is in my case, the Python interpreter maintains a doubly linked list of all Python objects (named refchain) via the _ob_next and _ob_prev pointers added to PyObject via _PyObject_HEAD_EXTRA. Each object is inserted into refchain by the _Py_AddToAllObjects call in _Py_NewReference, and removed from refchain by the _Py_ForgetReference call in _Py_Dealloc. _Py_ForgetReference performs an integrity check on the object being deallocated (op) to make sure that its neighbors in refchain recognize it. Specifically, _Py_ForgetReference verifies that the _ob_next pointer of the previous object in refchain (op->_ob_prev->_ob_next) points to op, and that the _ob_prev pointer of the next object in refchain (op->_ob_next->_ob_prev) points to op. If either of those conditions is false, the interpreter raises the fatal error I'm seeing. After mxDateTime_New pulls an mxDateTimeObject out of the free list, it calls _Py_NewReference on that object to transform it from a "conceptually deallocated" object to a "conceptually allocated" one. _Py_NewReference inserts the object into refchain. Later, when the object is being "conceptually deallocated", it should be removed from refchain with _Py_ForgetReference. The version of _Py_Dealloc that's active when Py_TRACE_REFS is enabled does this (_Py_Dealloc is the element of Py_DECREF that performs the actual destruction). _Py_Dealloc first calls _Py_ForgetReference to remove the object from refchain, then calls the object's destructor (op->ob_type->tp_dealloc). If WANT_SUBCLASSABLE_TYPES is not defined (it is not in my case), the destructor for mxDateTime_Type is mxDateTime_Free. So, if a DateTime object is deallocated normally, as a result of its reference count falling to zero, _Py_Dealloc is called on the object, which first removes it from refchain, then passes it to mxDateTime_Free. If a DateTime object is destroyed prematurely, as a result of invalid arguments to its destructor, the onError handler calls mxDateTime_Free, so the object is "conceptually deallocated" (placed in the free list), *but* the object is not removed from refchain. So if a refchain-membership-integrity-check is performed on the object in question or one of its immediate neighbors in refchain, that integrity check fails, leading to the fatal error. --- The solution is to 'Py_DECREF(...)' the object in the onError handler of its constructor, instead of passing the object directly to mxDateTime_Free. That change solves two problems: 1) It causes _Py_Dealloc to execute, which in turn executes _Py_ForgetReference, so the object is removed from refchain, as it should be. 2) At present, objects that are created successfully and later deallocated by normal reference count mechanics have a reference count of 0 when they enter the free list, whereas objects whose constructors abort their creation due to invalid arguments have a reference count of 1 when they enter the free list. Although AFAIK this doesn't cause an actual execution problem (because the object's reference count is *explicitly set to 1* rather than *incremented by 1* when the object is later "conceptually allocated" by _Py_NewReference), it is likely to confuse future maintainers and thereby lead to the introduction of an actual execution problem. I assume that if you agree that this is a reasonable solution, you'll want to apply the change not only to mxDateTime_FromDateAndTime, but to all similar constructors in mxDateTime.c. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From rj at maxxian.com Thu May 5 01:57:40 2005 From: rj at maxxian.com (RJ Juneau) Date: Wed Jan 18 20:01:06 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c5512e$f72798c0$6505a8c0@rjlaptop> I'm on the 30 day evaluation for mxodbc_zope_da. I'm getting the following error when I submit some queries: Error Type: KeyError Error Value: 'query' I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 with UCS4. The error seems to be caused by multiple rows being returned. I did see an earlier posting with the same error message. The response suggested a template error, but this is clearly not the case here. The additional evidence I've gathered so far: - I'm running the test directly from the ZSQL method, so there's no template involved. - If I use the same query with an additional "where" clause to ensure that only one row is returned, it works - If I use a value in the 'where' clause with no rows returned, it works - The same ZSQL query is being used on a Windows machine running Zope and the free ZODBC module without a problem - The query has been verified directly in mysql-client-browser Other info: - The database is MySQL 4.1.10A-0 - iODBC is the DB driver RJ Juneau -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050505/68d278bf/attachment-0024.htm From mal at egenix.com Thu May 5 12:37:43 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Jan 18 20:01:06 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c5512e$f72798c0$6505a8c0@rjlaptop> References: <000301c5512e$f72798c0$6505a8c0@rjlaptop> Message-ID: <4279E967.6010904@egenix.com> RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 > with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 09:37:42 2005 From: rj at maxxian.com (RJ Juneau) Date: Wed Jan 18 20:01:06 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000101c5516f$3b96de90$6505a8c0@rjlaptop> More interesting info on the problem: If I execute the query directly in the "test" window of the base eGenix mxODBC Database Connection window, it works fine and returns the 20 lines expected. That could point to a problem in the rendering, which seems to be where the traceback ends. Note that within the same Zope system I also have an ODBC connection to a Sybase database, and I have successfully tested multi-line ZSQL queries there. This is the traceback: Time 2005/05/05 07:55:15.294 GMT-4 Exception Type KeyError Exception Value 'query' Traceback (innermost last): Module ZPublisher.Publish, line 101, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 39, in call_object Module Shared.DC.ZRDB.DA, line 337, in manage_test Module DocumentTemplate.DT_String, line 474, in __call__ Module DocumentTemplate.DT_In, line 602, in renderwb Module DocumentTemplate.DT_Var, line 219, in render KeyError: 'query' I don't think the following is an issue, but I'll include it for completeness.I am also getting the following iODBC warnings and errors in the Zope console log, which are related to the ODBC parameters being passed by iODBC. Note that these errors also appear for all of the successful queries. [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (Setup). [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (UsageCount). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Timeout). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Reuse). As for the ZSQL snippet from the template... Since there's no template involved yet (I'm still testing directly from the ZSQL method), I assume you mean the SQL code? select h.host_name, s.system_name, s.system_handle, count(*) from terminal t, system_map s, host h where t.system_index = s.system_index and s.host_index = h.host_index group by s.system_name order by h.host_name Nothing complicated here. There are no parameters passed to the query. RJ -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: May 5, 2005 5:38 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: Re: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is > 2.3.4 with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ---------------------------------------------------------------------- > -- > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 16:00:32 2005 From: charlie at egenix.com (Charlie Clark) Date: Wed Jan 18 20:01:06 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000101c5516f$3b96de90$6505a8c0@rjlaptop> References: <000101c5516f$3b96de90$6505a8c0@rjlaptop> Message-ID: <20050505150032.644.1@bepc.1115296715.fake> On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base eGenix > mxODBC Database Connection window, it works fine and returns the 20 > lines expected. That could point to a problem in the rendering, which > seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection to > a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 10:22:17 2005 From: rj at maxxian.com (RJ Juneau) Date: Wed Jan 18 20:01:06 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505150032.644.1@bepc.1115296715.fake> Message-ID: <000201c55175$75bcad10$6505a8c0@rjlaptop> At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 11:47:14 2005 From: rj at maxxian.com (RJ Juneau) Date: Wed Jan 18 20:01:06 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c55181$549be0e0$6505a8c0@rjlaptop> Charlie, I found a fix. Here it is in case anyone else runs into this. You were correct - the problem is in another part of Zope. Based on your feedback, I did a bit more searching and found something here: http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. html The problem appears to be in Zope versions after 2.7.0. I'm running 2.7.6, and the post indicates that it also happens in 2.7.4. The solution: Edit file /lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. There are two lines in the file that start with . Edit them as follows: Change first line to: Change second line to: Just to be after, I shut down Zope before I made the changes and restarted it after. Thanks for the help! RJ -----Original Message----- From: RJ Juneau [mailto:rj@maxxian.com] Sent: May 5, 2005 9:22 AM To: 'Charlie Clark' Cc: 'egenix-users@lists.egenix.com' Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 17:57:25 2005 From: charlie at egenix.com (Charlie Clark) Date: Wed Jan 18 20:01:06 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <20050505165725.3380.2@bepc.1115296715.fake> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Thu May 5 09:15:21 2005 From: charlie at egenix.com (Charlie Clark) Date: Wed Jan 18 20:01:06 2006 Subject: [Zope-DB] RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <000001c55185$41477730$6b00a8c0@fonacier.local> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________ Zope-DB mailing list Zope-DB@zope.org http://mail.zope.org/mailman/listinfo/zope-db From rj at maxxian.com Thu May 5 12:38:00 2005 From: rj at maxxian.com (RJ Juneau) Date: Wed Jan 18 20:01:06 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000001c55188$6b841eb0$6505a8c0@rjlaptop> I just double-checked. Zope-2.7.6-final. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 12:49:16 2005 From: rj at maxxian.com (RJ Juneau) Date: Wed Jan 18 20:01:06 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000501c55189$fe149ba0$6505a8c0@rjlaptop> Charlie, The fix has only been applied for 2.7.7, 2.8b2. The info is in the original bug report which is closed and can be found here: http://www.zope.org/Collectors/Zope/1745 RJ -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Fri May 6 11:50:09 2005 From: rj at maxxian.com (RJ Juneau) Date: Wed Jan 18 20:01:06 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC Message-ID: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Still on eval for the product. I cannot get a stable connection to Sybase via the iODBC drivers. - The Sybase ODBC connection - including a query - have been verified at the iODBC level. - The setup is already working well for ODBC connection to MySQL. Symptoms include: - If I click on "Open Connection", it still comes back with "Connection Closed" when I go to a ZSQL method - Using 'Connect on Demand' is not working either. - Clicking "Open Connection" gives me the following error: Connection string: DSN=lixbox_sybase; UID=sa; PWD=XXXXXXX Connection pool entry: 0 Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection rejected by data source', 7952) The odbc.ini definition for DSN "lixbox_sybase" is as follows: [lixbox_sybase] JetFix = No NoRowSetSizeLimit = No Description = Test connection to listbox Options = LIXBOX DSQUERY = SQLSERVER TDSHOST = lixbox TDSPORT = 5000 TDSVER = 5.0 SQLSERVER_CATALOG = N CURSOR_SENSITIVITY = LOW UserName = sa Password = XXXXXXXX ServerType = Sybase 10/11/12 Driver = /opt/openlink/lib/sql_mt_lt.so Database = pubs2 ReadOnly = no NoAutoCommit = No NoLoginBox = No FetchBufferSize = 60 Other relevant data: - Connecting via OpenLink's iODBC - Zope 2.7.6-final - Python 2.3.4 - Connection to Sybase has been successfully tested with iODBC, including issuing a query - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC connection RJ Juneau Chief Technology Officer Maxxian Integration Inc. 155 Westhampton Drive Thornhill, Ontario Canada L4J 7X2 E-mail: rj@maxxian.com Phone: +1 905 482 9429 Cell: +1 416 897 6682 Toll free: +1 866 758 9161 Fax: +1 647 722 2038 -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050506/aef33361/attachment-0024.htm From mal at egenix.com Fri May 6 18:27:37 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Jan 18 20:01:06 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC In-Reply-To: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> References: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Message-ID: <427B8CE9.1010601@egenix.com> RJ Juneau wrote: > Still on eval for the product. > > I cannot get a stable connection to Sybase via the iODBC drivers. > > - The Sybase ODBC connection - including a query - have been verified at > the iODBC level. > - The setup is already working well for ODBC connection to MySQL. > > Symptoms include: > > - If I click on "Open Connection", it still comes back with "Connection > Closed" when I go to a ZSQL method > - Using 'Connect on Demand' is not working either. > - Clicking "Open Connection" gives me the following error: > > Connection string: DSN=lixbox_sybase; > UID=sa; > PWD=XXXXXXX Try writing the connection string on one line and without whitespace. ODBC drivers sometimes have problems with this. > Connection pool entry: 0 > Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection > rejected by data source', 7952) This is a generic error that relates to authentication or firewall problems. It is possible that turning on ODBC tracing the ODBC manager will give more clues as to the real cause of the problem. > The odbc.ini definition for DSN "lixbox_sybase" is as follows: > > [lixbox_sybase] > JetFix = No > NoRowSetSizeLimit = No > Description = Test connection to listbox > Options = LIXBOX > DSQUERY = SQLSERVER > TDSHOST = lixbox > TDSPORT = 5000 > TDSVER = 5.0 > SQLSERVER_CATALOG = N > CURSOR_SENSITIVITY = LOW > UserName = sa > Password = XXXXXXXX > ServerType = Sybase 10/11/12 > Driver = /opt/openlink/lib/sql_mt_lt.so > Database = pubs2 > ReadOnly = no > NoAutoCommit = No > NoLoginBox = No > FetchBufferSize = 60 > > > Other relevant data: > - Connecting via OpenLink's iODBC > - Zope 2.7.6-final > - Python 2.3.4 > - Connection to Sybase has been successfully tested with iODBC, > including issuing a query > - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC > connection > > > > RJ Juneau > Chief Technology Officer > Maxxian Integration Inc. > 155 Westhampton Drive > Thornhill, Ontario > Canada L4J 7X2 > E-mail: rj@maxxian.com > Phone: +1 905 482 9429 > Cell: +1 416 897 6682 > Toll free: +1 866 758 9161 > Fax: +1 647 722 2038 > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 06 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From calisp at gmail.com Sun May 15 23:49:03 2005 From: calisp at gmail.com (calisp@gmail.com) Date: Wed Jan 18 20:01:06 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK Message-ID: Hi, I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the following error... 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the last phase of a two-phase commit. This shouldn't happen. Traceback (most recent call last): File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one jar.tpc_finish(self) File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish try: self._finish() File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could not perform COMMIT or ROLLBACK', 1023) What could be causing this? Can I get the mxODBCZopeDA source from somewhere? It would make debugging this much easier. Thanks, Calisp. From mal at egenix.com Mon May 16 13:52:12 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Jan 18 20:01:06 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK In-Reply-To: References: Message-ID: <42887B5C.4010109@egenix.com> calisp@gmail.com wrote: > Hi, > > I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with > unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the > following error... > > 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the > last phase of a two-phase commit. This shouldn't happen. > Traceback (most recent call last): > File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one > jar.tpc_finish(self) > File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish > try: self._finish() > File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish > File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler > ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could > not perform COMMIT or ROLLBACK', 1023) You should have a look at the database logs to see what prevented the commit from being completed. > What could be causing this? Hard to say: mxODBCZopeDA is trying to commit the transaction, but the driver or database failed to complete the request. The above error was generated by the ODBC driver. This could be network or DNS problems, or be related to a bug in FreeTDS (which is getting more stable with every new release, but should still be considered beta quality software at the moment). > Can I get the mxODBCZopeDA source from > somewhere? It would make debugging this much easier. Getting the source is not an option and won't help much either since the source of the problem is not mxODBCZopeDA. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 16 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Sun May 1 21:29:25 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Jan 19 08:04:53 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <427259F3.4090806@egenix.com> References: <20050427130906.52878.qmail@web30008.mail.mud.yahoo.com> <427259F3.4090806@egenix.com> Message-ID: <42752005.7080904@egenix.com> M.-A. Lemburg wrote: > David Rushby wrote: > >> --- "M.-A. Lemburg" wrote: >> >>> Are you using the standard mxDateTime build or one >>> with WANT_SUBCLASSABLE_TYPES defined... >> >> >> >> Presumably "the standard", since I just built with 'py24d setup.py >> build', making no attempt to enable special directives. >> >> >>> ... (mxDateTime_Deallocate is only used by the latter)? >> >> >> >> That's true in 2.1.0-2005-04-15, but not in 2.1.0b5. >> >> >>> In any case, please try our latest snapshot: >>> >>> >> >> http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-04-15.zip >> >>> to see if that makes any difference. >> >> >> >> I can't build it out of the box: > > > Hmm, looks like distutils' sdist command doesn't like our new > repository layout which uses symlinks (after we've switched to > subversion). > > We'll have to debug distutils first, I guess :-( Ok, we've found the problem and fixed it. Here's the new release (which does build out of the box at least on our boxes ;-): http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 01 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From davidrushby at yahoo.com Mon May 2 15:49:53 2005 From: davidrushby at yahoo.com (David Rushby) Date: Thu Jan 19 08:04:54 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Ok, we've found the problem and fixed it. Here's the new > release (which does build out of the box at least on our > boxes ;-): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip It does build now, but: py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" still behaves as it did when I submitted my original message: Fatal Python error: UNREF invalid object Aborted This is the same debug build of Python 2.4.1 that I was previously using, running the same configuration (CentOS Linux 4.0/i386, everything compiled with GCC 3.4.3). Have you examined my original claim as to the cause of the bug? __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 10:21:55 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Jan 19 08:04:54 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> References: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> Message-ID: <42772693.8050306@egenix.com> David Rushby wrote: > --- "M.-A. Lemburg" wrote: > >>Ok, we've found the problem and fixed it. Here's the new >>release (which does build out of the box at least on our >>boxes ;-): >> >> > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip > > It does build now, but: > py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" > still behaves as it did when I submitted my original message: > Fatal Python error: UNREF invalid object > Aborted > > This is the same debug build of Python 2.4.1 that I was previously > using, running the same configuration (CentOS Linux 4.0/i386, > everything compiled with GCC 3.4.3). > > Have you examined my original claim as to the cause of the bug? No. We haven't had time for looking into it. I'm not sure whether your analysis of the problem is correct: if you don't define WANT_SUBCLASSABLE_TYPES, the API mxDateTime_Deallocate() is neither defined nor used. Furthermore, PyObject_Del() is only called by mxDateTime_Free() if you have explicitely edited mxDateTime.c to disabled the free list #defines. In a standard build, PyObject_Del() is only called at module finalization time. Note that the reason we call mxDateTime_Free() in the constructor is that we don't want the destructor of the object to be called. Py_DECREF() would call the destructor (mxDateTime_Deallocate). It is possible that the debug code in Python complains about the refcount in the object not being 0 at the time the object is finalized (module finalization time), but I don't see any such checks in PyObject_Free() (which is what PyObject_Del() maps to). Again, all of this does not happen in regular non-debug Python builds. Please be aware that we don't support debug builds, so fixing the problem (if there is one - gcc has some serious optimization problems on some combinations of platform and version) will take a while. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 09:27:37 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Thu Jan 19 08:04:54 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 Message-ID: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Hi all- I am trying to build the mx-base package, v.2.0.6. This will be used with postgresql 7.3.9, psycopg 1.1.18, and Roundup 0.8.2. RHEL 3.0 Python 2.3 egenix-mx-base-2.0.6.tar.gz I performed a: /usr/local/bin/python2.3 setup.py install Everything looks proper with the exeception of this series of warning statements: ----------------- gcc -pthread -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fno-strict-aliasing -fPIC -Imx/BeeBase/mxBeeBase -I/usr/local/incl ude/python2.3 -I/usr/local/include -c mx/BeeBase/mxBeeBase/btr.c -o build/temp.linux-i686-2.3/mx/BeeBase/mxBeeBase/mxBeeBa se/mx/BeeBase/mxBeeBase/btr.o mx/BeeBase/mxBeeBase/btr.c: In function `dumpBuf': mx/BeeBase/mxBeeBase/btr.c:249: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:250: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:255: warning: unsigned int format, long unsigned int arg (arg 4) mx/BeeBase/mxBeeBase/btr.c:256: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c: In function `_validateTree': mx/BeeBase/mxBeeBase/btr.c:330: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:337: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:339: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:349: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:351: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 3) creating build/lib.linux-i686-2.3/mx/BeeBase creating build/lib.linux-i686-2.3/mx/BeeBase/mxBeeBase -------------- Would someone be kind enough to let me know whether these messages were expected, and if not, how I might resolve these? Thanks! DC __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 22:06:33 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Jan 19 08:04:54 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> References: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Message-ID: <4277CBB9.8020302@egenix.com> Dianne Chen wrote: > Hi all- > > I am trying to build the mx-base package, v.2.0.6. > This will be used with postgresql 7.3.9, psycopg > 1.1.18, and Roundup 0.8.2. > > RHEL 3.0 > Python 2.3 > egenix-mx-base-2.0.6.tar.gz > > I performed a: > > /usr/local/bin/python2.3 setup.py install > > Everything looks proper with the exeception of this > series of warning statements: > > ----------------- > ... > -------------- > > Would someone be kind enough to let me know whether > these messages were expected, and if not, how I might > resolve these? These warning can safely be ignored. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 13:41:14 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Thu Jan 19 08:04:54 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: 6667 Message-ID: <20050503194114.72091.qmail@web31414.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Dianne Chen wrote: > > Hi all- > > > > I am trying to build the mx-base package, v.2.0.6. > > This will be used with postgresql 7.3.9, psycopg > > 1.1.18, and Roundup 0.8.2. > > > > RHEL 3.0 > > Python 2.3 > > egenix-mx-base-2.0.6.tar.gz > > > > I performed a: > > > > /usr/local/bin/python2.3 setup.py install > > > > Everything looks proper with the exeception of > this > > series of warning statements: > > > > ----------------- > > ... > > -------------- > > > > Would someone be kind enough to let me know > whether > > these messages were expected, and if not, how I > might > > resolve these? > > These warning can safely be ignored. > > -- > Marc-Andre Lemburg > eGenix.com > Marc- Thank you very much for the reply. It helps greatly. With kind regards, DC __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From davidrushby at yahoo.com Tue May 3 17:18:46 2005 From: davidrushby at yahoo.com (David Rushby) Date: Thu Jan 19 08:04:54 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050503231846.35012.qmail@web30009.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > I'm not sure whether your analysis of the problem is correct... Indeed, my original analysis wasn't correct; I think this one is. The fatal error I'm complaining about only arises if the arguments to DateTime.DateTime are invalid, so that the object is deallocated in the onError block of mxDateTime_FromDateAndTime. If the object is created successfully, and later deallocated by Python's garbage collector, the fatal error doesn't arise. Here's my analysis of the problem: --- If the debugging directive Py_TRACE_REFS is enabled, as it is in my case, the Python interpreter maintains a doubly linked list of all Python objects (named refchain) via the _ob_next and _ob_prev pointers added to PyObject via _PyObject_HEAD_EXTRA. Each object is inserted into refchain by the _Py_AddToAllObjects call in _Py_NewReference, and removed from refchain by the _Py_ForgetReference call in _Py_Dealloc. _Py_ForgetReference performs an integrity check on the object being deallocated (op) to make sure that its neighbors in refchain recognize it. Specifically, _Py_ForgetReference verifies that the _ob_next pointer of the previous object in refchain (op->_ob_prev->_ob_next) points to op, and that the _ob_prev pointer of the next object in refchain (op->_ob_next->_ob_prev) points to op. If either of those conditions is false, the interpreter raises the fatal error I'm seeing. After mxDateTime_New pulls an mxDateTimeObject out of the free list, it calls _Py_NewReference on that object to transform it from a "conceptually deallocated" object to a "conceptually allocated" one. _Py_NewReference inserts the object into refchain. Later, when the object is being "conceptually deallocated", it should be removed from refchain with _Py_ForgetReference. The version of _Py_Dealloc that's active when Py_TRACE_REFS is enabled does this (_Py_Dealloc is the element of Py_DECREF that performs the actual destruction). _Py_Dealloc first calls _Py_ForgetReference to remove the object from refchain, then calls the object's destructor (op->ob_type->tp_dealloc). If WANT_SUBCLASSABLE_TYPES is not defined (it is not in my case), the destructor for mxDateTime_Type is mxDateTime_Free. So, if a DateTime object is deallocated normally, as a result of its reference count falling to zero, _Py_Dealloc is called on the object, which first removes it from refchain, then passes it to mxDateTime_Free. If a DateTime object is destroyed prematurely, as a result of invalid arguments to its destructor, the onError handler calls mxDateTime_Free, so the object is "conceptually deallocated" (placed in the free list), *but* the object is not removed from refchain. So if a refchain-membership-integrity-check is performed on the object in question or one of its immediate neighbors in refchain, that integrity check fails, leading to the fatal error. --- The solution is to 'Py_DECREF(...)' the object in the onError handler of its constructor, instead of passing the object directly to mxDateTime_Free. That change solves two problems: 1) It causes _Py_Dealloc to execute, which in turn executes _Py_ForgetReference, so the object is removed from refchain, as it should be. 2) At present, objects that are created successfully and later deallocated by normal reference count mechanics have a reference count of 0 when they enter the free list, whereas objects whose constructors abort their creation due to invalid arguments have a reference count of 1 when they enter the free list. Although AFAIK this doesn't cause an actual execution problem (because the object's reference count is *explicitly set to 1* rather than *incremented by 1* when the object is later "conceptually allocated" by _Py_NewReference), it is likely to confuse future maintainers and thereby lead to the introduction of an actual execution problem. I assume that if you agree that this is a reasonable solution, you'll want to apply the change not only to mxDateTime_FromDateAndTime, but to all similar constructors in mxDateTime.c. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From rj at maxxian.com Thu May 5 01:57:40 2005 From: rj at maxxian.com (RJ Juneau) Date: Thu Jan 19 08:04:54 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c5512e$f72798c0$6505a8c0@rjlaptop> I'm on the 30 day evaluation for mxodbc_zope_da. I'm getting the following error when I submit some queries: Error Type: KeyError Error Value: 'query' I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 with UCS4. The error seems to be caused by multiple rows being returned. I did see an earlier posting with the same error message. The response suggested a template error, but this is clearly not the case here. The additional evidence I've gathered so far: - I'm running the test directly from the ZSQL method, so there's no template involved. - If I use the same query with an additional "where" clause to ensure that only one row is returned, it works - If I use a value in the 'where' clause with no rows returned, it works - The same ZSQL query is being used on a Windows machine running Zope and the free ZODBC module without a problem - The query has been verified directly in mysql-client-browser Other info: - The database is MySQL 4.1.10A-0 - iODBC is the DB driver RJ Juneau -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050505/68d278bf/attachment-0025.htm From mal at egenix.com Thu May 5 12:37:43 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Jan 19 08:04:54 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c5512e$f72798c0$6505a8c0@rjlaptop> References: <000301c5512e$f72798c0$6505a8c0@rjlaptop> Message-ID: <4279E967.6010904@egenix.com> RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 > with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 09:37:42 2005 From: rj at maxxian.com (RJ Juneau) Date: Thu Jan 19 08:04:54 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000101c5516f$3b96de90$6505a8c0@rjlaptop> More interesting info on the problem: If I execute the query directly in the "test" window of the base eGenix mxODBC Database Connection window, it works fine and returns the 20 lines expected. That could point to a problem in the rendering, which seems to be where the traceback ends. Note that within the same Zope system I also have an ODBC connection to a Sybase database, and I have successfully tested multi-line ZSQL queries there. This is the traceback: Time 2005/05/05 07:55:15.294 GMT-4 Exception Type KeyError Exception Value 'query' Traceback (innermost last): Module ZPublisher.Publish, line 101, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 39, in call_object Module Shared.DC.ZRDB.DA, line 337, in manage_test Module DocumentTemplate.DT_String, line 474, in __call__ Module DocumentTemplate.DT_In, line 602, in renderwb Module DocumentTemplate.DT_Var, line 219, in render KeyError: 'query' I don't think the following is an issue, but I'll include it for completeness.I am also getting the following iODBC warnings and errors in the Zope console log, which are related to the ODBC parameters being passed by iODBC. Note that these errors also appear for all of the successful queries. [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (Setup). [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (UsageCount). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Timeout). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Reuse). As for the ZSQL snippet from the template... Since there's no template involved yet (I'm still testing directly from the ZSQL method), I assume you mean the SQL code? select h.host_name, s.system_name, s.system_handle, count(*) from terminal t, system_map s, host h where t.system_index = s.system_index and s.host_index = h.host_index group by s.system_name order by h.host_name Nothing complicated here. There are no parameters passed to the query. RJ -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: May 5, 2005 5:38 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: Re: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is > 2.3.4 with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ---------------------------------------------------------------------- > -- > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 16:00:32 2005 From: charlie at egenix.com (Charlie Clark) Date: Thu Jan 19 08:04:54 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000101c5516f$3b96de90$6505a8c0@rjlaptop> References: <000101c5516f$3b96de90$6505a8c0@rjlaptop> Message-ID: <20050505150032.644.1@bepc.1115296715.fake> On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base eGenix > mxODBC Database Connection window, it works fine and returns the 20 > lines expected. That could point to a problem in the rendering, which > seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection to > a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 10:22:17 2005 From: rj at maxxian.com (RJ Juneau) Date: Thu Jan 19 08:04:54 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505150032.644.1@bepc.1115296715.fake> Message-ID: <000201c55175$75bcad10$6505a8c0@rjlaptop> At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 11:47:14 2005 From: rj at maxxian.com (RJ Juneau) Date: Thu Jan 19 08:04:54 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c55181$549be0e0$6505a8c0@rjlaptop> Charlie, I found a fix. Here it is in case anyone else runs into this. You were correct - the problem is in another part of Zope. Based on your feedback, I did a bit more searching and found something here: http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. html The problem appears to be in Zope versions after 2.7.0. I'm running 2.7.6, and the post indicates that it also happens in 2.7.4. The solution: Edit file /lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. There are two lines in the file that start with . Edit them as follows: Change first line to: Change second line to: Just to be after, I shut down Zope before I made the changes and restarted it after. Thanks for the help! RJ -----Original Message----- From: RJ Juneau [mailto:rj@maxxian.com] Sent: May 5, 2005 9:22 AM To: 'Charlie Clark' Cc: 'egenix-users@lists.egenix.com' Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 17:57:25 2005 From: charlie at egenix.com (Charlie Clark) Date: Thu Jan 19 08:04:54 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <20050505165725.3380.2@bepc.1115296715.fake> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Thu May 5 09:15:21 2005 From: charlie at egenix.com (Charlie Clark) Date: Thu Jan 19 08:04:54 2006 Subject: [Zope-DB] RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <000001c55185$41477730$6b00a8c0@fonacier.local> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________ Zope-DB mailing list Zope-DB@zope.org http://mail.zope.org/mailman/listinfo/zope-db From rj at maxxian.com Thu May 5 12:38:00 2005 From: rj at maxxian.com (RJ Juneau) Date: Thu Jan 19 08:04:54 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000001c55188$6b841eb0$6505a8c0@rjlaptop> I just double-checked. Zope-2.7.6-final. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 12:49:16 2005 From: rj at maxxian.com (RJ Juneau) Date: Thu Jan 19 08:04:54 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000501c55189$fe149ba0$6505a8c0@rjlaptop> Charlie, The fix has only been applied for 2.7.7, 2.8b2. The info is in the original bug report which is closed and can be found here: http://www.zope.org/Collectors/Zope/1745 RJ -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Fri May 6 11:50:09 2005 From: rj at maxxian.com (RJ Juneau) Date: Thu Jan 19 08:04:54 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC Message-ID: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Still on eval for the product. I cannot get a stable connection to Sybase via the iODBC drivers. - The Sybase ODBC connection - including a query - have been verified at the iODBC level. - The setup is already working well for ODBC connection to MySQL. Symptoms include: - If I click on "Open Connection", it still comes back with "Connection Closed" when I go to a ZSQL method - Using 'Connect on Demand' is not working either. - Clicking "Open Connection" gives me the following error: Connection string: DSN=lixbox_sybase; UID=sa; PWD=XXXXXXX Connection pool entry: 0 Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection rejected by data source', 7952) The odbc.ini definition for DSN "lixbox_sybase" is as follows: [lixbox_sybase] JetFix = No NoRowSetSizeLimit = No Description = Test connection to listbox Options = LIXBOX DSQUERY = SQLSERVER TDSHOST = lixbox TDSPORT = 5000 TDSVER = 5.0 SQLSERVER_CATALOG = N CURSOR_SENSITIVITY = LOW UserName = sa Password = XXXXXXXX ServerType = Sybase 10/11/12 Driver = /opt/openlink/lib/sql_mt_lt.so Database = pubs2 ReadOnly = no NoAutoCommit = No NoLoginBox = No FetchBufferSize = 60 Other relevant data: - Connecting via OpenLink's iODBC - Zope 2.7.6-final - Python 2.3.4 - Connection to Sybase has been successfully tested with iODBC, including issuing a query - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC connection RJ Juneau Chief Technology Officer Maxxian Integration Inc. 155 Westhampton Drive Thornhill, Ontario Canada L4J 7X2 E-mail: rj@maxxian.com Phone: +1 905 482 9429 Cell: +1 416 897 6682 Toll free: +1 866 758 9161 Fax: +1 647 722 2038 -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050506/aef33361/attachment-0025.htm From mal at egenix.com Fri May 6 18:27:37 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Jan 19 08:04:54 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC In-Reply-To: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> References: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Message-ID: <427B8CE9.1010601@egenix.com> RJ Juneau wrote: > Still on eval for the product. > > I cannot get a stable connection to Sybase via the iODBC drivers. > > - The Sybase ODBC connection - including a query - have been verified at > the iODBC level. > - The setup is already working well for ODBC connection to MySQL. > > Symptoms include: > > - If I click on "Open Connection", it still comes back with "Connection > Closed" when I go to a ZSQL method > - Using 'Connect on Demand' is not working either. > - Clicking "Open Connection" gives me the following error: > > Connection string: DSN=lixbox_sybase; > UID=sa; > PWD=XXXXXXX Try writing the connection string on one line and without whitespace. ODBC drivers sometimes have problems with this. > Connection pool entry: 0 > Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection > rejected by data source', 7952) This is a generic error that relates to authentication or firewall problems. It is possible that turning on ODBC tracing the ODBC manager will give more clues as to the real cause of the problem. > The odbc.ini definition for DSN "lixbox_sybase" is as follows: > > [lixbox_sybase] > JetFix = No > NoRowSetSizeLimit = No > Description = Test connection to listbox > Options = LIXBOX > DSQUERY = SQLSERVER > TDSHOST = lixbox > TDSPORT = 5000 > TDSVER = 5.0 > SQLSERVER_CATALOG = N > CURSOR_SENSITIVITY = LOW > UserName = sa > Password = XXXXXXXX > ServerType = Sybase 10/11/12 > Driver = /opt/openlink/lib/sql_mt_lt.so > Database = pubs2 > ReadOnly = no > NoAutoCommit = No > NoLoginBox = No > FetchBufferSize = 60 > > > Other relevant data: > - Connecting via OpenLink's iODBC > - Zope 2.7.6-final > - Python 2.3.4 > - Connection to Sybase has been successfully tested with iODBC, > including issuing a query > - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC > connection > > > > RJ Juneau > Chief Technology Officer > Maxxian Integration Inc. > 155 Westhampton Drive > Thornhill, Ontario > Canada L4J 7X2 > E-mail: rj@maxxian.com > Phone: +1 905 482 9429 > Cell: +1 416 897 6682 > Toll free: +1 866 758 9161 > Fax: +1 647 722 2038 > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 06 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From calisp at gmail.com Sun May 15 23:49:03 2005 From: calisp at gmail.com (calisp@gmail.com) Date: Thu Jan 19 08:04:54 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK Message-ID: Hi, I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the following error... 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the last phase of a two-phase commit. This shouldn't happen. Traceback (most recent call last): File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one jar.tpc_finish(self) File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish try: self._finish() File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could not perform COMMIT or ROLLBACK', 1023) What could be causing this? Can I get the mxODBCZopeDA source from somewhere? It would make debugging this much easier. Thanks, Calisp. From mal at egenix.com Mon May 16 13:52:12 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Jan 19 08:04:54 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK In-Reply-To: References: Message-ID: <42887B5C.4010109@egenix.com> calisp@gmail.com wrote: > Hi, > > I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with > unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the > following error... > > 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the > last phase of a two-phase commit. This shouldn't happen. > Traceback (most recent call last): > File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one > jar.tpc_finish(self) > File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish > try: self._finish() > File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish > File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler > ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could > not perform COMMIT or ROLLBACK', 1023) You should have a look at the database logs to see what prevented the commit from being completed. > What could be causing this? Hard to say: mxODBCZopeDA is trying to commit the transaction, but the driver or database failed to complete the request. The above error was generated by the ODBC driver. This could be network or DNS problems, or be related to a bug in FreeTDS (which is getting more stable with every new release, but should still be considered beta quality software at the moment). > Can I get the mxODBCZopeDA source from > somewhere? It would make debugging this much easier. Getting the source is not an option and won't help much either since the source of the problem is not mxODBCZopeDA. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 16 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Sun May 1 21:29:25 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Jan 19 12:01:11 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <427259F3.4090806@egenix.com> References: <20050427130906.52878.qmail@web30008.mail.mud.yahoo.com> <427259F3.4090806@egenix.com> Message-ID: <42752005.7080904@egenix.com> M.-A. Lemburg wrote: > David Rushby wrote: > >> --- "M.-A. Lemburg" wrote: >> >>> Are you using the standard mxDateTime build or one >>> with WANT_SUBCLASSABLE_TYPES defined... >> >> >> >> Presumably "the standard", since I just built with 'py24d setup.py >> build', making no attempt to enable special directives. >> >> >>> ... (mxDateTime_Deallocate is only used by the latter)? >> >> >> >> That's true in 2.1.0-2005-04-15, but not in 2.1.0b5. >> >> >>> In any case, please try our latest snapshot: >>> >>> >> >> http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-04-15.zip >> >>> to see if that makes any difference. >> >> >> >> I can't build it out of the box: > > > Hmm, looks like distutils' sdist command doesn't like our new > repository layout which uses symlinks (after we've switched to > subversion). > > We'll have to debug distutils first, I guess :-( Ok, we've found the problem and fixed it. Here's the new release (which does build out of the box at least on our boxes ;-): http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 01 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From davidrushby at yahoo.com Mon May 2 15:49:53 2005 From: davidrushby at yahoo.com (David Rushby) Date: Thu Jan 19 12:01:11 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Ok, we've found the problem and fixed it. Here's the new > release (which does build out of the box at least on our > boxes ;-): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip It does build now, but: py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" still behaves as it did when I submitted my original message: Fatal Python error: UNREF invalid object Aborted This is the same debug build of Python 2.4.1 that I was previously using, running the same configuration (CentOS Linux 4.0/i386, everything compiled with GCC 3.4.3). Have you examined my original claim as to the cause of the bug? __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 10:21:55 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Jan 19 12:01:11 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> References: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> Message-ID: <42772693.8050306@egenix.com> David Rushby wrote: > --- "M.-A. Lemburg" wrote: > >>Ok, we've found the problem and fixed it. Here's the new >>release (which does build out of the box at least on our >>boxes ;-): >> >> > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip > > It does build now, but: > py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" > still behaves as it did when I submitted my original message: > Fatal Python error: UNREF invalid object > Aborted > > This is the same debug build of Python 2.4.1 that I was previously > using, running the same configuration (CentOS Linux 4.0/i386, > everything compiled with GCC 3.4.3). > > Have you examined my original claim as to the cause of the bug? No. We haven't had time for looking into it. I'm not sure whether your analysis of the problem is correct: if you don't define WANT_SUBCLASSABLE_TYPES, the API mxDateTime_Deallocate() is neither defined nor used. Furthermore, PyObject_Del() is only called by mxDateTime_Free() if you have explicitely edited mxDateTime.c to disabled the free list #defines. In a standard build, PyObject_Del() is only called at module finalization time. Note that the reason we call mxDateTime_Free() in the constructor is that we don't want the destructor of the object to be called. Py_DECREF() would call the destructor (mxDateTime_Deallocate). It is possible that the debug code in Python complains about the refcount in the object not being 0 at the time the object is finalized (module finalization time), but I don't see any such checks in PyObject_Free() (which is what PyObject_Del() maps to). Again, all of this does not happen in regular non-debug Python builds. Please be aware that we don't support debug builds, so fixing the problem (if there is one - gcc has some serious optimization problems on some combinations of platform and version) will take a while. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 09:27:37 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Thu Jan 19 12:01:11 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 Message-ID: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Hi all- I am trying to build the mx-base package, v.2.0.6. This will be used with postgresql 7.3.9, psycopg 1.1.18, and Roundup 0.8.2. RHEL 3.0 Python 2.3 egenix-mx-base-2.0.6.tar.gz I performed a: /usr/local/bin/python2.3 setup.py install Everything looks proper with the exeception of this series of warning statements: ----------------- gcc -pthread -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fno-strict-aliasing -fPIC -Imx/BeeBase/mxBeeBase -I/usr/local/incl ude/python2.3 -I/usr/local/include -c mx/BeeBase/mxBeeBase/btr.c -o build/temp.linux-i686-2.3/mx/BeeBase/mxBeeBase/mxBeeBa se/mx/BeeBase/mxBeeBase/btr.o mx/BeeBase/mxBeeBase/btr.c: In function `dumpBuf': mx/BeeBase/mxBeeBase/btr.c:249: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:250: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:255: warning: unsigned int format, long unsigned int arg (arg 4) mx/BeeBase/mxBeeBase/btr.c:256: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c: In function `_validateTree': mx/BeeBase/mxBeeBase/btr.c:330: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:337: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:339: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:349: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:351: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 3) creating build/lib.linux-i686-2.3/mx/BeeBase creating build/lib.linux-i686-2.3/mx/BeeBase/mxBeeBase -------------- Would someone be kind enough to let me know whether these messages were expected, and if not, how I might resolve these? Thanks! DC __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 22:06:33 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Jan 19 12:01:11 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> References: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Message-ID: <4277CBB9.8020302@egenix.com> Dianne Chen wrote: > Hi all- > > I am trying to build the mx-base package, v.2.0.6. > This will be used with postgresql 7.3.9, psycopg > 1.1.18, and Roundup 0.8.2. > > RHEL 3.0 > Python 2.3 > egenix-mx-base-2.0.6.tar.gz > > I performed a: > > /usr/local/bin/python2.3 setup.py install > > Everything looks proper with the exeception of this > series of warning statements: > > ----------------- > ... > -------------- > > Would someone be kind enough to let me know whether > these messages were expected, and if not, how I might > resolve these? These warning can safely be ignored. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 13:41:14 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Thu Jan 19 12:01:11 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: 6667 Message-ID: <20050503194114.72091.qmail@web31414.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Dianne Chen wrote: > > Hi all- > > > > I am trying to build the mx-base package, v.2.0.6. > > This will be used with postgresql 7.3.9, psycopg > > 1.1.18, and Roundup 0.8.2. > > > > RHEL 3.0 > > Python 2.3 > > egenix-mx-base-2.0.6.tar.gz > > > > I performed a: > > > > /usr/local/bin/python2.3 setup.py install > > > > Everything looks proper with the exeception of > this > > series of warning statements: > > > > ----------------- > > ... > > -------------- > > > > Would someone be kind enough to let me know > whether > > these messages were expected, and if not, how I > might > > resolve these? > > These warning can safely be ignored. > > -- > Marc-Andre Lemburg > eGenix.com > Marc- Thank you very much for the reply. It helps greatly. With kind regards, DC __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From davidrushby at yahoo.com Tue May 3 17:18:46 2005 From: davidrushby at yahoo.com (David Rushby) Date: Thu Jan 19 12:01:11 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050503231846.35012.qmail@web30009.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > I'm not sure whether your analysis of the problem is correct... Indeed, my original analysis wasn't correct; I think this one is. The fatal error I'm complaining about only arises if the arguments to DateTime.DateTime are invalid, so that the object is deallocated in the onError block of mxDateTime_FromDateAndTime. If the object is created successfully, and later deallocated by Python's garbage collector, the fatal error doesn't arise. Here's my analysis of the problem: --- If the debugging directive Py_TRACE_REFS is enabled, as it is in my case, the Python interpreter maintains a doubly linked list of all Python objects (named refchain) via the _ob_next and _ob_prev pointers added to PyObject via _PyObject_HEAD_EXTRA. Each object is inserted into refchain by the _Py_AddToAllObjects call in _Py_NewReference, and removed from refchain by the _Py_ForgetReference call in _Py_Dealloc. _Py_ForgetReference performs an integrity check on the object being deallocated (op) to make sure that its neighbors in refchain recognize it. Specifically, _Py_ForgetReference verifies that the _ob_next pointer of the previous object in refchain (op->_ob_prev->_ob_next) points to op, and that the _ob_prev pointer of the next object in refchain (op->_ob_next->_ob_prev) points to op. If either of those conditions is false, the interpreter raises the fatal error I'm seeing. After mxDateTime_New pulls an mxDateTimeObject out of the free list, it calls _Py_NewReference on that object to transform it from a "conceptually deallocated" object to a "conceptually allocated" one. _Py_NewReference inserts the object into refchain. Later, when the object is being "conceptually deallocated", it should be removed from refchain with _Py_ForgetReference. The version of _Py_Dealloc that's active when Py_TRACE_REFS is enabled does this (_Py_Dealloc is the element of Py_DECREF that performs the actual destruction). _Py_Dealloc first calls _Py_ForgetReference to remove the object from refchain, then calls the object's destructor (op->ob_type->tp_dealloc). If WANT_SUBCLASSABLE_TYPES is not defined (it is not in my case), the destructor for mxDateTime_Type is mxDateTime_Free. So, if a DateTime object is deallocated normally, as a result of its reference count falling to zero, _Py_Dealloc is called on the object, which first removes it from refchain, then passes it to mxDateTime_Free. If a DateTime object is destroyed prematurely, as a result of invalid arguments to its destructor, the onError handler calls mxDateTime_Free, so the object is "conceptually deallocated" (placed in the free list), *but* the object is not removed from refchain. So if a refchain-membership-integrity-check is performed on the object in question or one of its immediate neighbors in refchain, that integrity check fails, leading to the fatal error. --- The solution is to 'Py_DECREF(...)' the object in the onError handler of its constructor, instead of passing the object directly to mxDateTime_Free. That change solves two problems: 1) It causes _Py_Dealloc to execute, which in turn executes _Py_ForgetReference, so the object is removed from refchain, as it should be. 2) At present, objects that are created successfully and later deallocated by normal reference count mechanics have a reference count of 0 when they enter the free list, whereas objects whose constructors abort their creation due to invalid arguments have a reference count of 1 when they enter the free list. Although AFAIK this doesn't cause an actual execution problem (because the object's reference count is *explicitly set to 1* rather than *incremented by 1* when the object is later "conceptually allocated" by _Py_NewReference), it is likely to confuse future maintainers and thereby lead to the introduction of an actual execution problem. I assume that if you agree that this is a reasonable solution, you'll want to apply the change not only to mxDateTime_FromDateAndTime, but to all similar constructors in mxDateTime.c. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From rj at maxxian.com Thu May 5 01:57:40 2005 From: rj at maxxian.com (RJ Juneau) Date: Thu Jan 19 12:01:11 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c5512e$f72798c0$6505a8c0@rjlaptop> I'm on the 30 day evaluation for mxodbc_zope_da. I'm getting the following error when I submit some queries: Error Type: KeyError Error Value: 'query' I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 with UCS4. The error seems to be caused by multiple rows being returned. I did see an earlier posting with the same error message. The response suggested a template error, but this is clearly not the case here. The additional evidence I've gathered so far: - I'm running the test directly from the ZSQL method, so there's no template involved. - If I use the same query with an additional "where" clause to ensure that only one row is returned, it works - If I use a value in the 'where' clause with no rows returned, it works - The same ZSQL query is being used on a Windows machine running Zope and the free ZODBC module without a problem - The query has been verified directly in mysql-client-browser Other info: - The database is MySQL 4.1.10A-0 - iODBC is the DB driver RJ Juneau -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050505/68d278bf/attachment-0026.htm From mal at egenix.com Thu May 5 12:37:43 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Jan 19 12:01:11 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c5512e$f72798c0$6505a8c0@rjlaptop> References: <000301c5512e$f72798c0$6505a8c0@rjlaptop> Message-ID: <4279E967.6010904@egenix.com> RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 > with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 09:37:42 2005 From: rj at maxxian.com (RJ Juneau) Date: Thu Jan 19 12:01:11 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000101c5516f$3b96de90$6505a8c0@rjlaptop> More interesting info on the problem: If I execute the query directly in the "test" window of the base eGenix mxODBC Database Connection window, it works fine and returns the 20 lines expected. That could point to a problem in the rendering, which seems to be where the traceback ends. Note that within the same Zope system I also have an ODBC connection to a Sybase database, and I have successfully tested multi-line ZSQL queries there. This is the traceback: Time 2005/05/05 07:55:15.294 GMT-4 Exception Type KeyError Exception Value 'query' Traceback (innermost last): Module ZPublisher.Publish, line 101, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 39, in call_object Module Shared.DC.ZRDB.DA, line 337, in manage_test Module DocumentTemplate.DT_String, line 474, in __call__ Module DocumentTemplate.DT_In, line 602, in renderwb Module DocumentTemplate.DT_Var, line 219, in render KeyError: 'query' I don't think the following is an issue, but I'll include it for completeness.I am also getting the following iODBC warnings and errors in the Zope console log, which are related to the ODBC parameters being passed by iODBC. Note that these errors also appear for all of the successful queries. [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (Setup). [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (UsageCount). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Timeout). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Reuse). As for the ZSQL snippet from the template... Since there's no template involved yet (I'm still testing directly from the ZSQL method), I assume you mean the SQL code? select h.host_name, s.system_name, s.system_handle, count(*) from terminal t, system_map s, host h where t.system_index = s.system_index and s.host_index = h.host_index group by s.system_name order by h.host_name Nothing complicated here. There are no parameters passed to the query. RJ -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: May 5, 2005 5:38 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: Re: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is > 2.3.4 with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ---------------------------------------------------------------------- > -- > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 16:00:32 2005 From: charlie at egenix.com (Charlie Clark) Date: Thu Jan 19 12:01:11 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000101c5516f$3b96de90$6505a8c0@rjlaptop> References: <000101c5516f$3b96de90$6505a8c0@rjlaptop> Message-ID: <20050505150032.644.1@bepc.1115296715.fake> On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base eGenix > mxODBC Database Connection window, it works fine and returns the 20 > lines expected. That could point to a problem in the rendering, which > seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection to > a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 10:22:17 2005 From: rj at maxxian.com (RJ Juneau) Date: Thu Jan 19 12:01:11 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505150032.644.1@bepc.1115296715.fake> Message-ID: <000201c55175$75bcad10$6505a8c0@rjlaptop> At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 11:47:14 2005 From: rj at maxxian.com (RJ Juneau) Date: Thu Jan 19 12:01:11 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c55181$549be0e0$6505a8c0@rjlaptop> Charlie, I found a fix. Here it is in case anyone else runs into this. You were correct - the problem is in another part of Zope. Based on your feedback, I did a bit more searching and found something here: http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. html The problem appears to be in Zope versions after 2.7.0. I'm running 2.7.6, and the post indicates that it also happens in 2.7.4. The solution: Edit file /lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. There are two lines in the file that start with . Edit them as follows: Change first line to: Change second line to: Just to be after, I shut down Zope before I made the changes and restarted it after. Thanks for the help! RJ -----Original Message----- From: RJ Juneau [mailto:rj@maxxian.com] Sent: May 5, 2005 9:22 AM To: 'Charlie Clark' Cc: 'egenix-users@lists.egenix.com' Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 17:57:25 2005 From: charlie at egenix.com (Charlie Clark) Date: Thu Jan 19 12:01:12 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <20050505165725.3380.2@bepc.1115296715.fake> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Thu May 5 09:15:21 2005 From: charlie at egenix.com (Charlie Clark) Date: Thu Jan 19 12:01:12 2006 Subject: [Zope-DB] RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <000001c55185$41477730$6b00a8c0@fonacier.local> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________ Zope-DB mailing list Zope-DB@zope.org http://mail.zope.org/mailman/listinfo/zope-db From rj at maxxian.com Thu May 5 12:38:00 2005 From: rj at maxxian.com (RJ Juneau) Date: Thu Jan 19 12:01:12 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000001c55188$6b841eb0$6505a8c0@rjlaptop> I just double-checked. Zope-2.7.6-final. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 12:49:16 2005 From: rj at maxxian.com (RJ Juneau) Date: Thu Jan 19 12:01:12 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000501c55189$fe149ba0$6505a8c0@rjlaptop> Charlie, The fix has only been applied for 2.7.7, 2.8b2. The info is in the original bug report which is closed and can be found here: http://www.zope.org/Collectors/Zope/1745 RJ -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Fri May 6 11:50:09 2005 From: rj at maxxian.com (RJ Juneau) Date: Thu Jan 19 12:01:12 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC Message-ID: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Still on eval for the product. I cannot get a stable connection to Sybase via the iODBC drivers. - The Sybase ODBC connection - including a query - have been verified at the iODBC level. - The setup is already working well for ODBC connection to MySQL. Symptoms include: - If I click on "Open Connection", it still comes back with "Connection Closed" when I go to a ZSQL method - Using 'Connect on Demand' is not working either. - Clicking "Open Connection" gives me the following error: Connection string: DSN=lixbox_sybase; UID=sa; PWD=XXXXXXX Connection pool entry: 0 Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection rejected by data source', 7952) The odbc.ini definition for DSN "lixbox_sybase" is as follows: [lixbox_sybase] JetFix = No NoRowSetSizeLimit = No Description = Test connection to listbox Options = LIXBOX DSQUERY = SQLSERVER TDSHOST = lixbox TDSPORT = 5000 TDSVER = 5.0 SQLSERVER_CATALOG = N CURSOR_SENSITIVITY = LOW UserName = sa Password = XXXXXXXX ServerType = Sybase 10/11/12 Driver = /opt/openlink/lib/sql_mt_lt.so Database = pubs2 ReadOnly = no NoAutoCommit = No NoLoginBox = No FetchBufferSize = 60 Other relevant data: - Connecting via OpenLink's iODBC - Zope 2.7.6-final - Python 2.3.4 - Connection to Sybase has been successfully tested with iODBC, including issuing a query - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC connection RJ Juneau Chief Technology Officer Maxxian Integration Inc. 155 Westhampton Drive Thornhill, Ontario Canada L4J 7X2 E-mail: rj@maxxian.com Phone: +1 905 482 9429 Cell: +1 416 897 6682 Toll free: +1 866 758 9161 Fax: +1 647 722 2038 -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050506/aef33361/attachment-0026.htm From mal at egenix.com Fri May 6 18:27:37 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Jan 19 12:01:12 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC In-Reply-To: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> References: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Message-ID: <427B8CE9.1010601@egenix.com> RJ Juneau wrote: > Still on eval for the product. > > I cannot get a stable connection to Sybase via the iODBC drivers. > > - The Sybase ODBC connection - including a query - have been verified at > the iODBC level. > - The setup is already working well for ODBC connection to MySQL. > > Symptoms include: > > - If I click on "Open Connection", it still comes back with "Connection > Closed" when I go to a ZSQL method > - Using 'Connect on Demand' is not working either. > - Clicking "Open Connection" gives me the following error: > > Connection string: DSN=lixbox_sybase; > UID=sa; > PWD=XXXXXXX Try writing the connection string on one line and without whitespace. ODBC drivers sometimes have problems with this. > Connection pool entry: 0 > Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection > rejected by data source', 7952) This is a generic error that relates to authentication or firewall problems. It is possible that turning on ODBC tracing the ODBC manager will give more clues as to the real cause of the problem. > The odbc.ini definition for DSN "lixbox_sybase" is as follows: > > [lixbox_sybase] > JetFix = No > NoRowSetSizeLimit = No > Description = Test connection to listbox > Options = LIXBOX > DSQUERY = SQLSERVER > TDSHOST = lixbox > TDSPORT = 5000 > TDSVER = 5.0 > SQLSERVER_CATALOG = N > CURSOR_SENSITIVITY = LOW > UserName = sa > Password = XXXXXXXX > ServerType = Sybase 10/11/12 > Driver = /opt/openlink/lib/sql_mt_lt.so > Database = pubs2 > ReadOnly = no > NoAutoCommit = No > NoLoginBox = No > FetchBufferSize = 60 > > > Other relevant data: > - Connecting via OpenLink's iODBC > - Zope 2.7.6-final > - Python 2.3.4 > - Connection to Sybase has been successfully tested with iODBC, > including issuing a query > - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC > connection > > > > RJ Juneau > Chief Technology Officer > Maxxian Integration Inc. > 155 Westhampton Drive > Thornhill, Ontario > Canada L4J 7X2 > E-mail: rj@maxxian.com > Phone: +1 905 482 9429 > Cell: +1 416 897 6682 > Toll free: +1 866 758 9161 > Fax: +1 647 722 2038 > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 06 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From calisp at gmail.com Sun May 15 23:49:03 2005 From: calisp at gmail.com (calisp@gmail.com) Date: Thu Jan 19 12:01:12 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK Message-ID: Hi, I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the following error... 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the last phase of a two-phase commit. This shouldn't happen. Traceback (most recent call last): File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one jar.tpc_finish(self) File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish try: self._finish() File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could not perform COMMIT or ROLLBACK', 1023) What could be causing this? Can I get the mxODBCZopeDA source from somewhere? It would make debugging this much easier. Thanks, Calisp. From mal at egenix.com Mon May 16 13:52:12 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Jan 19 12:01:12 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK In-Reply-To: References: Message-ID: <42887B5C.4010109@egenix.com> calisp@gmail.com wrote: > Hi, > > I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with > unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the > following error... > > 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the > last phase of a two-phase commit. This shouldn't happen. > Traceback (most recent call last): > File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one > jar.tpc_finish(self) > File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish > try: self._finish() > File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish > File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler > ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could > not perform COMMIT or ROLLBACK', 1023) You should have a look at the database logs to see what prevented the commit from being completed. > What could be causing this? Hard to say: mxODBCZopeDA is trying to commit the transaction, but the driver or database failed to complete the request. The above error was generated by the ODBC driver. This could be network or DNS problems, or be related to a bug in FreeTDS (which is getting more stable with every new release, but should still be considered beta quality software at the moment). > Can I get the mxODBCZopeDA source from > somewhere? It would make debugging this much easier. Getting the source is not an option and won't help much either since the source of the problem is not mxODBCZopeDA. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 16 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Sun May 1 21:29:25 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Jan 19 16:03:36 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <427259F3.4090806@egenix.com> References: <20050427130906.52878.qmail@web30008.mail.mud.yahoo.com> <427259F3.4090806@egenix.com> Message-ID: <42752005.7080904@egenix.com> M.-A. Lemburg wrote: > David Rushby wrote: > >> --- "M.-A. Lemburg" wrote: >> >>> Are you using the standard mxDateTime build or one >>> with WANT_SUBCLASSABLE_TYPES defined... >> >> >> >> Presumably "the standard", since I just built with 'py24d setup.py >> build', making no attempt to enable special directives. >> >> >>> ... (mxDateTime_Deallocate is only used by the latter)? >> >> >> >> That's true in 2.1.0-2005-04-15, but not in 2.1.0b5. >> >> >>> In any case, please try our latest snapshot: >>> >>> >> >> http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-04-15.zip >> >>> to see if that makes any difference. >> >> >> >> I can't build it out of the box: > > > Hmm, looks like distutils' sdist command doesn't like our new > repository layout which uses symlinks (after we've switched to > subversion). > > We'll have to debug distutils first, I guess :-( Ok, we've found the problem and fixed it. Here's the new release (which does build out of the box at least on our boxes ;-): http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 01 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From davidrushby at yahoo.com Mon May 2 15:49:53 2005 From: davidrushby at yahoo.com (David Rushby) Date: Thu Jan 19 16:03:36 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Ok, we've found the problem and fixed it. Here's the new > release (which does build out of the box at least on our > boxes ;-): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip It does build now, but: py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" still behaves as it did when I submitted my original message: Fatal Python error: UNREF invalid object Aborted This is the same debug build of Python 2.4.1 that I was previously using, running the same configuration (CentOS Linux 4.0/i386, everything compiled with GCC 3.4.3). Have you examined my original claim as to the cause of the bug? __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 10:21:55 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Jan 19 16:03:36 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> References: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> Message-ID: <42772693.8050306@egenix.com> David Rushby wrote: > --- "M.-A. Lemburg" wrote: > >>Ok, we've found the problem and fixed it. Here's the new >>release (which does build out of the box at least on our >>boxes ;-): >> >> > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip > > It does build now, but: > py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" > still behaves as it did when I submitted my original message: > Fatal Python error: UNREF invalid object > Aborted > > This is the same debug build of Python 2.4.1 that I was previously > using, running the same configuration (CentOS Linux 4.0/i386, > everything compiled with GCC 3.4.3). > > Have you examined my original claim as to the cause of the bug? No. We haven't had time for looking into it. I'm not sure whether your analysis of the problem is correct: if you don't define WANT_SUBCLASSABLE_TYPES, the API mxDateTime_Deallocate() is neither defined nor used. Furthermore, PyObject_Del() is only called by mxDateTime_Free() if you have explicitely edited mxDateTime.c to disabled the free list #defines. In a standard build, PyObject_Del() is only called at module finalization time. Note that the reason we call mxDateTime_Free() in the constructor is that we don't want the destructor of the object to be called. Py_DECREF() would call the destructor (mxDateTime_Deallocate). It is possible that the debug code in Python complains about the refcount in the object not being 0 at the time the object is finalized (module finalization time), but I don't see any such checks in PyObject_Free() (which is what PyObject_Del() maps to). Again, all of this does not happen in regular non-debug Python builds. Please be aware that we don't support debug builds, so fixing the problem (if there is one - gcc has some serious optimization problems on some combinations of platform and version) will take a while. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 09:27:37 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Thu Jan 19 16:03:36 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 Message-ID: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Hi all- I am trying to build the mx-base package, v.2.0.6. This will be used with postgresql 7.3.9, psycopg 1.1.18, and Roundup 0.8.2. RHEL 3.0 Python 2.3 egenix-mx-base-2.0.6.tar.gz I performed a: /usr/local/bin/python2.3 setup.py install Everything looks proper with the exeception of this series of warning statements: ----------------- gcc -pthread -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fno-strict-aliasing -fPIC -Imx/BeeBase/mxBeeBase -I/usr/local/incl ude/python2.3 -I/usr/local/include -c mx/BeeBase/mxBeeBase/btr.c -o build/temp.linux-i686-2.3/mx/BeeBase/mxBeeBase/mxBeeBa se/mx/BeeBase/mxBeeBase/btr.o mx/BeeBase/mxBeeBase/btr.c: In function `dumpBuf': mx/BeeBase/mxBeeBase/btr.c:249: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:250: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:255: warning: unsigned int format, long unsigned int arg (arg 4) mx/BeeBase/mxBeeBase/btr.c:256: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c: In function `_validateTree': mx/BeeBase/mxBeeBase/btr.c:330: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:337: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:339: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:349: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:351: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 3) creating build/lib.linux-i686-2.3/mx/BeeBase creating build/lib.linux-i686-2.3/mx/BeeBase/mxBeeBase -------------- Would someone be kind enough to let me know whether these messages were expected, and if not, how I might resolve these? Thanks! DC __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 22:06:33 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Jan 19 16:03:36 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> References: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Message-ID: <4277CBB9.8020302@egenix.com> Dianne Chen wrote: > Hi all- > > I am trying to build the mx-base package, v.2.0.6. > This will be used with postgresql 7.3.9, psycopg > 1.1.18, and Roundup 0.8.2. > > RHEL 3.0 > Python 2.3 > egenix-mx-base-2.0.6.tar.gz > > I performed a: > > /usr/local/bin/python2.3 setup.py install > > Everything looks proper with the exeception of this > series of warning statements: > > ----------------- > ... > -------------- > > Would someone be kind enough to let me know whether > these messages were expected, and if not, how I might > resolve these? These warning can safely be ignored. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 13:41:14 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Thu Jan 19 16:03:36 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: 6667 Message-ID: <20050503194114.72091.qmail@web31414.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Dianne Chen wrote: > > Hi all- > > > > I am trying to build the mx-base package, v.2.0.6. > > This will be used with postgresql 7.3.9, psycopg > > 1.1.18, and Roundup 0.8.2. > > > > RHEL 3.0 > > Python 2.3 > > egenix-mx-base-2.0.6.tar.gz > > > > I performed a: > > > > /usr/local/bin/python2.3 setup.py install > > > > Everything looks proper with the exeception of > this > > series of warning statements: > > > > ----------------- > > ... > > -------------- > > > > Would someone be kind enough to let me know > whether > > these messages were expected, and if not, how I > might > > resolve these? > > These warning can safely be ignored. > > -- > Marc-Andre Lemburg > eGenix.com > Marc- Thank you very much for the reply. It helps greatly. With kind regards, DC __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From davidrushby at yahoo.com Tue May 3 17:18:46 2005 From: davidrushby at yahoo.com (David Rushby) Date: Thu Jan 19 16:03:37 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050503231846.35012.qmail@web30009.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > I'm not sure whether your analysis of the problem is correct... Indeed, my original analysis wasn't correct; I think this one is. The fatal error I'm complaining about only arises if the arguments to DateTime.DateTime are invalid, so that the object is deallocated in the onError block of mxDateTime_FromDateAndTime. If the object is created successfully, and later deallocated by Python's garbage collector, the fatal error doesn't arise. Here's my analysis of the problem: --- If the debugging directive Py_TRACE_REFS is enabled, as it is in my case, the Python interpreter maintains a doubly linked list of all Python objects (named refchain) via the _ob_next and _ob_prev pointers added to PyObject via _PyObject_HEAD_EXTRA. Each object is inserted into refchain by the _Py_AddToAllObjects call in _Py_NewReference, and removed from refchain by the _Py_ForgetReference call in _Py_Dealloc. _Py_ForgetReference performs an integrity check on the object being deallocated (op) to make sure that its neighbors in refchain recognize it. Specifically, _Py_ForgetReference verifies that the _ob_next pointer of the previous object in refchain (op->_ob_prev->_ob_next) points to op, and that the _ob_prev pointer of the next object in refchain (op->_ob_next->_ob_prev) points to op. If either of those conditions is false, the interpreter raises the fatal error I'm seeing. After mxDateTime_New pulls an mxDateTimeObject out of the free list, it calls _Py_NewReference on that object to transform it from a "conceptually deallocated" object to a "conceptually allocated" one. _Py_NewReference inserts the object into refchain. Later, when the object is being "conceptually deallocated", it should be removed from refchain with _Py_ForgetReference. The version of _Py_Dealloc that's active when Py_TRACE_REFS is enabled does this (_Py_Dealloc is the element of Py_DECREF that performs the actual destruction). _Py_Dealloc first calls _Py_ForgetReference to remove the object from refchain, then calls the object's destructor (op->ob_type->tp_dealloc). If WANT_SUBCLASSABLE_TYPES is not defined (it is not in my case), the destructor for mxDateTime_Type is mxDateTime_Free. So, if a DateTime object is deallocated normally, as a result of its reference count falling to zero, _Py_Dealloc is called on the object, which first removes it from refchain, then passes it to mxDateTime_Free. If a DateTime object is destroyed prematurely, as a result of invalid arguments to its destructor, the onError handler calls mxDateTime_Free, so the object is "conceptually deallocated" (placed in the free list), *but* the object is not removed from refchain. So if a refchain-membership-integrity-check is performed on the object in question or one of its immediate neighbors in refchain, that integrity check fails, leading to the fatal error. --- The solution is to 'Py_DECREF(...)' the object in the onError handler of its constructor, instead of passing the object directly to mxDateTime_Free. That change solves two problems: 1) It causes _Py_Dealloc to execute, which in turn executes _Py_ForgetReference, so the object is removed from refchain, as it should be. 2) At present, objects that are created successfully and later deallocated by normal reference count mechanics have a reference count of 0 when they enter the free list, whereas objects whose constructors abort their creation due to invalid arguments have a reference count of 1 when they enter the free list. Although AFAIK this doesn't cause an actual execution problem (because the object's reference count is *explicitly set to 1* rather than *incremented by 1* when the object is later "conceptually allocated" by _Py_NewReference), it is likely to confuse future maintainers and thereby lead to the introduction of an actual execution problem. I assume that if you agree that this is a reasonable solution, you'll want to apply the change not only to mxDateTime_FromDateAndTime, but to all similar constructors in mxDateTime.c. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From rj at maxxian.com Thu May 5 01:57:40 2005 From: rj at maxxian.com (RJ Juneau) Date: Thu Jan 19 16:03:37 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c5512e$f72798c0$6505a8c0@rjlaptop> I'm on the 30 day evaluation for mxodbc_zope_da. I'm getting the following error when I submit some queries: Error Type: KeyError Error Value: 'query' I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 with UCS4. The error seems to be caused by multiple rows being returned. I did see an earlier posting with the same error message. The response suggested a template error, but this is clearly not the case here. The additional evidence I've gathered so far: - I'm running the test directly from the ZSQL method, so there's no template involved. - If I use the same query with an additional "where" clause to ensure that only one row is returned, it works - If I use a value in the 'where' clause with no rows returned, it works - The same ZSQL query is being used on a Windows machine running Zope and the free ZODBC module without a problem - The query has been verified directly in mysql-client-browser Other info: - The database is MySQL 4.1.10A-0 - iODBC is the DB driver RJ Juneau -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050505/68d278bf/attachment-0027.htm From mal at egenix.com Thu May 5 12:37:43 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Jan 19 16:03:37 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c5512e$f72798c0$6505a8c0@rjlaptop> References: <000301c5512e$f72798c0$6505a8c0@rjlaptop> Message-ID: <4279E967.6010904@egenix.com> RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 > with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 09:37:42 2005 From: rj at maxxian.com (RJ Juneau) Date: Thu Jan 19 16:03:37 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000101c5516f$3b96de90$6505a8c0@rjlaptop> More interesting info on the problem: If I execute the query directly in the "test" window of the base eGenix mxODBC Database Connection window, it works fine and returns the 20 lines expected. That could point to a problem in the rendering, which seems to be where the traceback ends. Note that within the same Zope system I also have an ODBC connection to a Sybase database, and I have successfully tested multi-line ZSQL queries there. This is the traceback: Time 2005/05/05 07:55:15.294 GMT-4 Exception Type KeyError Exception Value 'query' Traceback (innermost last): Module ZPublisher.Publish, line 101, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 39, in call_object Module Shared.DC.ZRDB.DA, line 337, in manage_test Module DocumentTemplate.DT_String, line 474, in __call__ Module DocumentTemplate.DT_In, line 602, in renderwb Module DocumentTemplate.DT_Var, line 219, in render KeyError: 'query' I don't think the following is an issue, but I'll include it for completeness.I am also getting the following iODBC warnings and errors in the Zope console log, which are related to the ODBC parameters being passed by iODBC. Note that these errors also appear for all of the successful queries. [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (Setup). [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (UsageCount). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Timeout). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Reuse). As for the ZSQL snippet from the template... Since there's no template involved yet (I'm still testing directly from the ZSQL method), I assume you mean the SQL code? select h.host_name, s.system_name, s.system_handle, count(*) from terminal t, system_map s, host h where t.system_index = s.system_index and s.host_index = h.host_index group by s.system_name order by h.host_name Nothing complicated here. There are no parameters passed to the query. RJ -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: May 5, 2005 5:38 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: Re: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is > 2.3.4 with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ---------------------------------------------------------------------- > -- > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 16:00:32 2005 From: charlie at egenix.com (Charlie Clark) Date: Thu Jan 19 16:03:37 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000101c5516f$3b96de90$6505a8c0@rjlaptop> References: <000101c5516f$3b96de90$6505a8c0@rjlaptop> Message-ID: <20050505150032.644.1@bepc.1115296715.fake> On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base eGenix > mxODBC Database Connection window, it works fine and returns the 20 > lines expected. That could point to a problem in the rendering, which > seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection to > a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 10:22:17 2005 From: rj at maxxian.com (RJ Juneau) Date: Thu Jan 19 16:03:37 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505150032.644.1@bepc.1115296715.fake> Message-ID: <000201c55175$75bcad10$6505a8c0@rjlaptop> At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 11:47:14 2005 From: rj at maxxian.com (RJ Juneau) Date: Thu Jan 19 16:03:37 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c55181$549be0e0$6505a8c0@rjlaptop> Charlie, I found a fix. Here it is in case anyone else runs into this. You were correct - the problem is in another part of Zope. Based on your feedback, I did a bit more searching and found something here: http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. html The problem appears to be in Zope versions after 2.7.0. I'm running 2.7.6, and the post indicates that it also happens in 2.7.4. The solution: Edit file /lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. There are two lines in the file that start with . Edit them as follows: Change first line to: Change second line to: Just to be after, I shut down Zope before I made the changes and restarted it after. Thanks for the help! RJ -----Original Message----- From: RJ Juneau [mailto:rj@maxxian.com] Sent: May 5, 2005 9:22 AM To: 'Charlie Clark' Cc: 'egenix-users@lists.egenix.com' Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 17:57:25 2005 From: charlie at egenix.com (Charlie Clark) Date: Thu Jan 19 16:03:37 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <20050505165725.3380.2@bepc.1115296715.fake> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Thu May 5 09:15:21 2005 From: charlie at egenix.com (Charlie Clark) Date: Thu Jan 19 16:03:38 2006 Subject: [Zope-DB] RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <000001c55185$41477730$6b00a8c0@fonacier.local> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________ Zope-DB mailing list Zope-DB@zope.org http://mail.zope.org/mailman/listinfo/zope-db From rj at maxxian.com Thu May 5 12:38:00 2005 From: rj at maxxian.com (RJ Juneau) Date: Thu Jan 19 16:03:38 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000001c55188$6b841eb0$6505a8c0@rjlaptop> I just double-checked. Zope-2.7.6-final. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 12:49:16 2005 From: rj at maxxian.com (RJ Juneau) Date: Thu Jan 19 16:03:38 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000501c55189$fe149ba0$6505a8c0@rjlaptop> Charlie, The fix has only been applied for 2.7.7, 2.8b2. The info is in the original bug report which is closed and can be found here: http://www.zope.org/Collectors/Zope/1745 RJ -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Fri May 6 11:50:09 2005 From: rj at maxxian.com (RJ Juneau) Date: Thu Jan 19 16:03:38 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC Message-ID: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Still on eval for the product. I cannot get a stable connection to Sybase via the iODBC drivers. - The Sybase ODBC connection - including a query - have been verified at the iODBC level. - The setup is already working well for ODBC connection to MySQL. Symptoms include: - If I click on "Open Connection", it still comes back with "Connection Closed" when I go to a ZSQL method - Using 'Connect on Demand' is not working either. - Clicking "Open Connection" gives me the following error: Connection string: DSN=lixbox_sybase; UID=sa; PWD=XXXXXXX Connection pool entry: 0 Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection rejected by data source', 7952) The odbc.ini definition for DSN "lixbox_sybase" is as follows: [lixbox_sybase] JetFix = No NoRowSetSizeLimit = No Description = Test connection to listbox Options = LIXBOX DSQUERY = SQLSERVER TDSHOST = lixbox TDSPORT = 5000 TDSVER = 5.0 SQLSERVER_CATALOG = N CURSOR_SENSITIVITY = LOW UserName = sa Password = XXXXXXXX ServerType = Sybase 10/11/12 Driver = /opt/openlink/lib/sql_mt_lt.so Database = pubs2 ReadOnly = no NoAutoCommit = No NoLoginBox = No FetchBufferSize = 60 Other relevant data: - Connecting via OpenLink's iODBC - Zope 2.7.6-final - Python 2.3.4 - Connection to Sybase has been successfully tested with iODBC, including issuing a query - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC connection RJ Juneau Chief Technology Officer Maxxian Integration Inc. 155 Westhampton Drive Thornhill, Ontario Canada L4J 7X2 E-mail: rj@maxxian.com Phone: +1 905 482 9429 Cell: +1 416 897 6682 Toll free: +1 866 758 9161 Fax: +1 647 722 2038 -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050506/aef33361/attachment-0027.htm From mal at egenix.com Fri May 6 18:27:37 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Jan 19 16:03:38 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC In-Reply-To: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> References: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Message-ID: <427B8CE9.1010601@egenix.com> RJ Juneau wrote: > Still on eval for the product. > > I cannot get a stable connection to Sybase via the iODBC drivers. > > - The Sybase ODBC connection - including a query - have been verified at > the iODBC level. > - The setup is already working well for ODBC connection to MySQL. > > Symptoms include: > > - If I click on "Open Connection", it still comes back with "Connection > Closed" when I go to a ZSQL method > - Using 'Connect on Demand' is not working either. > - Clicking "Open Connection" gives me the following error: > > Connection string: DSN=lixbox_sybase; > UID=sa; > PWD=XXXXXXX Try writing the connection string on one line and without whitespace. ODBC drivers sometimes have problems with this. > Connection pool entry: 0 > Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection > rejected by data source', 7952) This is a generic error that relates to authentication or firewall problems. It is possible that turning on ODBC tracing the ODBC manager will give more clues as to the real cause of the problem. > The odbc.ini definition for DSN "lixbox_sybase" is as follows: > > [lixbox_sybase] > JetFix = No > NoRowSetSizeLimit = No > Description = Test connection to listbox > Options = LIXBOX > DSQUERY = SQLSERVER > TDSHOST = lixbox > TDSPORT = 5000 > TDSVER = 5.0 > SQLSERVER_CATALOG = N > CURSOR_SENSITIVITY = LOW > UserName = sa > Password = XXXXXXXX > ServerType = Sybase 10/11/12 > Driver = /opt/openlink/lib/sql_mt_lt.so > Database = pubs2 > ReadOnly = no > NoAutoCommit = No > NoLoginBox = No > FetchBufferSize = 60 > > > Other relevant data: > - Connecting via OpenLink's iODBC > - Zope 2.7.6-final > - Python 2.3.4 > - Connection to Sybase has been successfully tested with iODBC, > including issuing a query > - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC > connection > > > > RJ Juneau > Chief Technology Officer > Maxxian Integration Inc. > 155 Westhampton Drive > Thornhill, Ontario > Canada L4J 7X2 > E-mail: rj@maxxian.com > Phone: +1 905 482 9429 > Cell: +1 416 897 6682 > Toll free: +1 866 758 9161 > Fax: +1 647 722 2038 > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 06 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From calisp at gmail.com Sun May 15 23:49:03 2005 From: calisp at gmail.com (calisp@gmail.com) Date: Thu Jan 19 16:03:38 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK Message-ID: Hi, I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the following error... 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the last phase of a two-phase commit. This shouldn't happen. Traceback (most recent call last): File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one jar.tpc_finish(self) File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish try: self._finish() File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could not perform COMMIT or ROLLBACK', 1023) What could be causing this? Can I get the mxODBCZopeDA source from somewhere? It would make debugging this much easier. Thanks, Calisp. From mal at egenix.com Mon May 16 13:52:12 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Jan 19 16:03:38 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK In-Reply-To: References: Message-ID: <42887B5C.4010109@egenix.com> calisp@gmail.com wrote: > Hi, > > I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with > unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the > following error... > > 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the > last phase of a two-phase commit. This shouldn't happen. > Traceback (most recent call last): > File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one > jar.tpc_finish(self) > File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish > try: self._finish() > File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish > File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler > ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could > not perform COMMIT or ROLLBACK', 1023) You should have a look at the database logs to see what prevented the commit from being completed. > What could be causing this? Hard to say: mxODBCZopeDA is trying to commit the transaction, but the driver or database failed to complete the request. The above error was generated by the ODBC driver. This could be network or DNS problems, or be related to a bug in FreeTDS (which is getting more stable with every new release, but should still be considered beta quality software at the moment). > Can I get the mxODBCZopeDA source from > somewhere? It would make debugging this much easier. Getting the source is not an option and won't help much either since the source of the problem is not mxODBCZopeDA. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 16 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Sun May 1 21:29:25 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Jan 19 20:00:56 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <427259F3.4090806@egenix.com> References: <20050427130906.52878.qmail@web30008.mail.mud.yahoo.com> <427259F3.4090806@egenix.com> Message-ID: <42752005.7080904@egenix.com> M.-A. Lemburg wrote: > David Rushby wrote: > >> --- "M.-A. Lemburg" wrote: >> >>> Are you using the standard mxDateTime build or one >>> with WANT_SUBCLASSABLE_TYPES defined... >> >> >> >> Presumably "the standard", since I just built with 'py24d setup.py >> build', making no attempt to enable special directives. >> >> >>> ... (mxDateTime_Deallocate is only used by the latter)? >> >> >> >> That's true in 2.1.0-2005-04-15, but not in 2.1.0b5. >> >> >>> In any case, please try our latest snapshot: >>> >>> >> >> http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-04-15.zip >> >>> to see if that makes any difference. >> >> >> >> I can't build it out of the box: > > > Hmm, looks like distutils' sdist command doesn't like our new > repository layout which uses symlinks (after we've switched to > subversion). > > We'll have to debug distutils first, I guess :-( Ok, we've found the problem and fixed it. Here's the new release (which does build out of the box at least on our boxes ;-): http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 01 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From davidrushby at yahoo.com Mon May 2 15:49:53 2005 From: davidrushby at yahoo.com (David Rushby) Date: Thu Jan 19 20:00:57 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Ok, we've found the problem and fixed it. Here's the new > release (which does build out of the box at least on our > boxes ;-): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip It does build now, but: py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" still behaves as it did when I submitted my original message: Fatal Python error: UNREF invalid object Aborted This is the same debug build of Python 2.4.1 that I was previously using, running the same configuration (CentOS Linux 4.0/i386, everything compiled with GCC 3.4.3). Have you examined my original claim as to the cause of the bug? __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 10:21:55 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Jan 19 20:00:57 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> References: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> Message-ID: <42772693.8050306@egenix.com> David Rushby wrote: > --- "M.-A. Lemburg" wrote: > >>Ok, we've found the problem and fixed it. Here's the new >>release (which does build out of the box at least on our >>boxes ;-): >> >> > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip > > It does build now, but: > py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" > still behaves as it did when I submitted my original message: > Fatal Python error: UNREF invalid object > Aborted > > This is the same debug build of Python 2.4.1 that I was previously > using, running the same configuration (CentOS Linux 4.0/i386, > everything compiled with GCC 3.4.3). > > Have you examined my original claim as to the cause of the bug? No. We haven't had time for looking into it. I'm not sure whether your analysis of the problem is correct: if you don't define WANT_SUBCLASSABLE_TYPES, the API mxDateTime_Deallocate() is neither defined nor used. Furthermore, PyObject_Del() is only called by mxDateTime_Free() if you have explicitely edited mxDateTime.c to disabled the free list #defines. In a standard build, PyObject_Del() is only called at module finalization time. Note that the reason we call mxDateTime_Free() in the constructor is that we don't want the destructor of the object to be called. Py_DECREF() would call the destructor (mxDateTime_Deallocate). It is possible that the debug code in Python complains about the refcount in the object not being 0 at the time the object is finalized (module finalization time), but I don't see any such checks in PyObject_Free() (which is what PyObject_Del() maps to). Again, all of this does not happen in regular non-debug Python builds. Please be aware that we don't support debug builds, so fixing the problem (if there is one - gcc has some serious optimization problems on some combinations of platform and version) will take a while. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 09:27:37 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Thu Jan 19 20:00:57 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 Message-ID: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Hi all- I am trying to build the mx-base package, v.2.0.6. This will be used with postgresql 7.3.9, psycopg 1.1.18, and Roundup 0.8.2. RHEL 3.0 Python 2.3 egenix-mx-base-2.0.6.tar.gz I performed a: /usr/local/bin/python2.3 setup.py install Everything looks proper with the exeception of this series of warning statements: ----------------- gcc -pthread -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fno-strict-aliasing -fPIC -Imx/BeeBase/mxBeeBase -I/usr/local/incl ude/python2.3 -I/usr/local/include -c mx/BeeBase/mxBeeBase/btr.c -o build/temp.linux-i686-2.3/mx/BeeBase/mxBeeBase/mxBeeBa se/mx/BeeBase/mxBeeBase/btr.o mx/BeeBase/mxBeeBase/btr.c: In function `dumpBuf': mx/BeeBase/mxBeeBase/btr.c:249: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:250: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:255: warning: unsigned int format, long unsigned int arg (arg 4) mx/BeeBase/mxBeeBase/btr.c:256: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c: In function `_validateTree': mx/BeeBase/mxBeeBase/btr.c:330: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:337: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:339: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:349: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:351: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 3) creating build/lib.linux-i686-2.3/mx/BeeBase creating build/lib.linux-i686-2.3/mx/BeeBase/mxBeeBase -------------- Would someone be kind enough to let me know whether these messages were expected, and if not, how I might resolve these? Thanks! DC __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 22:06:33 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Jan 19 20:00:57 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> References: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Message-ID: <4277CBB9.8020302@egenix.com> Dianne Chen wrote: > Hi all- > > I am trying to build the mx-base package, v.2.0.6. > This will be used with postgresql 7.3.9, psycopg > 1.1.18, and Roundup 0.8.2. > > RHEL 3.0 > Python 2.3 > egenix-mx-base-2.0.6.tar.gz > > I performed a: > > /usr/local/bin/python2.3 setup.py install > > Everything looks proper with the exeception of this > series of warning statements: > > ----------------- > ... > -------------- > > Would someone be kind enough to let me know whether > these messages were expected, and if not, how I might > resolve these? These warning can safely be ignored. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 13:41:14 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Thu Jan 19 20:00:57 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: 6667 Message-ID: <20050503194114.72091.qmail@web31414.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Dianne Chen wrote: > > Hi all- > > > > I am trying to build the mx-base package, v.2.0.6. > > This will be used with postgresql 7.3.9, psycopg > > 1.1.18, and Roundup 0.8.2. > > > > RHEL 3.0 > > Python 2.3 > > egenix-mx-base-2.0.6.tar.gz > > > > I performed a: > > > > /usr/local/bin/python2.3 setup.py install > > > > Everything looks proper with the exeception of > this > > series of warning statements: > > > > ----------------- > > ... > > -------------- > > > > Would someone be kind enough to let me know > whether > > these messages were expected, and if not, how I > might > > resolve these? > > These warning can safely be ignored. > > -- > Marc-Andre Lemburg > eGenix.com > Marc- Thank you very much for the reply. It helps greatly. With kind regards, DC __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From davidrushby at yahoo.com Tue May 3 17:18:46 2005 From: davidrushby at yahoo.com (David Rushby) Date: Thu Jan 19 20:00:57 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050503231846.35012.qmail@web30009.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > I'm not sure whether your analysis of the problem is correct... Indeed, my original analysis wasn't correct; I think this one is. The fatal error I'm complaining about only arises if the arguments to DateTime.DateTime are invalid, so that the object is deallocated in the onError block of mxDateTime_FromDateAndTime. If the object is created successfully, and later deallocated by Python's garbage collector, the fatal error doesn't arise. Here's my analysis of the problem: --- If the debugging directive Py_TRACE_REFS is enabled, as it is in my case, the Python interpreter maintains a doubly linked list of all Python objects (named refchain) via the _ob_next and _ob_prev pointers added to PyObject via _PyObject_HEAD_EXTRA. Each object is inserted into refchain by the _Py_AddToAllObjects call in _Py_NewReference, and removed from refchain by the _Py_ForgetReference call in _Py_Dealloc. _Py_ForgetReference performs an integrity check on the object being deallocated (op) to make sure that its neighbors in refchain recognize it. Specifically, _Py_ForgetReference verifies that the _ob_next pointer of the previous object in refchain (op->_ob_prev->_ob_next) points to op, and that the _ob_prev pointer of the next object in refchain (op->_ob_next->_ob_prev) points to op. If either of those conditions is false, the interpreter raises the fatal error I'm seeing. After mxDateTime_New pulls an mxDateTimeObject out of the free list, it calls _Py_NewReference on that object to transform it from a "conceptually deallocated" object to a "conceptually allocated" one. _Py_NewReference inserts the object into refchain. Later, when the object is being "conceptually deallocated", it should be removed from refchain with _Py_ForgetReference. The version of _Py_Dealloc that's active when Py_TRACE_REFS is enabled does this (_Py_Dealloc is the element of Py_DECREF that performs the actual destruction). _Py_Dealloc first calls _Py_ForgetReference to remove the object from refchain, then calls the object's destructor (op->ob_type->tp_dealloc). If WANT_SUBCLASSABLE_TYPES is not defined (it is not in my case), the destructor for mxDateTime_Type is mxDateTime_Free. So, if a DateTime object is deallocated normally, as a result of its reference count falling to zero, _Py_Dealloc is called on the object, which first removes it from refchain, then passes it to mxDateTime_Free. If a DateTime object is destroyed prematurely, as a result of invalid arguments to its destructor, the onError handler calls mxDateTime_Free, so the object is "conceptually deallocated" (placed in the free list), *but* the object is not removed from refchain. So if a refchain-membership-integrity-check is performed on the object in question or one of its immediate neighbors in refchain, that integrity check fails, leading to the fatal error. --- The solution is to 'Py_DECREF(...)' the object in the onError handler of its constructor, instead of passing the object directly to mxDateTime_Free. That change solves two problems: 1) It causes _Py_Dealloc to execute, which in turn executes _Py_ForgetReference, so the object is removed from refchain, as it should be. 2) At present, objects that are created successfully and later deallocated by normal reference count mechanics have a reference count of 0 when they enter the free list, whereas objects whose constructors abort their creation due to invalid arguments have a reference count of 1 when they enter the free list. Although AFAIK this doesn't cause an actual execution problem (because the object's reference count is *explicitly set to 1* rather than *incremented by 1* when the object is later "conceptually allocated" by _Py_NewReference), it is likely to confuse future maintainers and thereby lead to the introduction of an actual execution problem. I assume that if you agree that this is a reasonable solution, you'll want to apply the change not only to mxDateTime_FromDateAndTime, but to all similar constructors in mxDateTime.c. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From rj at maxxian.com Thu May 5 01:57:40 2005 From: rj at maxxian.com (RJ Juneau) Date: Thu Jan 19 20:00:57 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c5512e$f72798c0$6505a8c0@rjlaptop> I'm on the 30 day evaluation for mxodbc_zope_da. I'm getting the following error when I submit some queries: Error Type: KeyError Error Value: 'query' I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 with UCS4. The error seems to be caused by multiple rows being returned. I did see an earlier posting with the same error message. The response suggested a template error, but this is clearly not the case here. The additional evidence I've gathered so far: - I'm running the test directly from the ZSQL method, so there's no template involved. - If I use the same query with an additional "where" clause to ensure that only one row is returned, it works - If I use a value in the 'where' clause with no rows returned, it works - The same ZSQL query is being used on a Windows machine running Zope and the free ZODBC module without a problem - The query has been verified directly in mysql-client-browser Other info: - The database is MySQL 4.1.10A-0 - iODBC is the DB driver RJ Juneau -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050505/68d278bf/attachment-0028.htm From mal at egenix.com Thu May 5 12:37:43 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Jan 19 20:00:57 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c5512e$f72798c0$6505a8c0@rjlaptop> References: <000301c5512e$f72798c0$6505a8c0@rjlaptop> Message-ID: <4279E967.6010904@egenix.com> RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 > with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 09:37:42 2005 From: rj at maxxian.com (RJ Juneau) Date: Thu Jan 19 20:00:57 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000101c5516f$3b96de90$6505a8c0@rjlaptop> More interesting info on the problem: If I execute the query directly in the "test" window of the base eGenix mxODBC Database Connection window, it works fine and returns the 20 lines expected. That could point to a problem in the rendering, which seems to be where the traceback ends. Note that within the same Zope system I also have an ODBC connection to a Sybase database, and I have successfully tested multi-line ZSQL queries there. This is the traceback: Time 2005/05/05 07:55:15.294 GMT-4 Exception Type KeyError Exception Value 'query' Traceback (innermost last): Module ZPublisher.Publish, line 101, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 39, in call_object Module Shared.DC.ZRDB.DA, line 337, in manage_test Module DocumentTemplate.DT_String, line 474, in __call__ Module DocumentTemplate.DT_In, line 602, in renderwb Module DocumentTemplate.DT_Var, line 219, in render KeyError: 'query' I don't think the following is an issue, but I'll include it for completeness.I am also getting the following iODBC warnings and errors in the Zope console log, which are related to the ODBC parameters being passed by iODBC. Note that these errors also appear for all of the successful queries. [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (Setup). [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (UsageCount). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Timeout). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Reuse). As for the ZSQL snippet from the template... Since there's no template involved yet (I'm still testing directly from the ZSQL method), I assume you mean the SQL code? select h.host_name, s.system_name, s.system_handle, count(*) from terminal t, system_map s, host h where t.system_index = s.system_index and s.host_index = h.host_index group by s.system_name order by h.host_name Nothing complicated here. There are no parameters passed to the query. RJ -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: May 5, 2005 5:38 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: Re: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is > 2.3.4 with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ---------------------------------------------------------------------- > -- > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 16:00:32 2005 From: charlie at egenix.com (Charlie Clark) Date: Thu Jan 19 20:00:57 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000101c5516f$3b96de90$6505a8c0@rjlaptop> References: <000101c5516f$3b96de90$6505a8c0@rjlaptop> Message-ID: <20050505150032.644.1@bepc.1115296715.fake> On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base eGenix > mxODBC Database Connection window, it works fine and returns the 20 > lines expected. That could point to a problem in the rendering, which > seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection to > a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 10:22:17 2005 From: rj at maxxian.com (RJ Juneau) Date: Thu Jan 19 20:00:57 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505150032.644.1@bepc.1115296715.fake> Message-ID: <000201c55175$75bcad10$6505a8c0@rjlaptop> At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 11:47:14 2005 From: rj at maxxian.com (RJ Juneau) Date: Thu Jan 19 20:00:57 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c55181$549be0e0$6505a8c0@rjlaptop> Charlie, I found a fix. Here it is in case anyone else runs into this. You were correct - the problem is in another part of Zope. Based on your feedback, I did a bit more searching and found something here: http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. html The problem appears to be in Zope versions after 2.7.0. I'm running 2.7.6, and the post indicates that it also happens in 2.7.4. The solution: Edit file /lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. There are two lines in the file that start with . Edit them as follows: Change first line to: Change second line to: Just to be after, I shut down Zope before I made the changes and restarted it after. Thanks for the help! RJ -----Original Message----- From: RJ Juneau [mailto:rj@maxxian.com] Sent: May 5, 2005 9:22 AM To: 'Charlie Clark' Cc: 'egenix-users@lists.egenix.com' Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 17:57:25 2005 From: charlie at egenix.com (Charlie Clark) Date: Thu Jan 19 20:00:57 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <20050505165725.3380.2@bepc.1115296715.fake> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Thu May 5 09:15:21 2005 From: charlie at egenix.com (Charlie Clark) Date: Thu Jan 19 20:00:57 2006 Subject: [Zope-DB] RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <000001c55185$41477730$6b00a8c0@fonacier.local> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________ Zope-DB mailing list Zope-DB@zope.org http://mail.zope.org/mailman/listinfo/zope-db From rj at maxxian.com Thu May 5 12:38:00 2005 From: rj at maxxian.com (RJ Juneau) Date: Thu Jan 19 20:00:57 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000001c55188$6b841eb0$6505a8c0@rjlaptop> I just double-checked. Zope-2.7.6-final. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 12:49:16 2005 From: rj at maxxian.com (RJ Juneau) Date: Thu Jan 19 20:00:57 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000501c55189$fe149ba0$6505a8c0@rjlaptop> Charlie, The fix has only been applied for 2.7.7, 2.8b2. The info is in the original bug report which is closed and can be found here: http://www.zope.org/Collectors/Zope/1745 RJ -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Fri May 6 11:50:09 2005 From: rj at maxxian.com (RJ Juneau) Date: Thu Jan 19 20:00:57 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC Message-ID: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Still on eval for the product. I cannot get a stable connection to Sybase via the iODBC drivers. - The Sybase ODBC connection - including a query - have been verified at the iODBC level. - The setup is already working well for ODBC connection to MySQL. Symptoms include: - If I click on "Open Connection", it still comes back with "Connection Closed" when I go to a ZSQL method - Using 'Connect on Demand' is not working either. - Clicking "Open Connection" gives me the following error: Connection string: DSN=lixbox_sybase; UID=sa; PWD=XXXXXXX Connection pool entry: 0 Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection rejected by data source', 7952) The odbc.ini definition for DSN "lixbox_sybase" is as follows: [lixbox_sybase] JetFix = No NoRowSetSizeLimit = No Description = Test connection to listbox Options = LIXBOX DSQUERY = SQLSERVER TDSHOST = lixbox TDSPORT = 5000 TDSVER = 5.0 SQLSERVER_CATALOG = N CURSOR_SENSITIVITY = LOW UserName = sa Password = XXXXXXXX ServerType = Sybase 10/11/12 Driver = /opt/openlink/lib/sql_mt_lt.so Database = pubs2 ReadOnly = no NoAutoCommit = No NoLoginBox = No FetchBufferSize = 60 Other relevant data: - Connecting via OpenLink's iODBC - Zope 2.7.6-final - Python 2.3.4 - Connection to Sybase has been successfully tested with iODBC, including issuing a query - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC connection RJ Juneau Chief Technology Officer Maxxian Integration Inc. 155 Westhampton Drive Thornhill, Ontario Canada L4J 7X2 E-mail: rj@maxxian.com Phone: +1 905 482 9429 Cell: +1 416 897 6682 Toll free: +1 866 758 9161 Fax: +1 647 722 2038 -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050506/aef33361/attachment-0028.htm From mal at egenix.com Fri May 6 18:27:37 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Jan 19 20:00:57 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC In-Reply-To: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> References: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Message-ID: <427B8CE9.1010601@egenix.com> RJ Juneau wrote: > Still on eval for the product. > > I cannot get a stable connection to Sybase via the iODBC drivers. > > - The Sybase ODBC connection - including a query - have been verified at > the iODBC level. > - The setup is already working well for ODBC connection to MySQL. > > Symptoms include: > > - If I click on "Open Connection", it still comes back with "Connection > Closed" when I go to a ZSQL method > - Using 'Connect on Demand' is not working either. > - Clicking "Open Connection" gives me the following error: > > Connection string: DSN=lixbox_sybase; > UID=sa; > PWD=XXXXXXX Try writing the connection string on one line and without whitespace. ODBC drivers sometimes have problems with this. > Connection pool entry: 0 > Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection > rejected by data source', 7952) This is a generic error that relates to authentication or firewall problems. It is possible that turning on ODBC tracing the ODBC manager will give more clues as to the real cause of the problem. > The odbc.ini definition for DSN "lixbox_sybase" is as follows: > > [lixbox_sybase] > JetFix = No > NoRowSetSizeLimit = No > Description = Test connection to listbox > Options = LIXBOX > DSQUERY = SQLSERVER > TDSHOST = lixbox > TDSPORT = 5000 > TDSVER = 5.0 > SQLSERVER_CATALOG = N > CURSOR_SENSITIVITY = LOW > UserName = sa > Password = XXXXXXXX > ServerType = Sybase 10/11/12 > Driver = /opt/openlink/lib/sql_mt_lt.so > Database = pubs2 > ReadOnly = no > NoAutoCommit = No > NoLoginBox = No > FetchBufferSize = 60 > > > Other relevant data: > - Connecting via OpenLink's iODBC > - Zope 2.7.6-final > - Python 2.3.4 > - Connection to Sybase has been successfully tested with iODBC, > including issuing a query > - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC > connection > > > > RJ Juneau > Chief Technology Officer > Maxxian Integration Inc. > 155 Westhampton Drive > Thornhill, Ontario > Canada L4J 7X2 > E-mail: rj@maxxian.com > Phone: +1 905 482 9429 > Cell: +1 416 897 6682 > Toll free: +1 866 758 9161 > Fax: +1 647 722 2038 > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 06 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From calisp at gmail.com Sun May 15 23:49:03 2005 From: calisp at gmail.com (calisp@gmail.com) Date: Thu Jan 19 20:00:57 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK Message-ID: Hi, I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the following error... 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the last phase of a two-phase commit. This shouldn't happen. Traceback (most recent call last): File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one jar.tpc_finish(self) File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish try: self._finish() File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could not perform COMMIT or ROLLBACK', 1023) What could be causing this? Can I get the mxODBCZopeDA source from somewhere? It would make debugging this much easier. Thanks, Calisp. From mal at egenix.com Mon May 16 13:52:12 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Jan 19 20:00:57 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK In-Reply-To: References: Message-ID: <42887B5C.4010109@egenix.com> calisp@gmail.com wrote: > Hi, > > I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with > unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the > following error... > > 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the > last phase of a two-phase commit. This shouldn't happen. > Traceback (most recent call last): > File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one > jar.tpc_finish(self) > File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish > try: self._finish() > File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish > File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler > ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could > not perform COMMIT or ROLLBACK', 1023) You should have a look at the database logs to see what prevented the commit from being completed. > What could be causing this? Hard to say: mxODBCZopeDA is trying to commit the transaction, but the driver or database failed to complete the request. The above error was generated by the ODBC driver. This could be network or DNS problems, or be related to a bug in FreeTDS (which is getting more stable with every new release, but should still be considered beta quality software at the moment). > Can I get the mxODBCZopeDA source from > somewhere? It would make debugging this much easier. Getting the source is not an option and won't help much either since the source of the problem is not mxODBCZopeDA. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 16 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Sun May 1 21:29:25 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 20 08:07:53 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <427259F3.4090806@egenix.com> References: <20050427130906.52878.qmail@web30008.mail.mud.yahoo.com> <427259F3.4090806@egenix.com> Message-ID: <42752005.7080904@egenix.com> M.-A. Lemburg wrote: > David Rushby wrote: > >> --- "M.-A. Lemburg" wrote: >> >>> Are you using the standard mxDateTime build or one >>> with WANT_SUBCLASSABLE_TYPES defined... >> >> >> >> Presumably "the standard", since I just built with 'py24d setup.py >> build', making no attempt to enable special directives. >> >> >>> ... (mxDateTime_Deallocate is only used by the latter)? >> >> >> >> That's true in 2.1.0-2005-04-15, but not in 2.1.0b5. >> >> >>> In any case, please try our latest snapshot: >>> >>> >> >> http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-04-15.zip >> >>> to see if that makes any difference. >> >> >> >> I can't build it out of the box: > > > Hmm, looks like distutils' sdist command doesn't like our new > repository layout which uses symlinks (after we've switched to > subversion). > > We'll have to debug distutils first, I guess :-( Ok, we've found the problem and fixed it. Here's the new release (which does build out of the box at least on our boxes ;-): http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 01 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From davidrushby at yahoo.com Mon May 2 15:49:53 2005 From: davidrushby at yahoo.com (David Rushby) Date: Fri Jan 20 08:07:53 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Ok, we've found the problem and fixed it. Here's the new > release (which does build out of the box at least on our > boxes ;-): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip It does build now, but: py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" still behaves as it did when I submitted my original message: Fatal Python error: UNREF invalid object Aborted This is the same debug build of Python 2.4.1 that I was previously using, running the same configuration (CentOS Linux 4.0/i386, everything compiled with GCC 3.4.3). Have you examined my original claim as to the cause of the bug? __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 10:21:55 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 20 08:07:53 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> References: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> Message-ID: <42772693.8050306@egenix.com> David Rushby wrote: > --- "M.-A. Lemburg" wrote: > >>Ok, we've found the problem and fixed it. Here's the new >>release (which does build out of the box at least on our >>boxes ;-): >> >> > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip > > It does build now, but: > py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" > still behaves as it did when I submitted my original message: > Fatal Python error: UNREF invalid object > Aborted > > This is the same debug build of Python 2.4.1 that I was previously > using, running the same configuration (CentOS Linux 4.0/i386, > everything compiled with GCC 3.4.3). > > Have you examined my original claim as to the cause of the bug? No. We haven't had time for looking into it. I'm not sure whether your analysis of the problem is correct: if you don't define WANT_SUBCLASSABLE_TYPES, the API mxDateTime_Deallocate() is neither defined nor used. Furthermore, PyObject_Del() is only called by mxDateTime_Free() if you have explicitely edited mxDateTime.c to disabled the free list #defines. In a standard build, PyObject_Del() is only called at module finalization time. Note that the reason we call mxDateTime_Free() in the constructor is that we don't want the destructor of the object to be called. Py_DECREF() would call the destructor (mxDateTime_Deallocate). It is possible that the debug code in Python complains about the refcount in the object not being 0 at the time the object is finalized (module finalization time), but I don't see any such checks in PyObject_Free() (which is what PyObject_Del() maps to). Again, all of this does not happen in regular non-debug Python builds. Please be aware that we don't support debug builds, so fixing the problem (if there is one - gcc has some serious optimization problems on some combinations of platform and version) will take a while. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 09:27:37 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Fri Jan 20 08:07:53 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 Message-ID: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Hi all- I am trying to build the mx-base package, v.2.0.6. This will be used with postgresql 7.3.9, psycopg 1.1.18, and Roundup 0.8.2. RHEL 3.0 Python 2.3 egenix-mx-base-2.0.6.tar.gz I performed a: /usr/local/bin/python2.3 setup.py install Everything looks proper with the exeception of this series of warning statements: ----------------- gcc -pthread -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fno-strict-aliasing -fPIC -Imx/BeeBase/mxBeeBase -I/usr/local/incl ude/python2.3 -I/usr/local/include -c mx/BeeBase/mxBeeBase/btr.c -o build/temp.linux-i686-2.3/mx/BeeBase/mxBeeBase/mxBeeBa se/mx/BeeBase/mxBeeBase/btr.o mx/BeeBase/mxBeeBase/btr.c: In function `dumpBuf': mx/BeeBase/mxBeeBase/btr.c:249: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:250: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:255: warning: unsigned int format, long unsigned int arg (arg 4) mx/BeeBase/mxBeeBase/btr.c:256: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c: In function `_validateTree': mx/BeeBase/mxBeeBase/btr.c:330: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:337: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:339: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:349: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:351: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 3) creating build/lib.linux-i686-2.3/mx/BeeBase creating build/lib.linux-i686-2.3/mx/BeeBase/mxBeeBase -------------- Would someone be kind enough to let me know whether these messages were expected, and if not, how I might resolve these? Thanks! DC __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 22:06:33 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 20 08:07:53 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> References: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Message-ID: <4277CBB9.8020302@egenix.com> Dianne Chen wrote: > Hi all- > > I am trying to build the mx-base package, v.2.0.6. > This will be used with postgresql 7.3.9, psycopg > 1.1.18, and Roundup 0.8.2. > > RHEL 3.0 > Python 2.3 > egenix-mx-base-2.0.6.tar.gz > > I performed a: > > /usr/local/bin/python2.3 setup.py install > > Everything looks proper with the exeception of this > series of warning statements: > > ----------------- > ... > -------------- > > Would someone be kind enough to let me know whether > these messages were expected, and if not, how I might > resolve these? These warning can safely be ignored. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 13:41:14 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Fri Jan 20 08:07:53 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: 6667 Message-ID: <20050503194114.72091.qmail@web31414.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Dianne Chen wrote: > > Hi all- > > > > I am trying to build the mx-base package, v.2.0.6. > > This will be used with postgresql 7.3.9, psycopg > > 1.1.18, and Roundup 0.8.2. > > > > RHEL 3.0 > > Python 2.3 > > egenix-mx-base-2.0.6.tar.gz > > > > I performed a: > > > > /usr/local/bin/python2.3 setup.py install > > > > Everything looks proper with the exeception of > this > > series of warning statements: > > > > ----------------- > > ... > > -------------- > > > > Would someone be kind enough to let me know > whether > > these messages were expected, and if not, how I > might > > resolve these? > > These warning can safely be ignored. > > -- > Marc-Andre Lemburg > eGenix.com > Marc- Thank you very much for the reply. It helps greatly. With kind regards, DC __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From davidrushby at yahoo.com Tue May 3 17:18:46 2005 From: davidrushby at yahoo.com (David Rushby) Date: Fri Jan 20 08:07:53 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050503231846.35012.qmail@web30009.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > I'm not sure whether your analysis of the problem is correct... Indeed, my original analysis wasn't correct; I think this one is. The fatal error I'm complaining about only arises if the arguments to DateTime.DateTime are invalid, so that the object is deallocated in the onError block of mxDateTime_FromDateAndTime. If the object is created successfully, and later deallocated by Python's garbage collector, the fatal error doesn't arise. Here's my analysis of the problem: --- If the debugging directive Py_TRACE_REFS is enabled, as it is in my case, the Python interpreter maintains a doubly linked list of all Python objects (named refchain) via the _ob_next and _ob_prev pointers added to PyObject via _PyObject_HEAD_EXTRA. Each object is inserted into refchain by the _Py_AddToAllObjects call in _Py_NewReference, and removed from refchain by the _Py_ForgetReference call in _Py_Dealloc. _Py_ForgetReference performs an integrity check on the object being deallocated (op) to make sure that its neighbors in refchain recognize it. Specifically, _Py_ForgetReference verifies that the _ob_next pointer of the previous object in refchain (op->_ob_prev->_ob_next) points to op, and that the _ob_prev pointer of the next object in refchain (op->_ob_next->_ob_prev) points to op. If either of those conditions is false, the interpreter raises the fatal error I'm seeing. After mxDateTime_New pulls an mxDateTimeObject out of the free list, it calls _Py_NewReference on that object to transform it from a "conceptually deallocated" object to a "conceptually allocated" one. _Py_NewReference inserts the object into refchain. Later, when the object is being "conceptually deallocated", it should be removed from refchain with _Py_ForgetReference. The version of _Py_Dealloc that's active when Py_TRACE_REFS is enabled does this (_Py_Dealloc is the element of Py_DECREF that performs the actual destruction). _Py_Dealloc first calls _Py_ForgetReference to remove the object from refchain, then calls the object's destructor (op->ob_type->tp_dealloc). If WANT_SUBCLASSABLE_TYPES is not defined (it is not in my case), the destructor for mxDateTime_Type is mxDateTime_Free. So, if a DateTime object is deallocated normally, as a result of its reference count falling to zero, _Py_Dealloc is called on the object, which first removes it from refchain, then passes it to mxDateTime_Free. If a DateTime object is destroyed prematurely, as a result of invalid arguments to its destructor, the onError handler calls mxDateTime_Free, so the object is "conceptually deallocated" (placed in the free list), *but* the object is not removed from refchain. So if a refchain-membership-integrity-check is performed on the object in question or one of its immediate neighbors in refchain, that integrity check fails, leading to the fatal error. --- The solution is to 'Py_DECREF(...)' the object in the onError handler of its constructor, instead of passing the object directly to mxDateTime_Free. That change solves two problems: 1) It causes _Py_Dealloc to execute, which in turn executes _Py_ForgetReference, so the object is removed from refchain, as it should be. 2) At present, objects that are created successfully and later deallocated by normal reference count mechanics have a reference count of 0 when they enter the free list, whereas objects whose constructors abort their creation due to invalid arguments have a reference count of 1 when they enter the free list. Although AFAIK this doesn't cause an actual execution problem (because the object's reference count is *explicitly set to 1* rather than *incremented by 1* when the object is later "conceptually allocated" by _Py_NewReference), it is likely to confuse future maintainers and thereby lead to the introduction of an actual execution problem. I assume that if you agree that this is a reasonable solution, you'll want to apply the change not only to mxDateTime_FromDateAndTime, but to all similar constructors in mxDateTime.c. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From rj at maxxian.com Thu May 5 01:57:40 2005 From: rj at maxxian.com (RJ Juneau) Date: Fri Jan 20 08:07:53 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c5512e$f72798c0$6505a8c0@rjlaptop> I'm on the 30 day evaluation for mxodbc_zope_da. I'm getting the following error when I submit some queries: Error Type: KeyError Error Value: 'query' I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 with UCS4. The error seems to be caused by multiple rows being returned. I did see an earlier posting with the same error message. The response suggested a template error, but this is clearly not the case here. The additional evidence I've gathered so far: - I'm running the test directly from the ZSQL method, so there's no template involved. - If I use the same query with an additional "where" clause to ensure that only one row is returned, it works - If I use a value in the 'where' clause with no rows returned, it works - The same ZSQL query is being used on a Windows machine running Zope and the free ZODBC module without a problem - The query has been verified directly in mysql-client-browser Other info: - The database is MySQL 4.1.10A-0 - iODBC is the DB driver RJ Juneau -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050505/68d278bf/attachment-0029.htm From mal at egenix.com Thu May 5 12:37:43 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 20 08:07:54 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c5512e$f72798c0$6505a8c0@rjlaptop> References: <000301c5512e$f72798c0$6505a8c0@rjlaptop> Message-ID: <4279E967.6010904@egenix.com> RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 > with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 09:37:42 2005 From: rj at maxxian.com (RJ Juneau) Date: Fri Jan 20 08:07:54 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000101c5516f$3b96de90$6505a8c0@rjlaptop> More interesting info on the problem: If I execute the query directly in the "test" window of the base eGenix mxODBC Database Connection window, it works fine and returns the 20 lines expected. That could point to a problem in the rendering, which seems to be where the traceback ends. Note that within the same Zope system I also have an ODBC connection to a Sybase database, and I have successfully tested multi-line ZSQL queries there. This is the traceback: Time 2005/05/05 07:55:15.294 GMT-4 Exception Type KeyError Exception Value 'query' Traceback (innermost last): Module ZPublisher.Publish, line 101, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 39, in call_object Module Shared.DC.ZRDB.DA, line 337, in manage_test Module DocumentTemplate.DT_String, line 474, in __call__ Module DocumentTemplate.DT_In, line 602, in renderwb Module DocumentTemplate.DT_Var, line 219, in render KeyError: 'query' I don't think the following is an issue, but I'll include it for completeness.I am also getting the following iODBC warnings and errors in the Zope console log, which are related to the ODBC parameters being passed by iODBC. Note that these errors also appear for all of the successful queries. [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (Setup). [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (UsageCount). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Timeout). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Reuse). As for the ZSQL snippet from the template... Since there's no template involved yet (I'm still testing directly from the ZSQL method), I assume you mean the SQL code? select h.host_name, s.system_name, s.system_handle, count(*) from terminal t, system_map s, host h where t.system_index = s.system_index and s.host_index = h.host_index group by s.system_name order by h.host_name Nothing complicated here. There are no parameters passed to the query. RJ -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: May 5, 2005 5:38 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: Re: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is > 2.3.4 with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ---------------------------------------------------------------------- > -- > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 16:00:32 2005 From: charlie at egenix.com (Charlie Clark) Date: Fri Jan 20 08:07:54 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000101c5516f$3b96de90$6505a8c0@rjlaptop> References: <000101c5516f$3b96de90$6505a8c0@rjlaptop> Message-ID: <20050505150032.644.1@bepc.1115296715.fake> On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base eGenix > mxODBC Database Connection window, it works fine and returns the 20 > lines expected. That could point to a problem in the rendering, which > seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection to > a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 10:22:17 2005 From: rj at maxxian.com (RJ Juneau) Date: Fri Jan 20 08:07:54 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505150032.644.1@bepc.1115296715.fake> Message-ID: <000201c55175$75bcad10$6505a8c0@rjlaptop> At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 11:47:14 2005 From: rj at maxxian.com (RJ Juneau) Date: Fri Jan 20 08:07:54 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c55181$549be0e0$6505a8c0@rjlaptop> Charlie, I found a fix. Here it is in case anyone else runs into this. You were correct - the problem is in another part of Zope. Based on your feedback, I did a bit more searching and found something here: http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. html The problem appears to be in Zope versions after 2.7.0. I'm running 2.7.6, and the post indicates that it also happens in 2.7.4. The solution: Edit file /lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. There are two lines in the file that start with . Edit them as follows: Change first line to: Change second line to: Just to be after, I shut down Zope before I made the changes and restarted it after. Thanks for the help! RJ -----Original Message----- From: RJ Juneau [mailto:rj@maxxian.com] Sent: May 5, 2005 9:22 AM To: 'Charlie Clark' Cc: 'egenix-users@lists.egenix.com' Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 17:57:25 2005 From: charlie at egenix.com (Charlie Clark) Date: Fri Jan 20 08:07:54 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <20050505165725.3380.2@bepc.1115296715.fake> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Thu May 5 09:15:21 2005 From: charlie at egenix.com (Charlie Clark) Date: Fri Jan 20 08:07:54 2006 Subject: [Zope-DB] RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <000001c55185$41477730$6b00a8c0@fonacier.local> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________ Zope-DB mailing list Zope-DB@zope.org http://mail.zope.org/mailman/listinfo/zope-db From rj at maxxian.com Thu May 5 12:38:00 2005 From: rj at maxxian.com (RJ Juneau) Date: Fri Jan 20 08:07:54 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000001c55188$6b841eb0$6505a8c0@rjlaptop> I just double-checked. Zope-2.7.6-final. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 12:49:16 2005 From: rj at maxxian.com (RJ Juneau) Date: Fri Jan 20 08:07:54 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000501c55189$fe149ba0$6505a8c0@rjlaptop> Charlie, The fix has only been applied for 2.7.7, 2.8b2. The info is in the original bug report which is closed and can be found here: http://www.zope.org/Collectors/Zope/1745 RJ -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Fri May 6 11:50:09 2005 From: rj at maxxian.com (RJ Juneau) Date: Fri Jan 20 08:07:54 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC Message-ID: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Still on eval for the product. I cannot get a stable connection to Sybase via the iODBC drivers. - The Sybase ODBC connection - including a query - have been verified at the iODBC level. - The setup is already working well for ODBC connection to MySQL. Symptoms include: - If I click on "Open Connection", it still comes back with "Connection Closed" when I go to a ZSQL method - Using 'Connect on Demand' is not working either. - Clicking "Open Connection" gives me the following error: Connection string: DSN=lixbox_sybase; UID=sa; PWD=XXXXXXX Connection pool entry: 0 Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection rejected by data source', 7952) The odbc.ini definition for DSN "lixbox_sybase" is as follows: [lixbox_sybase] JetFix = No NoRowSetSizeLimit = No Description = Test connection to listbox Options = LIXBOX DSQUERY = SQLSERVER TDSHOST = lixbox TDSPORT = 5000 TDSVER = 5.0 SQLSERVER_CATALOG = N CURSOR_SENSITIVITY = LOW UserName = sa Password = XXXXXXXX ServerType = Sybase 10/11/12 Driver = /opt/openlink/lib/sql_mt_lt.so Database = pubs2 ReadOnly = no NoAutoCommit = No NoLoginBox = No FetchBufferSize = 60 Other relevant data: - Connecting via OpenLink's iODBC - Zope 2.7.6-final - Python 2.3.4 - Connection to Sybase has been successfully tested with iODBC, including issuing a query - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC connection RJ Juneau Chief Technology Officer Maxxian Integration Inc. 155 Westhampton Drive Thornhill, Ontario Canada L4J 7X2 E-mail: rj@maxxian.com Phone: +1 905 482 9429 Cell: +1 416 897 6682 Toll free: +1 866 758 9161 Fax: +1 647 722 2038 -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050506/aef33361/attachment-0029.htm From mal at egenix.com Fri May 6 18:27:37 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 20 08:07:54 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC In-Reply-To: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> References: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Message-ID: <427B8CE9.1010601@egenix.com> RJ Juneau wrote: > Still on eval for the product. > > I cannot get a stable connection to Sybase via the iODBC drivers. > > - The Sybase ODBC connection - including a query - have been verified at > the iODBC level. > - The setup is already working well for ODBC connection to MySQL. > > Symptoms include: > > - If I click on "Open Connection", it still comes back with "Connection > Closed" when I go to a ZSQL method > - Using 'Connect on Demand' is not working either. > - Clicking "Open Connection" gives me the following error: > > Connection string: DSN=lixbox_sybase; > UID=sa; > PWD=XXXXXXX Try writing the connection string on one line and without whitespace. ODBC drivers sometimes have problems with this. > Connection pool entry: 0 > Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection > rejected by data source', 7952) This is a generic error that relates to authentication or firewall problems. It is possible that turning on ODBC tracing the ODBC manager will give more clues as to the real cause of the problem. > The odbc.ini definition for DSN "lixbox_sybase" is as follows: > > [lixbox_sybase] > JetFix = No > NoRowSetSizeLimit = No > Description = Test connection to listbox > Options = LIXBOX > DSQUERY = SQLSERVER > TDSHOST = lixbox > TDSPORT = 5000 > TDSVER = 5.0 > SQLSERVER_CATALOG = N > CURSOR_SENSITIVITY = LOW > UserName = sa > Password = XXXXXXXX > ServerType = Sybase 10/11/12 > Driver = /opt/openlink/lib/sql_mt_lt.so > Database = pubs2 > ReadOnly = no > NoAutoCommit = No > NoLoginBox = No > FetchBufferSize = 60 > > > Other relevant data: > - Connecting via OpenLink's iODBC > - Zope 2.7.6-final > - Python 2.3.4 > - Connection to Sybase has been successfully tested with iODBC, > including issuing a query > - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC > connection > > > > RJ Juneau > Chief Technology Officer > Maxxian Integration Inc. > 155 Westhampton Drive > Thornhill, Ontario > Canada L4J 7X2 > E-mail: rj@maxxian.com > Phone: +1 905 482 9429 > Cell: +1 416 897 6682 > Toll free: +1 866 758 9161 > Fax: +1 647 722 2038 > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 06 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From calisp at gmail.com Sun May 15 23:49:03 2005 From: calisp at gmail.com (calisp@gmail.com) Date: Fri Jan 20 08:07:54 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK Message-ID: Hi, I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the following error... 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the last phase of a two-phase commit. This shouldn't happen. Traceback (most recent call last): File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one jar.tpc_finish(self) File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish try: self._finish() File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could not perform COMMIT or ROLLBACK', 1023) What could be causing this? Can I get the mxODBCZopeDA source from somewhere? It would make debugging this much easier. Thanks, Calisp. From mal at egenix.com Mon May 16 13:52:12 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 20 08:07:54 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK In-Reply-To: References: Message-ID: <42887B5C.4010109@egenix.com> calisp@gmail.com wrote: > Hi, > > I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with > unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the > following error... > > 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the > last phase of a two-phase commit. This shouldn't happen. > Traceback (most recent call last): > File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one > jar.tpc_finish(self) > File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish > try: self._finish() > File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish > File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler > ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could > not perform COMMIT or ROLLBACK', 1023) You should have a look at the database logs to see what prevented the commit from being completed. > What could be causing this? Hard to say: mxODBCZopeDA is trying to commit the transaction, but the driver or database failed to complete the request. The above error was generated by the ODBC driver. This could be network or DNS problems, or be related to a bug in FreeTDS (which is getting more stable with every new release, but should still be considered beta quality software at the moment). > Can I get the mxODBCZopeDA source from > somewhere? It would make debugging this much easier. Getting the source is not an option and won't help much either since the source of the problem is not mxODBCZopeDA. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 16 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Sun May 1 21:29:25 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 20 12:02:26 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <427259F3.4090806@egenix.com> References: <20050427130906.52878.qmail@web30008.mail.mud.yahoo.com> <427259F3.4090806@egenix.com> Message-ID: <42752005.7080904@egenix.com> M.-A. Lemburg wrote: > David Rushby wrote: > >> --- "M.-A. Lemburg" wrote: >> >>> Are you using the standard mxDateTime build or one >>> with WANT_SUBCLASSABLE_TYPES defined... >> >> >> >> Presumably "the standard", since I just built with 'py24d setup.py >> build', making no attempt to enable special directives. >> >> >>> ... (mxDateTime_Deallocate is only used by the latter)? >> >> >> >> That's true in 2.1.0-2005-04-15, but not in 2.1.0b5. >> >> >>> In any case, please try our latest snapshot: >>> >>> >> >> http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-04-15.zip >> >>> to see if that makes any difference. >> >> >> >> I can't build it out of the box: > > > Hmm, looks like distutils' sdist command doesn't like our new > repository layout which uses symlinks (after we've switched to > subversion). > > We'll have to debug distutils first, I guess :-( Ok, we've found the problem and fixed it. Here's the new release (which does build out of the box at least on our boxes ;-): http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 01 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From davidrushby at yahoo.com Mon May 2 15:49:53 2005 From: davidrushby at yahoo.com (David Rushby) Date: Fri Jan 20 12:02:26 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Ok, we've found the problem and fixed it. Here's the new > release (which does build out of the box at least on our > boxes ;-): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip It does build now, but: py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" still behaves as it did when I submitted my original message: Fatal Python error: UNREF invalid object Aborted This is the same debug build of Python 2.4.1 that I was previously using, running the same configuration (CentOS Linux 4.0/i386, everything compiled with GCC 3.4.3). Have you examined my original claim as to the cause of the bug? __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 10:21:55 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 20 12:02:26 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> References: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> Message-ID: <42772693.8050306@egenix.com> David Rushby wrote: > --- "M.-A. Lemburg" wrote: > >>Ok, we've found the problem and fixed it. Here's the new >>release (which does build out of the box at least on our >>boxes ;-): >> >> > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip > > It does build now, but: > py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" > still behaves as it did when I submitted my original message: > Fatal Python error: UNREF invalid object > Aborted > > This is the same debug build of Python 2.4.1 that I was previously > using, running the same configuration (CentOS Linux 4.0/i386, > everything compiled with GCC 3.4.3). > > Have you examined my original claim as to the cause of the bug? No. We haven't had time for looking into it. I'm not sure whether your analysis of the problem is correct: if you don't define WANT_SUBCLASSABLE_TYPES, the API mxDateTime_Deallocate() is neither defined nor used. Furthermore, PyObject_Del() is only called by mxDateTime_Free() if you have explicitely edited mxDateTime.c to disabled the free list #defines. In a standard build, PyObject_Del() is only called at module finalization time. Note that the reason we call mxDateTime_Free() in the constructor is that we don't want the destructor of the object to be called. Py_DECREF() would call the destructor (mxDateTime_Deallocate). It is possible that the debug code in Python complains about the refcount in the object not being 0 at the time the object is finalized (module finalization time), but I don't see any such checks in PyObject_Free() (which is what PyObject_Del() maps to). Again, all of this does not happen in regular non-debug Python builds. Please be aware that we don't support debug builds, so fixing the problem (if there is one - gcc has some serious optimization problems on some combinations of platform and version) will take a while. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 09:27:37 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Fri Jan 20 12:02:26 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 Message-ID: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Hi all- I am trying to build the mx-base package, v.2.0.6. This will be used with postgresql 7.3.9, psycopg 1.1.18, and Roundup 0.8.2. RHEL 3.0 Python 2.3 egenix-mx-base-2.0.6.tar.gz I performed a: /usr/local/bin/python2.3 setup.py install Everything looks proper with the exeception of this series of warning statements: ----------------- gcc -pthread -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fno-strict-aliasing -fPIC -Imx/BeeBase/mxBeeBase -I/usr/local/incl ude/python2.3 -I/usr/local/include -c mx/BeeBase/mxBeeBase/btr.c -o build/temp.linux-i686-2.3/mx/BeeBase/mxBeeBase/mxBeeBa se/mx/BeeBase/mxBeeBase/btr.o mx/BeeBase/mxBeeBase/btr.c: In function `dumpBuf': mx/BeeBase/mxBeeBase/btr.c:249: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:250: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:255: warning: unsigned int format, long unsigned int arg (arg 4) mx/BeeBase/mxBeeBase/btr.c:256: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c: In function `_validateTree': mx/BeeBase/mxBeeBase/btr.c:330: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:337: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:339: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:349: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:351: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 3) creating build/lib.linux-i686-2.3/mx/BeeBase creating build/lib.linux-i686-2.3/mx/BeeBase/mxBeeBase -------------- Would someone be kind enough to let me know whether these messages were expected, and if not, how I might resolve these? Thanks! DC __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 22:06:33 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 20 12:02:26 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> References: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Message-ID: <4277CBB9.8020302@egenix.com> Dianne Chen wrote: > Hi all- > > I am trying to build the mx-base package, v.2.0.6. > This will be used with postgresql 7.3.9, psycopg > 1.1.18, and Roundup 0.8.2. > > RHEL 3.0 > Python 2.3 > egenix-mx-base-2.0.6.tar.gz > > I performed a: > > /usr/local/bin/python2.3 setup.py install > > Everything looks proper with the exeception of this > series of warning statements: > > ----------------- > ... > -------------- > > Would someone be kind enough to let me know whether > these messages were expected, and if not, how I might > resolve these? These warning can safely be ignored. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 13:41:14 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Fri Jan 20 12:02:27 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: 6667 Message-ID: <20050503194114.72091.qmail@web31414.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Dianne Chen wrote: > > Hi all- > > > > I am trying to build the mx-base package, v.2.0.6. > > This will be used with postgresql 7.3.9, psycopg > > 1.1.18, and Roundup 0.8.2. > > > > RHEL 3.0 > > Python 2.3 > > egenix-mx-base-2.0.6.tar.gz > > > > I performed a: > > > > /usr/local/bin/python2.3 setup.py install > > > > Everything looks proper with the exeception of > this > > series of warning statements: > > > > ----------------- > > ... > > -------------- > > > > Would someone be kind enough to let me know > whether > > these messages were expected, and if not, how I > might > > resolve these? > > These warning can safely be ignored. > > -- > Marc-Andre Lemburg > eGenix.com > Marc- Thank you very much for the reply. It helps greatly. With kind regards, DC __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From davidrushby at yahoo.com Tue May 3 17:18:46 2005 From: davidrushby at yahoo.com (David Rushby) Date: Fri Jan 20 12:02:27 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050503231846.35012.qmail@web30009.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > I'm not sure whether your analysis of the problem is correct... Indeed, my original analysis wasn't correct; I think this one is. The fatal error I'm complaining about only arises if the arguments to DateTime.DateTime are invalid, so that the object is deallocated in the onError block of mxDateTime_FromDateAndTime. If the object is created successfully, and later deallocated by Python's garbage collector, the fatal error doesn't arise. Here's my analysis of the problem: --- If the debugging directive Py_TRACE_REFS is enabled, as it is in my case, the Python interpreter maintains a doubly linked list of all Python objects (named refchain) via the _ob_next and _ob_prev pointers added to PyObject via _PyObject_HEAD_EXTRA. Each object is inserted into refchain by the _Py_AddToAllObjects call in _Py_NewReference, and removed from refchain by the _Py_ForgetReference call in _Py_Dealloc. _Py_ForgetReference performs an integrity check on the object being deallocated (op) to make sure that its neighbors in refchain recognize it. Specifically, _Py_ForgetReference verifies that the _ob_next pointer of the previous object in refchain (op->_ob_prev->_ob_next) points to op, and that the _ob_prev pointer of the next object in refchain (op->_ob_next->_ob_prev) points to op. If either of those conditions is false, the interpreter raises the fatal error I'm seeing. After mxDateTime_New pulls an mxDateTimeObject out of the free list, it calls _Py_NewReference on that object to transform it from a "conceptually deallocated" object to a "conceptually allocated" one. _Py_NewReference inserts the object into refchain. Later, when the object is being "conceptually deallocated", it should be removed from refchain with _Py_ForgetReference. The version of _Py_Dealloc that's active when Py_TRACE_REFS is enabled does this (_Py_Dealloc is the element of Py_DECREF that performs the actual destruction). _Py_Dealloc first calls _Py_ForgetReference to remove the object from refchain, then calls the object's destructor (op->ob_type->tp_dealloc). If WANT_SUBCLASSABLE_TYPES is not defined (it is not in my case), the destructor for mxDateTime_Type is mxDateTime_Free. So, if a DateTime object is deallocated normally, as a result of its reference count falling to zero, _Py_Dealloc is called on the object, which first removes it from refchain, then passes it to mxDateTime_Free. If a DateTime object is destroyed prematurely, as a result of invalid arguments to its destructor, the onError handler calls mxDateTime_Free, so the object is "conceptually deallocated" (placed in the free list), *but* the object is not removed from refchain. So if a refchain-membership-integrity-check is performed on the object in question or one of its immediate neighbors in refchain, that integrity check fails, leading to the fatal error. --- The solution is to 'Py_DECREF(...)' the object in the onError handler of its constructor, instead of passing the object directly to mxDateTime_Free. That change solves two problems: 1) It causes _Py_Dealloc to execute, which in turn executes _Py_ForgetReference, so the object is removed from refchain, as it should be. 2) At present, objects that are created successfully and later deallocated by normal reference count mechanics have a reference count of 0 when they enter the free list, whereas objects whose constructors abort their creation due to invalid arguments have a reference count of 1 when they enter the free list. Although AFAIK this doesn't cause an actual execution problem (because the object's reference count is *explicitly set to 1* rather than *incremented by 1* when the object is later "conceptually allocated" by _Py_NewReference), it is likely to confuse future maintainers and thereby lead to the introduction of an actual execution problem. I assume that if you agree that this is a reasonable solution, you'll want to apply the change not only to mxDateTime_FromDateAndTime, but to all similar constructors in mxDateTime.c. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From rj at maxxian.com Thu May 5 01:57:40 2005 From: rj at maxxian.com (RJ Juneau) Date: Fri Jan 20 12:02:27 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c5512e$f72798c0$6505a8c0@rjlaptop> I'm on the 30 day evaluation for mxodbc_zope_da. I'm getting the following error when I submit some queries: Error Type: KeyError Error Value: 'query' I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 with UCS4. The error seems to be caused by multiple rows being returned. I did see an earlier posting with the same error message. The response suggested a template error, but this is clearly not the case here. The additional evidence I've gathered so far: - I'm running the test directly from the ZSQL method, so there's no template involved. - If I use the same query with an additional "where" clause to ensure that only one row is returned, it works - If I use a value in the 'where' clause with no rows returned, it works - The same ZSQL query is being used on a Windows machine running Zope and the free ZODBC module without a problem - The query has been verified directly in mysql-client-browser Other info: - The database is MySQL 4.1.10A-0 - iODBC is the DB driver RJ Juneau -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050505/68d278bf/attachment-0030.htm From mal at egenix.com Thu May 5 12:37:43 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 20 12:02:27 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c5512e$f72798c0$6505a8c0@rjlaptop> References: <000301c5512e$f72798c0$6505a8c0@rjlaptop> Message-ID: <4279E967.6010904@egenix.com> RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 > with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 09:37:42 2005 From: rj at maxxian.com (RJ Juneau) Date: Fri Jan 20 12:02:27 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000101c5516f$3b96de90$6505a8c0@rjlaptop> More interesting info on the problem: If I execute the query directly in the "test" window of the base eGenix mxODBC Database Connection window, it works fine and returns the 20 lines expected. That could point to a problem in the rendering, which seems to be where the traceback ends. Note that within the same Zope system I also have an ODBC connection to a Sybase database, and I have successfully tested multi-line ZSQL queries there. This is the traceback: Time 2005/05/05 07:55:15.294 GMT-4 Exception Type KeyError Exception Value 'query' Traceback (innermost last): Module ZPublisher.Publish, line 101, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 39, in call_object Module Shared.DC.ZRDB.DA, line 337, in manage_test Module DocumentTemplate.DT_String, line 474, in __call__ Module DocumentTemplate.DT_In, line 602, in renderwb Module DocumentTemplate.DT_Var, line 219, in render KeyError: 'query' I don't think the following is an issue, but I'll include it for completeness.I am also getting the following iODBC warnings and errors in the Zope console log, which are related to the ODBC parameters being passed by iODBC. Note that these errors also appear for all of the successful queries. [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (Setup). [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (UsageCount). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Timeout). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Reuse). As for the ZSQL snippet from the template... Since there's no template involved yet (I'm still testing directly from the ZSQL method), I assume you mean the SQL code? select h.host_name, s.system_name, s.system_handle, count(*) from terminal t, system_map s, host h where t.system_index = s.system_index and s.host_index = h.host_index group by s.system_name order by h.host_name Nothing complicated here. There are no parameters passed to the query. RJ -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: May 5, 2005 5:38 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: Re: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is > 2.3.4 with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ---------------------------------------------------------------------- > -- > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 16:00:32 2005 From: charlie at egenix.com (Charlie Clark) Date: Fri Jan 20 12:02:27 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000101c5516f$3b96de90$6505a8c0@rjlaptop> References: <000101c5516f$3b96de90$6505a8c0@rjlaptop> Message-ID: <20050505150032.644.1@bepc.1115296715.fake> On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base eGenix > mxODBC Database Connection window, it works fine and returns the 20 > lines expected. That could point to a problem in the rendering, which > seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection to > a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 10:22:17 2005 From: rj at maxxian.com (RJ Juneau) Date: Fri Jan 20 12:02:27 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505150032.644.1@bepc.1115296715.fake> Message-ID: <000201c55175$75bcad10$6505a8c0@rjlaptop> At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 11:47:14 2005 From: rj at maxxian.com (RJ Juneau) Date: Fri Jan 20 12:02:27 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c55181$549be0e0$6505a8c0@rjlaptop> Charlie, I found a fix. Here it is in case anyone else runs into this. You were correct - the problem is in another part of Zope. Based on your feedback, I did a bit more searching and found something here: http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. html The problem appears to be in Zope versions after 2.7.0. I'm running 2.7.6, and the post indicates that it also happens in 2.7.4. The solution: Edit file /lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. There are two lines in the file that start with . Edit them as follows: Change first line to: Change second line to: Just to be after, I shut down Zope before I made the changes and restarted it after. Thanks for the help! RJ -----Original Message----- From: RJ Juneau [mailto:rj@maxxian.com] Sent: May 5, 2005 9:22 AM To: 'Charlie Clark' Cc: 'egenix-users@lists.egenix.com' Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 17:57:25 2005 From: charlie at egenix.com (Charlie Clark) Date: Fri Jan 20 12:02:27 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <20050505165725.3380.2@bepc.1115296715.fake> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Thu May 5 09:15:21 2005 From: charlie at egenix.com (Charlie Clark) Date: Fri Jan 20 12:02:27 2006 Subject: [Zope-DB] RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <000001c55185$41477730$6b00a8c0@fonacier.local> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________ Zope-DB mailing list Zope-DB@zope.org http://mail.zope.org/mailman/listinfo/zope-db From rj at maxxian.com Thu May 5 12:38:00 2005 From: rj at maxxian.com (RJ Juneau) Date: Fri Jan 20 12:02:27 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000001c55188$6b841eb0$6505a8c0@rjlaptop> I just double-checked. Zope-2.7.6-final. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 12:49:16 2005 From: rj at maxxian.com (RJ Juneau) Date: Fri Jan 20 12:02:27 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000501c55189$fe149ba0$6505a8c0@rjlaptop> Charlie, The fix has only been applied for 2.7.7, 2.8b2. The info is in the original bug report which is closed and can be found here: http://www.zope.org/Collectors/Zope/1745 RJ -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Fri May 6 11:50:09 2005 From: rj at maxxian.com (RJ Juneau) Date: Fri Jan 20 12:02:28 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC Message-ID: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Still on eval for the product. I cannot get a stable connection to Sybase via the iODBC drivers. - The Sybase ODBC connection - including a query - have been verified at the iODBC level. - The setup is already working well for ODBC connection to MySQL. Symptoms include: - If I click on "Open Connection", it still comes back with "Connection Closed" when I go to a ZSQL method - Using 'Connect on Demand' is not working either. - Clicking "Open Connection" gives me the following error: Connection string: DSN=lixbox_sybase; UID=sa; PWD=XXXXXXX Connection pool entry: 0 Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection rejected by data source', 7952) The odbc.ini definition for DSN "lixbox_sybase" is as follows: [lixbox_sybase] JetFix = No NoRowSetSizeLimit = No Description = Test connection to listbox Options = LIXBOX DSQUERY = SQLSERVER TDSHOST = lixbox TDSPORT = 5000 TDSVER = 5.0 SQLSERVER_CATALOG = N CURSOR_SENSITIVITY = LOW UserName = sa Password = XXXXXXXX ServerType = Sybase 10/11/12 Driver = /opt/openlink/lib/sql_mt_lt.so Database = pubs2 ReadOnly = no NoAutoCommit = No NoLoginBox = No FetchBufferSize = 60 Other relevant data: - Connecting via OpenLink's iODBC - Zope 2.7.6-final - Python 2.3.4 - Connection to Sybase has been successfully tested with iODBC, including issuing a query - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC connection RJ Juneau Chief Technology Officer Maxxian Integration Inc. 155 Westhampton Drive Thornhill, Ontario Canada L4J 7X2 E-mail: rj@maxxian.com Phone: +1 905 482 9429 Cell: +1 416 897 6682 Toll free: +1 866 758 9161 Fax: +1 647 722 2038 -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050506/aef33361/attachment-0030.htm From mal at egenix.com Fri May 6 18:27:37 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 20 12:02:28 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC In-Reply-To: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> References: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Message-ID: <427B8CE9.1010601@egenix.com> RJ Juneau wrote: > Still on eval for the product. > > I cannot get a stable connection to Sybase via the iODBC drivers. > > - The Sybase ODBC connection - including a query - have been verified at > the iODBC level. > - The setup is already working well for ODBC connection to MySQL. > > Symptoms include: > > - If I click on "Open Connection", it still comes back with "Connection > Closed" when I go to a ZSQL method > - Using 'Connect on Demand' is not working either. > - Clicking "Open Connection" gives me the following error: > > Connection string: DSN=lixbox_sybase; > UID=sa; > PWD=XXXXXXX Try writing the connection string on one line and without whitespace. ODBC drivers sometimes have problems with this. > Connection pool entry: 0 > Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection > rejected by data source', 7952) This is a generic error that relates to authentication or firewall problems. It is possible that turning on ODBC tracing the ODBC manager will give more clues as to the real cause of the problem. > The odbc.ini definition for DSN "lixbox_sybase" is as follows: > > [lixbox_sybase] > JetFix = No > NoRowSetSizeLimit = No > Description = Test connection to listbox > Options = LIXBOX > DSQUERY = SQLSERVER > TDSHOST = lixbox > TDSPORT = 5000 > TDSVER = 5.0 > SQLSERVER_CATALOG = N > CURSOR_SENSITIVITY = LOW > UserName = sa > Password = XXXXXXXX > ServerType = Sybase 10/11/12 > Driver = /opt/openlink/lib/sql_mt_lt.so > Database = pubs2 > ReadOnly = no > NoAutoCommit = No > NoLoginBox = No > FetchBufferSize = 60 > > > Other relevant data: > - Connecting via OpenLink's iODBC > - Zope 2.7.6-final > - Python 2.3.4 > - Connection to Sybase has been successfully tested with iODBC, > including issuing a query > - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC > connection > > > > RJ Juneau > Chief Technology Officer > Maxxian Integration Inc. > 155 Westhampton Drive > Thornhill, Ontario > Canada L4J 7X2 > E-mail: rj@maxxian.com > Phone: +1 905 482 9429 > Cell: +1 416 897 6682 > Toll free: +1 866 758 9161 > Fax: +1 647 722 2038 > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 06 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From calisp at gmail.com Sun May 15 23:49:03 2005 From: calisp at gmail.com (calisp@gmail.com) Date: Fri Jan 20 12:02:28 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK Message-ID: Hi, I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the following error... 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the last phase of a two-phase commit. This shouldn't happen. Traceback (most recent call last): File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one jar.tpc_finish(self) File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish try: self._finish() File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could not perform COMMIT or ROLLBACK', 1023) What could be causing this? Can I get the mxODBCZopeDA source from somewhere? It would make debugging this much easier. Thanks, Calisp. From mal at egenix.com Mon May 16 13:52:12 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 20 12:02:28 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK In-Reply-To: References: Message-ID: <42887B5C.4010109@egenix.com> calisp@gmail.com wrote: > Hi, > > I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with > unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the > following error... > > 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the > last phase of a two-phase commit. This shouldn't happen. > Traceback (most recent call last): > File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one > jar.tpc_finish(self) > File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish > try: self._finish() > File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish > File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler > ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could > not perform COMMIT or ROLLBACK', 1023) You should have a look at the database logs to see what prevented the commit from being completed. > What could be causing this? Hard to say: mxODBCZopeDA is trying to commit the transaction, but the driver or database failed to complete the request. The above error was generated by the ODBC driver. This could be network or DNS problems, or be related to a bug in FreeTDS (which is getting more stable with every new release, but should still be considered beta quality software at the moment). > Can I get the mxODBCZopeDA source from > somewhere? It would make debugging this much easier. Getting the source is not an option and won't help much either since the source of the problem is not mxODBCZopeDA. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 16 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Sun May 1 21:29:25 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 20 16:01:01 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <427259F3.4090806@egenix.com> References: <20050427130906.52878.qmail@web30008.mail.mud.yahoo.com> <427259F3.4090806@egenix.com> Message-ID: <42752005.7080904@egenix.com> M.-A. Lemburg wrote: > David Rushby wrote: > >> --- "M.-A. Lemburg" wrote: >> >>> Are you using the standard mxDateTime build or one >>> with WANT_SUBCLASSABLE_TYPES defined... >> >> >> >> Presumably "the standard", since I just built with 'py24d setup.py >> build', making no attempt to enable special directives. >> >> >>> ... (mxDateTime_Deallocate is only used by the latter)? >> >> >> >> That's true in 2.1.0-2005-04-15, but not in 2.1.0b5. >> >> >>> In any case, please try our latest snapshot: >>> >>> >> >> http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-04-15.zip >> >>> to see if that makes any difference. >> >> >> >> I can't build it out of the box: > > > Hmm, looks like distutils' sdist command doesn't like our new > repository layout which uses symlinks (after we've switched to > subversion). > > We'll have to debug distutils first, I guess :-( Ok, we've found the problem and fixed it. Here's the new release (which does build out of the box at least on our boxes ;-): http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 01 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From davidrushby at yahoo.com Mon May 2 15:49:53 2005 From: davidrushby at yahoo.com (David Rushby) Date: Fri Jan 20 16:01:01 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Ok, we've found the problem and fixed it. Here's the new > release (which does build out of the box at least on our > boxes ;-): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip It does build now, but: py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" still behaves as it did when I submitted my original message: Fatal Python error: UNREF invalid object Aborted This is the same debug build of Python 2.4.1 that I was previously using, running the same configuration (CentOS Linux 4.0/i386, everything compiled with GCC 3.4.3). Have you examined my original claim as to the cause of the bug? __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 10:21:55 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 20 16:01:01 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> References: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> Message-ID: <42772693.8050306@egenix.com> David Rushby wrote: > --- "M.-A. Lemburg" wrote: > >>Ok, we've found the problem and fixed it. Here's the new >>release (which does build out of the box at least on our >>boxes ;-): >> >> > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip > > It does build now, but: > py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" > still behaves as it did when I submitted my original message: > Fatal Python error: UNREF invalid object > Aborted > > This is the same debug build of Python 2.4.1 that I was previously > using, running the same configuration (CentOS Linux 4.0/i386, > everything compiled with GCC 3.4.3). > > Have you examined my original claim as to the cause of the bug? No. We haven't had time for looking into it. I'm not sure whether your analysis of the problem is correct: if you don't define WANT_SUBCLASSABLE_TYPES, the API mxDateTime_Deallocate() is neither defined nor used. Furthermore, PyObject_Del() is only called by mxDateTime_Free() if you have explicitely edited mxDateTime.c to disabled the free list #defines. In a standard build, PyObject_Del() is only called at module finalization time. Note that the reason we call mxDateTime_Free() in the constructor is that we don't want the destructor of the object to be called. Py_DECREF() would call the destructor (mxDateTime_Deallocate). It is possible that the debug code in Python complains about the refcount in the object not being 0 at the time the object is finalized (module finalization time), but I don't see any such checks in PyObject_Free() (which is what PyObject_Del() maps to). Again, all of this does not happen in regular non-debug Python builds. Please be aware that we don't support debug builds, so fixing the problem (if there is one - gcc has some serious optimization problems on some combinations of platform and version) will take a while. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 09:27:37 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Fri Jan 20 16:01:01 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 Message-ID: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Hi all- I am trying to build the mx-base package, v.2.0.6. This will be used with postgresql 7.3.9, psycopg 1.1.18, and Roundup 0.8.2. RHEL 3.0 Python 2.3 egenix-mx-base-2.0.6.tar.gz I performed a: /usr/local/bin/python2.3 setup.py install Everything looks proper with the exeception of this series of warning statements: ----------------- gcc -pthread -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fno-strict-aliasing -fPIC -Imx/BeeBase/mxBeeBase -I/usr/local/incl ude/python2.3 -I/usr/local/include -c mx/BeeBase/mxBeeBase/btr.c -o build/temp.linux-i686-2.3/mx/BeeBase/mxBeeBase/mxBeeBa se/mx/BeeBase/mxBeeBase/btr.o mx/BeeBase/mxBeeBase/btr.c: In function `dumpBuf': mx/BeeBase/mxBeeBase/btr.c:249: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:250: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:255: warning: unsigned int format, long unsigned int arg (arg 4) mx/BeeBase/mxBeeBase/btr.c:256: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c: In function `_validateTree': mx/BeeBase/mxBeeBase/btr.c:330: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:337: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:339: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:349: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:351: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 3) creating build/lib.linux-i686-2.3/mx/BeeBase creating build/lib.linux-i686-2.3/mx/BeeBase/mxBeeBase -------------- Would someone be kind enough to let me know whether these messages were expected, and if not, how I might resolve these? Thanks! DC __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 22:06:33 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 20 16:01:01 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> References: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Message-ID: <4277CBB9.8020302@egenix.com> Dianne Chen wrote: > Hi all- > > I am trying to build the mx-base package, v.2.0.6. > This will be used with postgresql 7.3.9, psycopg > 1.1.18, and Roundup 0.8.2. > > RHEL 3.0 > Python 2.3 > egenix-mx-base-2.0.6.tar.gz > > I performed a: > > /usr/local/bin/python2.3 setup.py install > > Everything looks proper with the exeception of this > series of warning statements: > > ----------------- > ... > -------------- > > Would someone be kind enough to let me know whether > these messages were expected, and if not, how I might > resolve these? These warning can safely be ignored. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 13:41:14 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Fri Jan 20 16:01:01 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: 6667 Message-ID: <20050503194114.72091.qmail@web31414.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Dianne Chen wrote: > > Hi all- > > > > I am trying to build the mx-base package, v.2.0.6. > > This will be used with postgresql 7.3.9, psycopg > > 1.1.18, and Roundup 0.8.2. > > > > RHEL 3.0 > > Python 2.3 > > egenix-mx-base-2.0.6.tar.gz > > > > I performed a: > > > > /usr/local/bin/python2.3 setup.py install > > > > Everything looks proper with the exeception of > this > > series of warning statements: > > > > ----------------- > > ... > > -------------- > > > > Would someone be kind enough to let me know > whether > > these messages were expected, and if not, how I > might > > resolve these? > > These warning can safely be ignored. > > -- > Marc-Andre Lemburg > eGenix.com > Marc- Thank you very much for the reply. It helps greatly. With kind regards, DC __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From davidrushby at yahoo.com Tue May 3 17:18:46 2005 From: davidrushby at yahoo.com (David Rushby) Date: Fri Jan 20 16:01:01 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050503231846.35012.qmail@web30009.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > I'm not sure whether your analysis of the problem is correct... Indeed, my original analysis wasn't correct; I think this one is. The fatal error I'm complaining about only arises if the arguments to DateTime.DateTime are invalid, so that the object is deallocated in the onError block of mxDateTime_FromDateAndTime. If the object is created successfully, and later deallocated by Python's garbage collector, the fatal error doesn't arise. Here's my analysis of the problem: --- If the debugging directive Py_TRACE_REFS is enabled, as it is in my case, the Python interpreter maintains a doubly linked list of all Python objects (named refchain) via the _ob_next and _ob_prev pointers added to PyObject via _PyObject_HEAD_EXTRA. Each object is inserted into refchain by the _Py_AddToAllObjects call in _Py_NewReference, and removed from refchain by the _Py_ForgetReference call in _Py_Dealloc. _Py_ForgetReference performs an integrity check on the object being deallocated (op) to make sure that its neighbors in refchain recognize it. Specifically, _Py_ForgetReference verifies that the _ob_next pointer of the previous object in refchain (op->_ob_prev->_ob_next) points to op, and that the _ob_prev pointer of the next object in refchain (op->_ob_next->_ob_prev) points to op. If either of those conditions is false, the interpreter raises the fatal error I'm seeing. After mxDateTime_New pulls an mxDateTimeObject out of the free list, it calls _Py_NewReference on that object to transform it from a "conceptually deallocated" object to a "conceptually allocated" one. _Py_NewReference inserts the object into refchain. Later, when the object is being "conceptually deallocated", it should be removed from refchain with _Py_ForgetReference. The version of _Py_Dealloc that's active when Py_TRACE_REFS is enabled does this (_Py_Dealloc is the element of Py_DECREF that performs the actual destruction). _Py_Dealloc first calls _Py_ForgetReference to remove the object from refchain, then calls the object's destructor (op->ob_type->tp_dealloc). If WANT_SUBCLASSABLE_TYPES is not defined (it is not in my case), the destructor for mxDateTime_Type is mxDateTime_Free. So, if a DateTime object is deallocated normally, as a result of its reference count falling to zero, _Py_Dealloc is called on the object, which first removes it from refchain, then passes it to mxDateTime_Free. If a DateTime object is destroyed prematurely, as a result of invalid arguments to its destructor, the onError handler calls mxDateTime_Free, so the object is "conceptually deallocated" (placed in the free list), *but* the object is not removed from refchain. So if a refchain-membership-integrity-check is performed on the object in question or one of its immediate neighbors in refchain, that integrity check fails, leading to the fatal error. --- The solution is to 'Py_DECREF(...)' the object in the onError handler of its constructor, instead of passing the object directly to mxDateTime_Free. That change solves two problems: 1) It causes _Py_Dealloc to execute, which in turn executes _Py_ForgetReference, so the object is removed from refchain, as it should be. 2) At present, objects that are created successfully and later deallocated by normal reference count mechanics have a reference count of 0 when they enter the free list, whereas objects whose constructors abort their creation due to invalid arguments have a reference count of 1 when they enter the free list. Although AFAIK this doesn't cause an actual execution problem (because the object's reference count is *explicitly set to 1* rather than *incremented by 1* when the object is later "conceptually allocated" by _Py_NewReference), it is likely to confuse future maintainers and thereby lead to the introduction of an actual execution problem. I assume that if you agree that this is a reasonable solution, you'll want to apply the change not only to mxDateTime_FromDateAndTime, but to all similar constructors in mxDateTime.c. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From rj at maxxian.com Thu May 5 01:57:40 2005 From: rj at maxxian.com (RJ Juneau) Date: Fri Jan 20 16:01:01 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c5512e$f72798c0$6505a8c0@rjlaptop> I'm on the 30 day evaluation for mxodbc_zope_da. I'm getting the following error when I submit some queries: Error Type: KeyError Error Value: 'query' I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 with UCS4. The error seems to be caused by multiple rows being returned. I did see an earlier posting with the same error message. The response suggested a template error, but this is clearly not the case here. The additional evidence I've gathered so far: - I'm running the test directly from the ZSQL method, so there's no template involved. - If I use the same query with an additional "where" clause to ensure that only one row is returned, it works - If I use a value in the 'where' clause with no rows returned, it works - The same ZSQL query is being used on a Windows machine running Zope and the free ZODBC module without a problem - The query has been verified directly in mysql-client-browser Other info: - The database is MySQL 4.1.10A-0 - iODBC is the DB driver RJ Juneau -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050505/68d278bf/attachment-0031.htm From mal at egenix.com Thu May 5 12:37:43 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 20 16:01:01 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c5512e$f72798c0$6505a8c0@rjlaptop> References: <000301c5512e$f72798c0$6505a8c0@rjlaptop> Message-ID: <4279E967.6010904@egenix.com> RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 > with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 09:37:42 2005 From: rj at maxxian.com (RJ Juneau) Date: Fri Jan 20 16:01:02 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000101c5516f$3b96de90$6505a8c0@rjlaptop> More interesting info on the problem: If I execute the query directly in the "test" window of the base eGenix mxODBC Database Connection window, it works fine and returns the 20 lines expected. That could point to a problem in the rendering, which seems to be where the traceback ends. Note that within the same Zope system I also have an ODBC connection to a Sybase database, and I have successfully tested multi-line ZSQL queries there. This is the traceback: Time 2005/05/05 07:55:15.294 GMT-4 Exception Type KeyError Exception Value 'query' Traceback (innermost last): Module ZPublisher.Publish, line 101, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 39, in call_object Module Shared.DC.ZRDB.DA, line 337, in manage_test Module DocumentTemplate.DT_String, line 474, in __call__ Module DocumentTemplate.DT_In, line 602, in renderwb Module DocumentTemplate.DT_Var, line 219, in render KeyError: 'query' I don't think the following is an issue, but I'll include it for completeness.I am also getting the following iODBC warnings and errors in the Zope console log, which are related to the ODBC parameters being passed by iODBC. Note that these errors also appear for all of the successful queries. [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (Setup). [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (UsageCount). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Timeout). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Reuse). As for the ZSQL snippet from the template... Since there's no template involved yet (I'm still testing directly from the ZSQL method), I assume you mean the SQL code? select h.host_name, s.system_name, s.system_handle, count(*) from terminal t, system_map s, host h where t.system_index = s.system_index and s.host_index = h.host_index group by s.system_name order by h.host_name Nothing complicated here. There are no parameters passed to the query. RJ -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: May 5, 2005 5:38 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: Re: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is > 2.3.4 with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ---------------------------------------------------------------------- > -- > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 16:00:32 2005 From: charlie at egenix.com (Charlie Clark) Date: Fri Jan 20 16:01:02 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000101c5516f$3b96de90$6505a8c0@rjlaptop> References: <000101c5516f$3b96de90$6505a8c0@rjlaptop> Message-ID: <20050505150032.644.1@bepc.1115296715.fake> On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base eGenix > mxODBC Database Connection window, it works fine and returns the 20 > lines expected. That could point to a problem in the rendering, which > seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection to > a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 10:22:17 2005 From: rj at maxxian.com (RJ Juneau) Date: Fri Jan 20 16:01:02 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505150032.644.1@bepc.1115296715.fake> Message-ID: <000201c55175$75bcad10$6505a8c0@rjlaptop> At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 11:47:14 2005 From: rj at maxxian.com (RJ Juneau) Date: Fri Jan 20 16:01:02 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c55181$549be0e0$6505a8c0@rjlaptop> Charlie, I found a fix. Here it is in case anyone else runs into this. You were correct - the problem is in another part of Zope. Based on your feedback, I did a bit more searching and found something here: http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. html The problem appears to be in Zope versions after 2.7.0. I'm running 2.7.6, and the post indicates that it also happens in 2.7.4. The solution: Edit file /lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. There are two lines in the file that start with . Edit them as follows: Change first line to: Change second line to: Just to be after, I shut down Zope before I made the changes and restarted it after. Thanks for the help! RJ -----Original Message----- From: RJ Juneau [mailto:rj@maxxian.com] Sent: May 5, 2005 9:22 AM To: 'Charlie Clark' Cc: 'egenix-users@lists.egenix.com' Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 17:57:25 2005 From: charlie at egenix.com (Charlie Clark) Date: Fri Jan 20 16:01:02 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <20050505165725.3380.2@bepc.1115296715.fake> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Thu May 5 09:15:21 2005 From: charlie at egenix.com (Charlie Clark) Date: Fri Jan 20 16:01:02 2006 Subject: [Zope-DB] RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <000001c55185$41477730$6b00a8c0@fonacier.local> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________ Zope-DB mailing list Zope-DB@zope.org http://mail.zope.org/mailman/listinfo/zope-db From rj at maxxian.com Thu May 5 12:38:00 2005 From: rj at maxxian.com (RJ Juneau) Date: Fri Jan 20 16:01:02 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000001c55188$6b841eb0$6505a8c0@rjlaptop> I just double-checked. Zope-2.7.6-final. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 12:49:16 2005 From: rj at maxxian.com (RJ Juneau) Date: Fri Jan 20 16:01:02 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000501c55189$fe149ba0$6505a8c0@rjlaptop> Charlie, The fix has only been applied for 2.7.7, 2.8b2. The info is in the original bug report which is closed and can be found here: http://www.zope.org/Collectors/Zope/1745 RJ -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Fri May 6 11:50:09 2005 From: rj at maxxian.com (RJ Juneau) Date: Fri Jan 20 16:01:02 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC Message-ID: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Still on eval for the product. I cannot get a stable connection to Sybase via the iODBC drivers. - The Sybase ODBC connection - including a query - have been verified at the iODBC level. - The setup is already working well for ODBC connection to MySQL. Symptoms include: - If I click on "Open Connection", it still comes back with "Connection Closed" when I go to a ZSQL method - Using 'Connect on Demand' is not working either. - Clicking "Open Connection" gives me the following error: Connection string: DSN=lixbox_sybase; UID=sa; PWD=XXXXXXX Connection pool entry: 0 Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection rejected by data source', 7952) The odbc.ini definition for DSN "lixbox_sybase" is as follows: [lixbox_sybase] JetFix = No NoRowSetSizeLimit = No Description = Test connection to listbox Options = LIXBOX DSQUERY = SQLSERVER TDSHOST = lixbox TDSPORT = 5000 TDSVER = 5.0 SQLSERVER_CATALOG = N CURSOR_SENSITIVITY = LOW UserName = sa Password = XXXXXXXX ServerType = Sybase 10/11/12 Driver = /opt/openlink/lib/sql_mt_lt.so Database = pubs2 ReadOnly = no NoAutoCommit = No NoLoginBox = No FetchBufferSize = 60 Other relevant data: - Connecting via OpenLink's iODBC - Zope 2.7.6-final - Python 2.3.4 - Connection to Sybase has been successfully tested with iODBC, including issuing a query - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC connection RJ Juneau Chief Technology Officer Maxxian Integration Inc. 155 Westhampton Drive Thornhill, Ontario Canada L4J 7X2 E-mail: rj@maxxian.com Phone: +1 905 482 9429 Cell: +1 416 897 6682 Toll free: +1 866 758 9161 Fax: +1 647 722 2038 -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050506/aef33361/attachment-0031.htm From mal at egenix.com Fri May 6 18:27:37 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 20 16:01:02 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC In-Reply-To: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> References: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Message-ID: <427B8CE9.1010601@egenix.com> RJ Juneau wrote: > Still on eval for the product. > > I cannot get a stable connection to Sybase via the iODBC drivers. > > - The Sybase ODBC connection - including a query - have been verified at > the iODBC level. > - The setup is already working well for ODBC connection to MySQL. > > Symptoms include: > > - If I click on "Open Connection", it still comes back with "Connection > Closed" when I go to a ZSQL method > - Using 'Connect on Demand' is not working either. > - Clicking "Open Connection" gives me the following error: > > Connection string: DSN=lixbox_sybase; > UID=sa; > PWD=XXXXXXX Try writing the connection string on one line and without whitespace. ODBC drivers sometimes have problems with this. > Connection pool entry: 0 > Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection > rejected by data source', 7952) This is a generic error that relates to authentication or firewall problems. It is possible that turning on ODBC tracing the ODBC manager will give more clues as to the real cause of the problem. > The odbc.ini definition for DSN "lixbox_sybase" is as follows: > > [lixbox_sybase] > JetFix = No > NoRowSetSizeLimit = No > Description = Test connection to listbox > Options = LIXBOX > DSQUERY = SQLSERVER > TDSHOST = lixbox > TDSPORT = 5000 > TDSVER = 5.0 > SQLSERVER_CATALOG = N > CURSOR_SENSITIVITY = LOW > UserName = sa > Password = XXXXXXXX > ServerType = Sybase 10/11/12 > Driver = /opt/openlink/lib/sql_mt_lt.so > Database = pubs2 > ReadOnly = no > NoAutoCommit = No > NoLoginBox = No > FetchBufferSize = 60 > > > Other relevant data: > - Connecting via OpenLink's iODBC > - Zope 2.7.6-final > - Python 2.3.4 > - Connection to Sybase has been successfully tested with iODBC, > including issuing a query > - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC > connection > > > > RJ Juneau > Chief Technology Officer > Maxxian Integration Inc. > 155 Westhampton Drive > Thornhill, Ontario > Canada L4J 7X2 > E-mail: rj@maxxian.com > Phone: +1 905 482 9429 > Cell: +1 416 897 6682 > Toll free: +1 866 758 9161 > Fax: +1 647 722 2038 > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 06 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From calisp at gmail.com Sun May 15 23:49:03 2005 From: calisp at gmail.com (calisp@gmail.com) Date: Fri Jan 20 16:01:02 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK Message-ID: Hi, I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the following error... 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the last phase of a two-phase commit. This shouldn't happen. Traceback (most recent call last): File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one jar.tpc_finish(self) File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish try: self._finish() File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could not perform COMMIT or ROLLBACK', 1023) What could be causing this? Can I get the mxODBCZopeDA source from somewhere? It would make debugging this much easier. Thanks, Calisp. From mal at egenix.com Mon May 16 13:52:12 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 20 16:01:02 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK In-Reply-To: References: Message-ID: <42887B5C.4010109@egenix.com> calisp@gmail.com wrote: > Hi, > > I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with > unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the > following error... > > 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the > last phase of a two-phase commit. This shouldn't happen. > Traceback (most recent call last): > File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one > jar.tpc_finish(self) > File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish > try: self._finish() > File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish > File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler > ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could > not perform COMMIT or ROLLBACK', 1023) You should have a look at the database logs to see what prevented the commit from being completed. > What could be causing this? Hard to say: mxODBCZopeDA is trying to commit the transaction, but the driver or database failed to complete the request. The above error was generated by the ODBC driver. This could be network or DNS problems, or be related to a bug in FreeTDS (which is getting more stable with every new release, but should still be considered beta quality software at the moment). > Can I get the mxODBCZopeDA source from > somewhere? It would make debugging this much easier. Getting the source is not an option and won't help much either since the source of the problem is not mxODBCZopeDA. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 16 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Sun May 1 21:29:25 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 20 20:00:58 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <427259F3.4090806@egenix.com> References: <20050427130906.52878.qmail@web30008.mail.mud.yahoo.com> <427259F3.4090806@egenix.com> Message-ID: <42752005.7080904@egenix.com> M.-A. Lemburg wrote: > David Rushby wrote: > >> --- "M.-A. Lemburg" wrote: >> >>> Are you using the standard mxDateTime build or one >>> with WANT_SUBCLASSABLE_TYPES defined... >> >> >> >> Presumably "the standard", since I just built with 'py24d setup.py >> build', making no attempt to enable special directives. >> >> >>> ... (mxDateTime_Deallocate is only used by the latter)? >> >> >> >> That's true in 2.1.0-2005-04-15, but not in 2.1.0b5. >> >> >>> In any case, please try our latest snapshot: >>> >>> >> >> http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-04-15.zip >> >>> to see if that makes any difference. >> >> >> >> I can't build it out of the box: > > > Hmm, looks like distutils' sdist command doesn't like our new > repository layout which uses symlinks (after we've switched to > subversion). > > We'll have to debug distutils first, I guess :-( Ok, we've found the problem and fixed it. Here's the new release (which does build out of the box at least on our boxes ;-): http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 01 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From davidrushby at yahoo.com Mon May 2 15:49:53 2005 From: davidrushby at yahoo.com (David Rushby) Date: Fri Jan 20 20:00:58 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Ok, we've found the problem and fixed it. Here's the new > release (which does build out of the box at least on our > boxes ;-): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip It does build now, but: py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" still behaves as it did when I submitted my original message: Fatal Python error: UNREF invalid object Aborted This is the same debug build of Python 2.4.1 that I was previously using, running the same configuration (CentOS Linux 4.0/i386, everything compiled with GCC 3.4.3). Have you examined my original claim as to the cause of the bug? __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 10:21:55 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 20 20:00:58 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> References: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> Message-ID: <42772693.8050306@egenix.com> David Rushby wrote: > --- "M.-A. Lemburg" wrote: > >>Ok, we've found the problem and fixed it. Here's the new >>release (which does build out of the box at least on our >>boxes ;-): >> >> > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip > > It does build now, but: > py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" > still behaves as it did when I submitted my original message: > Fatal Python error: UNREF invalid object > Aborted > > This is the same debug build of Python 2.4.1 that I was previously > using, running the same configuration (CentOS Linux 4.0/i386, > everything compiled with GCC 3.4.3). > > Have you examined my original claim as to the cause of the bug? No. We haven't had time for looking into it. I'm not sure whether your analysis of the problem is correct: if you don't define WANT_SUBCLASSABLE_TYPES, the API mxDateTime_Deallocate() is neither defined nor used. Furthermore, PyObject_Del() is only called by mxDateTime_Free() if you have explicitely edited mxDateTime.c to disabled the free list #defines. In a standard build, PyObject_Del() is only called at module finalization time. Note that the reason we call mxDateTime_Free() in the constructor is that we don't want the destructor of the object to be called. Py_DECREF() would call the destructor (mxDateTime_Deallocate). It is possible that the debug code in Python complains about the refcount in the object not being 0 at the time the object is finalized (module finalization time), but I don't see any such checks in PyObject_Free() (which is what PyObject_Del() maps to). Again, all of this does not happen in regular non-debug Python builds. Please be aware that we don't support debug builds, so fixing the problem (if there is one - gcc has some serious optimization problems on some combinations of platform and version) will take a while. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 09:27:37 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Fri Jan 20 20:00:58 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 Message-ID: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Hi all- I am trying to build the mx-base package, v.2.0.6. This will be used with postgresql 7.3.9, psycopg 1.1.18, and Roundup 0.8.2. RHEL 3.0 Python 2.3 egenix-mx-base-2.0.6.tar.gz I performed a: /usr/local/bin/python2.3 setup.py install Everything looks proper with the exeception of this series of warning statements: ----------------- gcc -pthread -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fno-strict-aliasing -fPIC -Imx/BeeBase/mxBeeBase -I/usr/local/incl ude/python2.3 -I/usr/local/include -c mx/BeeBase/mxBeeBase/btr.c -o build/temp.linux-i686-2.3/mx/BeeBase/mxBeeBase/mxBeeBa se/mx/BeeBase/mxBeeBase/btr.o mx/BeeBase/mxBeeBase/btr.c: In function `dumpBuf': mx/BeeBase/mxBeeBase/btr.c:249: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:250: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:255: warning: unsigned int format, long unsigned int arg (arg 4) mx/BeeBase/mxBeeBase/btr.c:256: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c: In function `_validateTree': mx/BeeBase/mxBeeBase/btr.c:330: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:337: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:339: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:349: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:351: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 3) creating build/lib.linux-i686-2.3/mx/BeeBase creating build/lib.linux-i686-2.3/mx/BeeBase/mxBeeBase -------------- Would someone be kind enough to let me know whether these messages were expected, and if not, how I might resolve these? Thanks! DC __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 22:06:33 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 20 20:00:58 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> References: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Message-ID: <4277CBB9.8020302@egenix.com> Dianne Chen wrote: > Hi all- > > I am trying to build the mx-base package, v.2.0.6. > This will be used with postgresql 7.3.9, psycopg > 1.1.18, and Roundup 0.8.2. > > RHEL 3.0 > Python 2.3 > egenix-mx-base-2.0.6.tar.gz > > I performed a: > > /usr/local/bin/python2.3 setup.py install > > Everything looks proper with the exeception of this > series of warning statements: > > ----------------- > ... > -------------- > > Would someone be kind enough to let me know whether > these messages were expected, and if not, how I might > resolve these? These warning can safely be ignored. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 13:41:14 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Fri Jan 20 20:00:58 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: 6667 Message-ID: <20050503194114.72091.qmail@web31414.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Dianne Chen wrote: > > Hi all- > > > > I am trying to build the mx-base package, v.2.0.6. > > This will be used with postgresql 7.3.9, psycopg > > 1.1.18, and Roundup 0.8.2. > > > > RHEL 3.0 > > Python 2.3 > > egenix-mx-base-2.0.6.tar.gz > > > > I performed a: > > > > /usr/local/bin/python2.3 setup.py install > > > > Everything looks proper with the exeception of > this > > series of warning statements: > > > > ----------------- > > ... > > -------------- > > > > Would someone be kind enough to let me know > whether > > these messages were expected, and if not, how I > might > > resolve these? > > These warning can safely be ignored. > > -- > Marc-Andre Lemburg > eGenix.com > Marc- Thank you very much for the reply. It helps greatly. With kind regards, DC __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From davidrushby at yahoo.com Tue May 3 17:18:46 2005 From: davidrushby at yahoo.com (David Rushby) Date: Fri Jan 20 20:00:58 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050503231846.35012.qmail@web30009.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > I'm not sure whether your analysis of the problem is correct... Indeed, my original analysis wasn't correct; I think this one is. The fatal error I'm complaining about only arises if the arguments to DateTime.DateTime are invalid, so that the object is deallocated in the onError block of mxDateTime_FromDateAndTime. If the object is created successfully, and later deallocated by Python's garbage collector, the fatal error doesn't arise. Here's my analysis of the problem: --- If the debugging directive Py_TRACE_REFS is enabled, as it is in my case, the Python interpreter maintains a doubly linked list of all Python objects (named refchain) via the _ob_next and _ob_prev pointers added to PyObject via _PyObject_HEAD_EXTRA. Each object is inserted into refchain by the _Py_AddToAllObjects call in _Py_NewReference, and removed from refchain by the _Py_ForgetReference call in _Py_Dealloc. _Py_ForgetReference performs an integrity check on the object being deallocated (op) to make sure that its neighbors in refchain recognize it. Specifically, _Py_ForgetReference verifies that the _ob_next pointer of the previous object in refchain (op->_ob_prev->_ob_next) points to op, and that the _ob_prev pointer of the next object in refchain (op->_ob_next->_ob_prev) points to op. If either of those conditions is false, the interpreter raises the fatal error I'm seeing. After mxDateTime_New pulls an mxDateTimeObject out of the free list, it calls _Py_NewReference on that object to transform it from a "conceptually deallocated" object to a "conceptually allocated" one. _Py_NewReference inserts the object into refchain. Later, when the object is being "conceptually deallocated", it should be removed from refchain with _Py_ForgetReference. The version of _Py_Dealloc that's active when Py_TRACE_REFS is enabled does this (_Py_Dealloc is the element of Py_DECREF that performs the actual destruction). _Py_Dealloc first calls _Py_ForgetReference to remove the object from refchain, then calls the object's destructor (op->ob_type->tp_dealloc). If WANT_SUBCLASSABLE_TYPES is not defined (it is not in my case), the destructor for mxDateTime_Type is mxDateTime_Free. So, if a DateTime object is deallocated normally, as a result of its reference count falling to zero, _Py_Dealloc is called on the object, which first removes it from refchain, then passes it to mxDateTime_Free. If a DateTime object is destroyed prematurely, as a result of invalid arguments to its destructor, the onError handler calls mxDateTime_Free, so the object is "conceptually deallocated" (placed in the free list), *but* the object is not removed from refchain. So if a refchain-membership-integrity-check is performed on the object in question or one of its immediate neighbors in refchain, that integrity check fails, leading to the fatal error. --- The solution is to 'Py_DECREF(...)' the object in the onError handler of its constructor, instead of passing the object directly to mxDateTime_Free. That change solves two problems: 1) It causes _Py_Dealloc to execute, which in turn executes _Py_ForgetReference, so the object is removed from refchain, as it should be. 2) At present, objects that are created successfully and later deallocated by normal reference count mechanics have a reference count of 0 when they enter the free list, whereas objects whose constructors abort their creation due to invalid arguments have a reference count of 1 when they enter the free list. Although AFAIK this doesn't cause an actual execution problem (because the object's reference count is *explicitly set to 1* rather than *incremented by 1* when the object is later "conceptually allocated" by _Py_NewReference), it is likely to confuse future maintainers and thereby lead to the introduction of an actual execution problem. I assume that if you agree that this is a reasonable solution, you'll want to apply the change not only to mxDateTime_FromDateAndTime, but to all similar constructors in mxDateTime.c. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From rj at maxxian.com Thu May 5 01:57:40 2005 From: rj at maxxian.com (RJ Juneau) Date: Fri Jan 20 20:00:58 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c5512e$f72798c0$6505a8c0@rjlaptop> I'm on the 30 day evaluation for mxodbc_zope_da. I'm getting the following error when I submit some queries: Error Type: KeyError Error Value: 'query' I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 with UCS4. The error seems to be caused by multiple rows being returned. I did see an earlier posting with the same error message. The response suggested a template error, but this is clearly not the case here. The additional evidence I've gathered so far: - I'm running the test directly from the ZSQL method, so there's no template involved. - If I use the same query with an additional "where" clause to ensure that only one row is returned, it works - If I use a value in the 'where' clause with no rows returned, it works - The same ZSQL query is being used on a Windows machine running Zope and the free ZODBC module without a problem - The query has been verified directly in mysql-client-browser Other info: - The database is MySQL 4.1.10A-0 - iODBC is the DB driver RJ Juneau -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050505/68d278bf/attachment-0032.htm From mal at egenix.com Thu May 5 12:37:43 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 20 20:00:58 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c5512e$f72798c0$6505a8c0@rjlaptop> References: <000301c5512e$f72798c0$6505a8c0@rjlaptop> Message-ID: <4279E967.6010904@egenix.com> RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 > with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 09:37:42 2005 From: rj at maxxian.com (RJ Juneau) Date: Fri Jan 20 20:00:58 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000101c5516f$3b96de90$6505a8c0@rjlaptop> More interesting info on the problem: If I execute the query directly in the "test" window of the base eGenix mxODBC Database Connection window, it works fine and returns the 20 lines expected. That could point to a problem in the rendering, which seems to be where the traceback ends. Note that within the same Zope system I also have an ODBC connection to a Sybase database, and I have successfully tested multi-line ZSQL queries there. This is the traceback: Time 2005/05/05 07:55:15.294 GMT-4 Exception Type KeyError Exception Value 'query' Traceback (innermost last): Module ZPublisher.Publish, line 101, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 39, in call_object Module Shared.DC.ZRDB.DA, line 337, in manage_test Module DocumentTemplate.DT_String, line 474, in __call__ Module DocumentTemplate.DT_In, line 602, in renderwb Module DocumentTemplate.DT_Var, line 219, in render KeyError: 'query' I don't think the following is an issue, but I'll include it for completeness.I am also getting the following iODBC warnings and errors in the Zope console log, which are related to the ODBC parameters being passed by iODBC. Note that these errors also appear for all of the successful queries. [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (Setup). [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (UsageCount). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Timeout). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Reuse). As for the ZSQL snippet from the template... Since there's no template involved yet (I'm still testing directly from the ZSQL method), I assume you mean the SQL code? select h.host_name, s.system_name, s.system_handle, count(*) from terminal t, system_map s, host h where t.system_index = s.system_index and s.host_index = h.host_index group by s.system_name order by h.host_name Nothing complicated here. There are no parameters passed to the query. RJ -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: May 5, 2005 5:38 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: Re: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is > 2.3.4 with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ---------------------------------------------------------------------- > -- > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 16:00:32 2005 From: charlie at egenix.com (Charlie Clark) Date: Fri Jan 20 20:00:58 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000101c5516f$3b96de90$6505a8c0@rjlaptop> References: <000101c5516f$3b96de90$6505a8c0@rjlaptop> Message-ID: <20050505150032.644.1@bepc.1115296715.fake> On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base eGenix > mxODBC Database Connection window, it works fine and returns the 20 > lines expected. That could point to a problem in the rendering, which > seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection to > a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 10:22:17 2005 From: rj at maxxian.com (RJ Juneau) Date: Fri Jan 20 20:00:58 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505150032.644.1@bepc.1115296715.fake> Message-ID: <000201c55175$75bcad10$6505a8c0@rjlaptop> At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 11:47:14 2005 From: rj at maxxian.com (RJ Juneau) Date: Fri Jan 20 20:00:58 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c55181$549be0e0$6505a8c0@rjlaptop> Charlie, I found a fix. Here it is in case anyone else runs into this. You were correct - the problem is in another part of Zope. Based on your feedback, I did a bit more searching and found something here: http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. html The problem appears to be in Zope versions after 2.7.0. I'm running 2.7.6, and the post indicates that it also happens in 2.7.4. The solution: Edit file /lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. There are two lines in the file that start with . Edit them as follows: Change first line to: Change second line to: Just to be after, I shut down Zope before I made the changes and restarted it after. Thanks for the help! RJ -----Original Message----- From: RJ Juneau [mailto:rj@maxxian.com] Sent: May 5, 2005 9:22 AM To: 'Charlie Clark' Cc: 'egenix-users@lists.egenix.com' Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 17:57:25 2005 From: charlie at egenix.com (Charlie Clark) Date: Fri Jan 20 20:00:58 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <20050505165725.3380.2@bepc.1115296715.fake> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Thu May 5 09:15:21 2005 From: charlie at egenix.com (Charlie Clark) Date: Fri Jan 20 20:00:58 2006 Subject: [Zope-DB] RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <000001c55185$41477730$6b00a8c0@fonacier.local> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________ Zope-DB mailing list Zope-DB@zope.org http://mail.zope.org/mailman/listinfo/zope-db From rj at maxxian.com Thu May 5 12:38:00 2005 From: rj at maxxian.com (RJ Juneau) Date: Fri Jan 20 20:00:58 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000001c55188$6b841eb0$6505a8c0@rjlaptop> I just double-checked. Zope-2.7.6-final. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 12:49:16 2005 From: rj at maxxian.com (RJ Juneau) Date: Fri Jan 20 20:00:58 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000501c55189$fe149ba0$6505a8c0@rjlaptop> Charlie, The fix has only been applied for 2.7.7, 2.8b2. The info is in the original bug report which is closed and can be found here: http://www.zope.org/Collectors/Zope/1745 RJ -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Fri May 6 11:50:09 2005 From: rj at maxxian.com (RJ Juneau) Date: Fri Jan 20 20:00:58 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC Message-ID: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Still on eval for the product. I cannot get a stable connection to Sybase via the iODBC drivers. - The Sybase ODBC connection - including a query - have been verified at the iODBC level. - The setup is already working well for ODBC connection to MySQL. Symptoms include: - If I click on "Open Connection", it still comes back with "Connection Closed" when I go to a ZSQL method - Using 'Connect on Demand' is not working either. - Clicking "Open Connection" gives me the following error: Connection string: DSN=lixbox_sybase; UID=sa; PWD=XXXXXXX Connection pool entry: 0 Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection rejected by data source', 7952) The odbc.ini definition for DSN "lixbox_sybase" is as follows: [lixbox_sybase] JetFix = No NoRowSetSizeLimit = No Description = Test connection to listbox Options = LIXBOX DSQUERY = SQLSERVER TDSHOST = lixbox TDSPORT = 5000 TDSVER = 5.0 SQLSERVER_CATALOG = N CURSOR_SENSITIVITY = LOW UserName = sa Password = XXXXXXXX ServerType = Sybase 10/11/12 Driver = /opt/openlink/lib/sql_mt_lt.so Database = pubs2 ReadOnly = no NoAutoCommit = No NoLoginBox = No FetchBufferSize = 60 Other relevant data: - Connecting via OpenLink's iODBC - Zope 2.7.6-final - Python 2.3.4 - Connection to Sybase has been successfully tested with iODBC, including issuing a query - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC connection RJ Juneau Chief Technology Officer Maxxian Integration Inc. 155 Westhampton Drive Thornhill, Ontario Canada L4J 7X2 E-mail: rj@maxxian.com Phone: +1 905 482 9429 Cell: +1 416 897 6682 Toll free: +1 866 758 9161 Fax: +1 647 722 2038 -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050506/aef33361/attachment-0032.htm From mal at egenix.com Fri May 6 18:27:37 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 20 20:00:58 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC In-Reply-To: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> References: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Message-ID: <427B8CE9.1010601@egenix.com> RJ Juneau wrote: > Still on eval for the product. > > I cannot get a stable connection to Sybase via the iODBC drivers. > > - The Sybase ODBC connection - including a query - have been verified at > the iODBC level. > - The setup is already working well for ODBC connection to MySQL. > > Symptoms include: > > - If I click on "Open Connection", it still comes back with "Connection > Closed" when I go to a ZSQL method > - Using 'Connect on Demand' is not working either. > - Clicking "Open Connection" gives me the following error: > > Connection string: DSN=lixbox_sybase; > UID=sa; > PWD=XXXXXXX Try writing the connection string on one line and without whitespace. ODBC drivers sometimes have problems with this. > Connection pool entry: 0 > Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection > rejected by data source', 7952) This is a generic error that relates to authentication or firewall problems. It is possible that turning on ODBC tracing the ODBC manager will give more clues as to the real cause of the problem. > The odbc.ini definition for DSN "lixbox_sybase" is as follows: > > [lixbox_sybase] > JetFix = No > NoRowSetSizeLimit = No > Description = Test connection to listbox > Options = LIXBOX > DSQUERY = SQLSERVER > TDSHOST = lixbox > TDSPORT = 5000 > TDSVER = 5.0 > SQLSERVER_CATALOG = N > CURSOR_SENSITIVITY = LOW > UserName = sa > Password = XXXXXXXX > ServerType = Sybase 10/11/12 > Driver = /opt/openlink/lib/sql_mt_lt.so > Database = pubs2 > ReadOnly = no > NoAutoCommit = No > NoLoginBox = No > FetchBufferSize = 60 > > > Other relevant data: > - Connecting via OpenLink's iODBC > - Zope 2.7.6-final > - Python 2.3.4 > - Connection to Sybase has been successfully tested with iODBC, > including issuing a query > - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC > connection > > > > RJ Juneau > Chief Technology Officer > Maxxian Integration Inc. > 155 Westhampton Drive > Thornhill, Ontario > Canada L4J 7X2 > E-mail: rj@maxxian.com > Phone: +1 905 482 9429 > Cell: +1 416 897 6682 > Toll free: +1 866 758 9161 > Fax: +1 647 722 2038 > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 06 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From calisp at gmail.com Sun May 15 23:49:03 2005 From: calisp at gmail.com (calisp@gmail.com) Date: Fri Jan 20 20:00:58 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK Message-ID: Hi, I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the following error... 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the last phase of a two-phase commit. This shouldn't happen. Traceback (most recent call last): File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one jar.tpc_finish(self) File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish try: self._finish() File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could not perform COMMIT or ROLLBACK', 1023) What could be causing this? Can I get the mxODBCZopeDA source from somewhere? It would make debugging this much easier. Thanks, Calisp. From mal at egenix.com Mon May 16 13:52:12 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 20 20:00:58 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK In-Reply-To: References: Message-ID: <42887B5C.4010109@egenix.com> calisp@gmail.com wrote: > Hi, > > I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with > unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the > following error... > > 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the > last phase of a two-phase commit. This shouldn't happen. > Traceback (most recent call last): > File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one > jar.tpc_finish(self) > File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish > try: self._finish() > File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish > File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler > ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could > not perform COMMIT or ROLLBACK', 1023) You should have a look at the database logs to see what prevented the commit from being completed. > What could be causing this? Hard to say: mxODBCZopeDA is trying to commit the transaction, but the driver or database failed to complete the request. The above error was generated by the ODBC driver. This could be network or DNS problems, or be related to a bug in FreeTDS (which is getting more stable with every new release, but should still be considered beta quality software at the moment). > Can I get the mxODBCZopeDA source from > somewhere? It would make debugging this much easier. Getting the source is not an option and won't help much either since the source of the problem is not mxODBCZopeDA. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 16 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Sun May 1 21:29:25 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 21 08:04:12 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <427259F3.4090806@egenix.com> References: <20050427130906.52878.qmail@web30008.mail.mud.yahoo.com> <427259F3.4090806@egenix.com> Message-ID: <42752005.7080904@egenix.com> M.-A. Lemburg wrote: > David Rushby wrote: > >> --- "M.-A. Lemburg" wrote: >> >>> Are you using the standard mxDateTime build or one >>> with WANT_SUBCLASSABLE_TYPES defined... >> >> >> >> Presumably "the standard", since I just built with 'py24d setup.py >> build', making no attempt to enable special directives. >> >> >>> ... (mxDateTime_Deallocate is only used by the latter)? >> >> >> >> That's true in 2.1.0-2005-04-15, but not in 2.1.0b5. >> >> >>> In any case, please try our latest snapshot: >>> >>> >> >> http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-04-15.zip >> >>> to see if that makes any difference. >> >> >> >> I can't build it out of the box: > > > Hmm, looks like distutils' sdist command doesn't like our new > repository layout which uses symlinks (after we've switched to > subversion). > > We'll have to debug distutils first, I guess :-( Ok, we've found the problem and fixed it. Here's the new release (which does build out of the box at least on our boxes ;-): http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 01 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From davidrushby at yahoo.com Mon May 2 15:49:53 2005 From: davidrushby at yahoo.com (David Rushby) Date: Sat Jan 21 08:04:12 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Ok, we've found the problem and fixed it. Here's the new > release (which does build out of the box at least on our > boxes ;-): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip It does build now, but: py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" still behaves as it did when I submitted my original message: Fatal Python error: UNREF invalid object Aborted This is the same debug build of Python 2.4.1 that I was previously using, running the same configuration (CentOS Linux 4.0/i386, everything compiled with GCC 3.4.3). Have you examined my original claim as to the cause of the bug? __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 10:21:55 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 21 08:04:12 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> References: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> Message-ID: <42772693.8050306@egenix.com> David Rushby wrote: > --- "M.-A. Lemburg" wrote: > >>Ok, we've found the problem and fixed it. Here's the new >>release (which does build out of the box at least on our >>boxes ;-): >> >> > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip > > It does build now, but: > py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" > still behaves as it did when I submitted my original message: > Fatal Python error: UNREF invalid object > Aborted > > This is the same debug build of Python 2.4.1 that I was previously > using, running the same configuration (CentOS Linux 4.0/i386, > everything compiled with GCC 3.4.3). > > Have you examined my original claim as to the cause of the bug? No. We haven't had time for looking into it. I'm not sure whether your analysis of the problem is correct: if you don't define WANT_SUBCLASSABLE_TYPES, the API mxDateTime_Deallocate() is neither defined nor used. Furthermore, PyObject_Del() is only called by mxDateTime_Free() if you have explicitely edited mxDateTime.c to disabled the free list #defines. In a standard build, PyObject_Del() is only called at module finalization time. Note that the reason we call mxDateTime_Free() in the constructor is that we don't want the destructor of the object to be called. Py_DECREF() would call the destructor (mxDateTime_Deallocate). It is possible that the debug code in Python complains about the refcount in the object not being 0 at the time the object is finalized (module finalization time), but I don't see any such checks in PyObject_Free() (which is what PyObject_Del() maps to). Again, all of this does not happen in regular non-debug Python builds. Please be aware that we don't support debug builds, so fixing the problem (if there is one - gcc has some serious optimization problems on some combinations of platform and version) will take a while. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 09:27:37 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Sat Jan 21 08:04:12 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 Message-ID: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Hi all- I am trying to build the mx-base package, v.2.0.6. This will be used with postgresql 7.3.9, psycopg 1.1.18, and Roundup 0.8.2. RHEL 3.0 Python 2.3 egenix-mx-base-2.0.6.tar.gz I performed a: /usr/local/bin/python2.3 setup.py install Everything looks proper with the exeception of this series of warning statements: ----------------- gcc -pthread -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fno-strict-aliasing -fPIC -Imx/BeeBase/mxBeeBase -I/usr/local/incl ude/python2.3 -I/usr/local/include -c mx/BeeBase/mxBeeBase/btr.c -o build/temp.linux-i686-2.3/mx/BeeBase/mxBeeBase/mxBeeBa se/mx/BeeBase/mxBeeBase/btr.o mx/BeeBase/mxBeeBase/btr.c: In function `dumpBuf': mx/BeeBase/mxBeeBase/btr.c:249: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:250: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:255: warning: unsigned int format, long unsigned int arg (arg 4) mx/BeeBase/mxBeeBase/btr.c:256: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c: In function `_validateTree': mx/BeeBase/mxBeeBase/btr.c:330: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:337: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:339: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:349: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:351: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 3) creating build/lib.linux-i686-2.3/mx/BeeBase creating build/lib.linux-i686-2.3/mx/BeeBase/mxBeeBase -------------- Would someone be kind enough to let me know whether these messages were expected, and if not, how I might resolve these? Thanks! DC __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 22:06:33 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 21 08:04:12 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> References: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Message-ID: <4277CBB9.8020302@egenix.com> Dianne Chen wrote: > Hi all- > > I am trying to build the mx-base package, v.2.0.6. > This will be used with postgresql 7.3.9, psycopg > 1.1.18, and Roundup 0.8.2. > > RHEL 3.0 > Python 2.3 > egenix-mx-base-2.0.6.tar.gz > > I performed a: > > /usr/local/bin/python2.3 setup.py install > > Everything looks proper with the exeception of this > series of warning statements: > > ----------------- > ... > -------------- > > Would someone be kind enough to let me know whether > these messages were expected, and if not, how I might > resolve these? These warning can safely be ignored. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 13:41:14 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Sat Jan 21 08:04:12 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: 6667 Message-ID: <20050503194114.72091.qmail@web31414.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Dianne Chen wrote: > > Hi all- > > > > I am trying to build the mx-base package, v.2.0.6. > > This will be used with postgresql 7.3.9, psycopg > > 1.1.18, and Roundup 0.8.2. > > > > RHEL 3.0 > > Python 2.3 > > egenix-mx-base-2.0.6.tar.gz > > > > I performed a: > > > > /usr/local/bin/python2.3 setup.py install > > > > Everything looks proper with the exeception of > this > > series of warning statements: > > > > ----------------- > > ... > > -------------- > > > > Would someone be kind enough to let me know > whether > > these messages were expected, and if not, how I > might > > resolve these? > > These warning can safely be ignored. > > -- > Marc-Andre Lemburg > eGenix.com > Marc- Thank you very much for the reply. It helps greatly. With kind regards, DC __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From davidrushby at yahoo.com Tue May 3 17:18:46 2005 From: davidrushby at yahoo.com (David Rushby) Date: Sat Jan 21 08:04:12 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050503231846.35012.qmail@web30009.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > I'm not sure whether your analysis of the problem is correct... Indeed, my original analysis wasn't correct; I think this one is. The fatal error I'm complaining about only arises if the arguments to DateTime.DateTime are invalid, so that the object is deallocated in the onError block of mxDateTime_FromDateAndTime. If the object is created successfully, and later deallocated by Python's garbage collector, the fatal error doesn't arise. Here's my analysis of the problem: --- If the debugging directive Py_TRACE_REFS is enabled, as it is in my case, the Python interpreter maintains a doubly linked list of all Python objects (named refchain) via the _ob_next and _ob_prev pointers added to PyObject via _PyObject_HEAD_EXTRA. Each object is inserted into refchain by the _Py_AddToAllObjects call in _Py_NewReference, and removed from refchain by the _Py_ForgetReference call in _Py_Dealloc. _Py_ForgetReference performs an integrity check on the object being deallocated (op) to make sure that its neighbors in refchain recognize it. Specifically, _Py_ForgetReference verifies that the _ob_next pointer of the previous object in refchain (op->_ob_prev->_ob_next) points to op, and that the _ob_prev pointer of the next object in refchain (op->_ob_next->_ob_prev) points to op. If either of those conditions is false, the interpreter raises the fatal error I'm seeing. After mxDateTime_New pulls an mxDateTimeObject out of the free list, it calls _Py_NewReference on that object to transform it from a "conceptually deallocated" object to a "conceptually allocated" one. _Py_NewReference inserts the object into refchain. Later, when the object is being "conceptually deallocated", it should be removed from refchain with _Py_ForgetReference. The version of _Py_Dealloc that's active when Py_TRACE_REFS is enabled does this (_Py_Dealloc is the element of Py_DECREF that performs the actual destruction). _Py_Dealloc first calls _Py_ForgetReference to remove the object from refchain, then calls the object's destructor (op->ob_type->tp_dealloc). If WANT_SUBCLASSABLE_TYPES is not defined (it is not in my case), the destructor for mxDateTime_Type is mxDateTime_Free. So, if a DateTime object is deallocated normally, as a result of its reference count falling to zero, _Py_Dealloc is called on the object, which first removes it from refchain, then passes it to mxDateTime_Free. If a DateTime object is destroyed prematurely, as a result of invalid arguments to its destructor, the onError handler calls mxDateTime_Free, so the object is "conceptually deallocated" (placed in the free list), *but* the object is not removed from refchain. So if a refchain-membership-integrity-check is performed on the object in question or one of its immediate neighbors in refchain, that integrity check fails, leading to the fatal error. --- The solution is to 'Py_DECREF(...)' the object in the onError handler of its constructor, instead of passing the object directly to mxDateTime_Free. That change solves two problems: 1) It causes _Py_Dealloc to execute, which in turn executes _Py_ForgetReference, so the object is removed from refchain, as it should be. 2) At present, objects that are created successfully and later deallocated by normal reference count mechanics have a reference count of 0 when they enter the free list, whereas objects whose constructors abort their creation due to invalid arguments have a reference count of 1 when they enter the free list. Although AFAIK this doesn't cause an actual execution problem (because the object's reference count is *explicitly set to 1* rather than *incremented by 1* when the object is later "conceptually allocated" by _Py_NewReference), it is likely to confuse future maintainers and thereby lead to the introduction of an actual execution problem. I assume that if you agree that this is a reasonable solution, you'll want to apply the change not only to mxDateTime_FromDateAndTime, but to all similar constructors in mxDateTime.c. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From rj at maxxian.com Thu May 5 01:57:40 2005 From: rj at maxxian.com (RJ Juneau) Date: Sat Jan 21 08:04:12 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c5512e$f72798c0$6505a8c0@rjlaptop> I'm on the 30 day evaluation for mxodbc_zope_da. I'm getting the following error when I submit some queries: Error Type: KeyError Error Value: 'query' I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 with UCS4. The error seems to be caused by multiple rows being returned. I did see an earlier posting with the same error message. The response suggested a template error, but this is clearly not the case here. The additional evidence I've gathered so far: - I'm running the test directly from the ZSQL method, so there's no template involved. - If I use the same query with an additional "where" clause to ensure that only one row is returned, it works - If I use a value in the 'where' clause with no rows returned, it works - The same ZSQL query is being used on a Windows machine running Zope and the free ZODBC module without a problem - The query has been verified directly in mysql-client-browser Other info: - The database is MySQL 4.1.10A-0 - iODBC is the DB driver RJ Juneau -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050505/68d278bf/attachment-0033.htm From mal at egenix.com Thu May 5 12:37:43 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 21 08:04:12 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c5512e$f72798c0$6505a8c0@rjlaptop> References: <000301c5512e$f72798c0$6505a8c0@rjlaptop> Message-ID: <4279E967.6010904@egenix.com> RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 > with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 09:37:42 2005 From: rj at maxxian.com (RJ Juneau) Date: Sat Jan 21 08:04:12 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000101c5516f$3b96de90$6505a8c0@rjlaptop> More interesting info on the problem: If I execute the query directly in the "test" window of the base eGenix mxODBC Database Connection window, it works fine and returns the 20 lines expected. That could point to a problem in the rendering, which seems to be where the traceback ends. Note that within the same Zope system I also have an ODBC connection to a Sybase database, and I have successfully tested multi-line ZSQL queries there. This is the traceback: Time 2005/05/05 07:55:15.294 GMT-4 Exception Type KeyError Exception Value 'query' Traceback (innermost last): Module ZPublisher.Publish, line 101, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 39, in call_object Module Shared.DC.ZRDB.DA, line 337, in manage_test Module DocumentTemplate.DT_String, line 474, in __call__ Module DocumentTemplate.DT_In, line 602, in renderwb Module DocumentTemplate.DT_Var, line 219, in render KeyError: 'query' I don't think the following is an issue, but I'll include it for completeness.I am also getting the following iODBC warnings and errors in the Zope console log, which are related to the ODBC parameters being passed by iODBC. Note that these errors also appear for all of the successful queries. [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (Setup). [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (UsageCount). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Timeout). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Reuse). As for the ZSQL snippet from the template... Since there's no template involved yet (I'm still testing directly from the ZSQL method), I assume you mean the SQL code? select h.host_name, s.system_name, s.system_handle, count(*) from terminal t, system_map s, host h where t.system_index = s.system_index and s.host_index = h.host_index group by s.system_name order by h.host_name Nothing complicated here. There are no parameters passed to the query. RJ -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: May 5, 2005 5:38 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: Re: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is > 2.3.4 with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ---------------------------------------------------------------------- > -- > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 16:00:32 2005 From: charlie at egenix.com (Charlie Clark) Date: Sat Jan 21 08:04:12 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000101c5516f$3b96de90$6505a8c0@rjlaptop> References: <000101c5516f$3b96de90$6505a8c0@rjlaptop> Message-ID: <20050505150032.644.1@bepc.1115296715.fake> On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base eGenix > mxODBC Database Connection window, it works fine and returns the 20 > lines expected. That could point to a problem in the rendering, which > seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection to > a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 10:22:17 2005 From: rj at maxxian.com (RJ Juneau) Date: Sat Jan 21 08:04:13 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505150032.644.1@bepc.1115296715.fake> Message-ID: <000201c55175$75bcad10$6505a8c0@rjlaptop> At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 11:47:14 2005 From: rj at maxxian.com (RJ Juneau) Date: Sat Jan 21 08:04:13 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c55181$549be0e0$6505a8c0@rjlaptop> Charlie, I found a fix. Here it is in case anyone else runs into this. You were correct - the problem is in another part of Zope. Based on your feedback, I did a bit more searching and found something here: http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. html The problem appears to be in Zope versions after 2.7.0. I'm running 2.7.6, and the post indicates that it also happens in 2.7.4. The solution: Edit file /lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. There are two lines in the file that start with . Edit them as follows: Change first line to: Change second line to: Just to be after, I shut down Zope before I made the changes and restarted it after. Thanks for the help! RJ -----Original Message----- From: RJ Juneau [mailto:rj@maxxian.com] Sent: May 5, 2005 9:22 AM To: 'Charlie Clark' Cc: 'egenix-users@lists.egenix.com' Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 17:57:25 2005 From: charlie at egenix.com (Charlie Clark) Date: Sat Jan 21 08:04:13 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <20050505165725.3380.2@bepc.1115296715.fake> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Thu May 5 09:15:21 2005 From: charlie at egenix.com (Charlie Clark) Date: Sat Jan 21 08:04:13 2006 Subject: [Zope-DB] RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <000001c55185$41477730$6b00a8c0@fonacier.local> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________ Zope-DB mailing list Zope-DB@zope.org http://mail.zope.org/mailman/listinfo/zope-db From rj at maxxian.com Thu May 5 12:38:00 2005 From: rj at maxxian.com (RJ Juneau) Date: Sat Jan 21 08:04:13 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000001c55188$6b841eb0$6505a8c0@rjlaptop> I just double-checked. Zope-2.7.6-final. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 12:49:16 2005 From: rj at maxxian.com (RJ Juneau) Date: Sat Jan 21 08:04:13 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000501c55189$fe149ba0$6505a8c0@rjlaptop> Charlie, The fix has only been applied for 2.7.7, 2.8b2. The info is in the original bug report which is closed and can be found here: http://www.zope.org/Collectors/Zope/1745 RJ -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Fri May 6 11:50:09 2005 From: rj at maxxian.com (RJ Juneau) Date: Sat Jan 21 08:04:13 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC Message-ID: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Still on eval for the product. I cannot get a stable connection to Sybase via the iODBC drivers. - The Sybase ODBC connection - including a query - have been verified at the iODBC level. - The setup is already working well for ODBC connection to MySQL. Symptoms include: - If I click on "Open Connection", it still comes back with "Connection Closed" when I go to a ZSQL method - Using 'Connect on Demand' is not working either. - Clicking "Open Connection" gives me the following error: Connection string: DSN=lixbox_sybase; UID=sa; PWD=XXXXXXX Connection pool entry: 0 Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection rejected by data source', 7952) The odbc.ini definition for DSN "lixbox_sybase" is as follows: [lixbox_sybase] JetFix = No NoRowSetSizeLimit = No Description = Test connection to listbox Options = LIXBOX DSQUERY = SQLSERVER TDSHOST = lixbox TDSPORT = 5000 TDSVER = 5.0 SQLSERVER_CATALOG = N CURSOR_SENSITIVITY = LOW UserName = sa Password = XXXXXXXX ServerType = Sybase 10/11/12 Driver = /opt/openlink/lib/sql_mt_lt.so Database = pubs2 ReadOnly = no NoAutoCommit = No NoLoginBox = No FetchBufferSize = 60 Other relevant data: - Connecting via OpenLink's iODBC - Zope 2.7.6-final - Python 2.3.4 - Connection to Sybase has been successfully tested with iODBC, including issuing a query - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC connection RJ Juneau Chief Technology Officer Maxxian Integration Inc. 155 Westhampton Drive Thornhill, Ontario Canada L4J 7X2 E-mail: rj@maxxian.com Phone: +1 905 482 9429 Cell: +1 416 897 6682 Toll free: +1 866 758 9161 Fax: +1 647 722 2038 -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050506/aef33361/attachment-0033.htm From mal at egenix.com Fri May 6 18:27:37 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 21 08:04:13 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC In-Reply-To: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> References: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Message-ID: <427B8CE9.1010601@egenix.com> RJ Juneau wrote: > Still on eval for the product. > > I cannot get a stable connection to Sybase via the iODBC drivers. > > - The Sybase ODBC connection - including a query - have been verified at > the iODBC level. > - The setup is already working well for ODBC connection to MySQL. > > Symptoms include: > > - If I click on "Open Connection", it still comes back with "Connection > Closed" when I go to a ZSQL method > - Using 'Connect on Demand' is not working either. > - Clicking "Open Connection" gives me the following error: > > Connection string: DSN=lixbox_sybase; > UID=sa; > PWD=XXXXXXX Try writing the connection string on one line and without whitespace. ODBC drivers sometimes have problems with this. > Connection pool entry: 0 > Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection > rejected by data source', 7952) This is a generic error that relates to authentication or firewall problems. It is possible that turning on ODBC tracing the ODBC manager will give more clues as to the real cause of the problem. > The odbc.ini definition for DSN "lixbox_sybase" is as follows: > > [lixbox_sybase] > JetFix = No > NoRowSetSizeLimit = No > Description = Test connection to listbox > Options = LIXBOX > DSQUERY = SQLSERVER > TDSHOST = lixbox > TDSPORT = 5000 > TDSVER = 5.0 > SQLSERVER_CATALOG = N > CURSOR_SENSITIVITY = LOW > UserName = sa > Password = XXXXXXXX > ServerType = Sybase 10/11/12 > Driver = /opt/openlink/lib/sql_mt_lt.so > Database = pubs2 > ReadOnly = no > NoAutoCommit = No > NoLoginBox = No > FetchBufferSize = 60 > > > Other relevant data: > - Connecting via OpenLink's iODBC > - Zope 2.7.6-final > - Python 2.3.4 > - Connection to Sybase has been successfully tested with iODBC, > including issuing a query > - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC > connection > > > > RJ Juneau > Chief Technology Officer > Maxxian Integration Inc. > 155 Westhampton Drive > Thornhill, Ontario > Canada L4J 7X2 > E-mail: rj@maxxian.com > Phone: +1 905 482 9429 > Cell: +1 416 897 6682 > Toll free: +1 866 758 9161 > Fax: +1 647 722 2038 > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 06 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From calisp at gmail.com Sun May 15 23:49:03 2005 From: calisp at gmail.com (calisp@gmail.com) Date: Sat Jan 21 08:04:13 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK Message-ID: Hi, I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the following error... 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the last phase of a two-phase commit. This shouldn't happen. Traceback (most recent call last): File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one jar.tpc_finish(self) File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish try: self._finish() File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could not perform COMMIT or ROLLBACK', 1023) What could be causing this? Can I get the mxODBCZopeDA source from somewhere? It would make debugging this much easier. Thanks, Calisp. From mal at egenix.com Mon May 16 13:52:12 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 21 08:04:13 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK In-Reply-To: References: Message-ID: <42887B5C.4010109@egenix.com> calisp@gmail.com wrote: > Hi, > > I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with > unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the > following error... > > 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the > last phase of a two-phase commit. This shouldn't happen. > Traceback (most recent call last): > File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one > jar.tpc_finish(self) > File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish > try: self._finish() > File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish > File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler > ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could > not perform COMMIT or ROLLBACK', 1023) You should have a look at the database logs to see what prevented the commit from being completed. > What could be causing this? Hard to say: mxODBCZopeDA is trying to commit the transaction, but the driver or database failed to complete the request. The above error was generated by the ODBC driver. This could be network or DNS problems, or be related to a bug in FreeTDS (which is getting more stable with every new release, but should still be considered beta quality software at the moment). > Can I get the mxODBCZopeDA source from > somewhere? It would make debugging this much easier. Getting the source is not an option and won't help much either since the source of the problem is not mxODBCZopeDA. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 16 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Sun May 1 21:29:25 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 21 12:01:12 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <427259F3.4090806@egenix.com> References: <20050427130906.52878.qmail@web30008.mail.mud.yahoo.com> <427259F3.4090806@egenix.com> Message-ID: <42752005.7080904@egenix.com> M.-A. Lemburg wrote: > David Rushby wrote: > >> --- "M.-A. Lemburg" wrote: >> >>> Are you using the standard mxDateTime build or one >>> with WANT_SUBCLASSABLE_TYPES defined... >> >> >> >> Presumably "the standard", since I just built with 'py24d setup.py >> build', making no attempt to enable special directives. >> >> >>> ... (mxDateTime_Deallocate is only used by the latter)? >> >> >> >> That's true in 2.1.0-2005-04-15, but not in 2.1.0b5. >> >> >>> In any case, please try our latest snapshot: >>> >>> >> >> http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-04-15.zip >> >>> to see if that makes any difference. >> >> >> >> I can't build it out of the box: > > > Hmm, looks like distutils' sdist command doesn't like our new > repository layout which uses symlinks (after we've switched to > subversion). > > We'll have to debug distutils first, I guess :-( Ok, we've found the problem and fixed it. Here's the new release (which does build out of the box at least on our boxes ;-): http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 01 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From davidrushby at yahoo.com Mon May 2 15:49:53 2005 From: davidrushby at yahoo.com (David Rushby) Date: Sat Jan 21 12:01:12 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Ok, we've found the problem and fixed it. Here's the new > release (which does build out of the box at least on our > boxes ;-): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip It does build now, but: py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" still behaves as it did when I submitted my original message: Fatal Python error: UNREF invalid object Aborted This is the same debug build of Python 2.4.1 that I was previously using, running the same configuration (CentOS Linux 4.0/i386, everything compiled with GCC 3.4.3). Have you examined my original claim as to the cause of the bug? __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 10:21:55 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 21 12:01:12 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> References: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> Message-ID: <42772693.8050306@egenix.com> David Rushby wrote: > --- "M.-A. Lemburg" wrote: > >>Ok, we've found the problem and fixed it. Here's the new >>release (which does build out of the box at least on our >>boxes ;-): >> >> > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip > > It does build now, but: > py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" > still behaves as it did when I submitted my original message: > Fatal Python error: UNREF invalid object > Aborted > > This is the same debug build of Python 2.4.1 that I was previously > using, running the same configuration (CentOS Linux 4.0/i386, > everything compiled with GCC 3.4.3). > > Have you examined my original claim as to the cause of the bug? No. We haven't had time for looking into it. I'm not sure whether your analysis of the problem is correct: if you don't define WANT_SUBCLASSABLE_TYPES, the API mxDateTime_Deallocate() is neither defined nor used. Furthermore, PyObject_Del() is only called by mxDateTime_Free() if you have explicitely edited mxDateTime.c to disabled the free list #defines. In a standard build, PyObject_Del() is only called at module finalization time. Note that the reason we call mxDateTime_Free() in the constructor is that we don't want the destructor of the object to be called. Py_DECREF() would call the destructor (mxDateTime_Deallocate). It is possible that the debug code in Python complains about the refcount in the object not being 0 at the time the object is finalized (module finalization time), but I don't see any such checks in PyObject_Free() (which is what PyObject_Del() maps to). Again, all of this does not happen in regular non-debug Python builds. Please be aware that we don't support debug builds, so fixing the problem (if there is one - gcc has some serious optimization problems on some combinations of platform and version) will take a while. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 09:27:37 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Sat Jan 21 12:01:12 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 Message-ID: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Hi all- I am trying to build the mx-base package, v.2.0.6. This will be used with postgresql 7.3.9, psycopg 1.1.18, and Roundup 0.8.2. RHEL 3.0 Python 2.3 egenix-mx-base-2.0.6.tar.gz I performed a: /usr/local/bin/python2.3 setup.py install Everything looks proper with the exeception of this series of warning statements: ----------------- gcc -pthread -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fno-strict-aliasing -fPIC -Imx/BeeBase/mxBeeBase -I/usr/local/incl ude/python2.3 -I/usr/local/include -c mx/BeeBase/mxBeeBase/btr.c -o build/temp.linux-i686-2.3/mx/BeeBase/mxBeeBase/mxBeeBa se/mx/BeeBase/mxBeeBase/btr.o mx/BeeBase/mxBeeBase/btr.c: In function `dumpBuf': mx/BeeBase/mxBeeBase/btr.c:249: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:250: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:255: warning: unsigned int format, long unsigned int arg (arg 4) mx/BeeBase/mxBeeBase/btr.c:256: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c: In function `_validateTree': mx/BeeBase/mxBeeBase/btr.c:330: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:337: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:339: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:349: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:351: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 3) creating build/lib.linux-i686-2.3/mx/BeeBase creating build/lib.linux-i686-2.3/mx/BeeBase/mxBeeBase -------------- Would someone be kind enough to let me know whether these messages were expected, and if not, how I might resolve these? Thanks! DC __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 22:06:33 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 21 12:01:12 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> References: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Message-ID: <4277CBB9.8020302@egenix.com> Dianne Chen wrote: > Hi all- > > I am trying to build the mx-base package, v.2.0.6. > This will be used with postgresql 7.3.9, psycopg > 1.1.18, and Roundup 0.8.2. > > RHEL 3.0 > Python 2.3 > egenix-mx-base-2.0.6.tar.gz > > I performed a: > > /usr/local/bin/python2.3 setup.py install > > Everything looks proper with the exeception of this > series of warning statements: > > ----------------- > ... > -------------- > > Would someone be kind enough to let me know whether > these messages were expected, and if not, how I might > resolve these? These warning can safely be ignored. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 13:41:14 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Sat Jan 21 12:01:12 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: 6667 Message-ID: <20050503194114.72091.qmail@web31414.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Dianne Chen wrote: > > Hi all- > > > > I am trying to build the mx-base package, v.2.0.6. > > This will be used with postgresql 7.3.9, psycopg > > 1.1.18, and Roundup 0.8.2. > > > > RHEL 3.0 > > Python 2.3 > > egenix-mx-base-2.0.6.tar.gz > > > > I performed a: > > > > /usr/local/bin/python2.3 setup.py install > > > > Everything looks proper with the exeception of > this > > series of warning statements: > > > > ----------------- > > ... > > -------------- > > > > Would someone be kind enough to let me know > whether > > these messages were expected, and if not, how I > might > > resolve these? > > These warning can safely be ignored. > > -- > Marc-Andre Lemburg > eGenix.com > Marc- Thank you very much for the reply. It helps greatly. With kind regards, DC __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From davidrushby at yahoo.com Tue May 3 17:18:46 2005 From: davidrushby at yahoo.com (David Rushby) Date: Sat Jan 21 12:01:12 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050503231846.35012.qmail@web30009.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > I'm not sure whether your analysis of the problem is correct... Indeed, my original analysis wasn't correct; I think this one is. The fatal error I'm complaining about only arises if the arguments to DateTime.DateTime are invalid, so that the object is deallocated in the onError block of mxDateTime_FromDateAndTime. If the object is created successfully, and later deallocated by Python's garbage collector, the fatal error doesn't arise. Here's my analysis of the problem: --- If the debugging directive Py_TRACE_REFS is enabled, as it is in my case, the Python interpreter maintains a doubly linked list of all Python objects (named refchain) via the _ob_next and _ob_prev pointers added to PyObject via _PyObject_HEAD_EXTRA. Each object is inserted into refchain by the _Py_AddToAllObjects call in _Py_NewReference, and removed from refchain by the _Py_ForgetReference call in _Py_Dealloc. _Py_ForgetReference performs an integrity check on the object being deallocated (op) to make sure that its neighbors in refchain recognize it. Specifically, _Py_ForgetReference verifies that the _ob_next pointer of the previous object in refchain (op->_ob_prev->_ob_next) points to op, and that the _ob_prev pointer of the next object in refchain (op->_ob_next->_ob_prev) points to op. If either of those conditions is false, the interpreter raises the fatal error I'm seeing. After mxDateTime_New pulls an mxDateTimeObject out of the free list, it calls _Py_NewReference on that object to transform it from a "conceptually deallocated" object to a "conceptually allocated" one. _Py_NewReference inserts the object into refchain. Later, when the object is being "conceptually deallocated", it should be removed from refchain with _Py_ForgetReference. The version of _Py_Dealloc that's active when Py_TRACE_REFS is enabled does this (_Py_Dealloc is the element of Py_DECREF that performs the actual destruction). _Py_Dealloc first calls _Py_ForgetReference to remove the object from refchain, then calls the object's destructor (op->ob_type->tp_dealloc). If WANT_SUBCLASSABLE_TYPES is not defined (it is not in my case), the destructor for mxDateTime_Type is mxDateTime_Free. So, if a DateTime object is deallocated normally, as a result of its reference count falling to zero, _Py_Dealloc is called on the object, which first removes it from refchain, then passes it to mxDateTime_Free. If a DateTime object is destroyed prematurely, as a result of invalid arguments to its destructor, the onError handler calls mxDateTime_Free, so the object is "conceptually deallocated" (placed in the free list), *but* the object is not removed from refchain. So if a refchain-membership-integrity-check is performed on the object in question or one of its immediate neighbors in refchain, that integrity check fails, leading to the fatal error. --- The solution is to 'Py_DECREF(...)' the object in the onError handler of its constructor, instead of passing the object directly to mxDateTime_Free. That change solves two problems: 1) It causes _Py_Dealloc to execute, which in turn executes _Py_ForgetReference, so the object is removed from refchain, as it should be. 2) At present, objects that are created successfully and later deallocated by normal reference count mechanics have a reference count of 0 when they enter the free list, whereas objects whose constructors abort their creation due to invalid arguments have a reference count of 1 when they enter the free list. Although AFAIK this doesn't cause an actual execution problem (because the object's reference count is *explicitly set to 1* rather than *incremented by 1* when the object is later "conceptually allocated" by _Py_NewReference), it is likely to confuse future maintainers and thereby lead to the introduction of an actual execution problem. I assume that if you agree that this is a reasonable solution, you'll want to apply the change not only to mxDateTime_FromDateAndTime, but to all similar constructors in mxDateTime.c. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From rj at maxxian.com Thu May 5 01:57:40 2005 From: rj at maxxian.com (RJ Juneau) Date: Sat Jan 21 12:01:12 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c5512e$f72798c0$6505a8c0@rjlaptop> I'm on the 30 day evaluation for mxodbc_zope_da. I'm getting the following error when I submit some queries: Error Type: KeyError Error Value: 'query' I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 with UCS4. The error seems to be caused by multiple rows being returned. I did see an earlier posting with the same error message. The response suggested a template error, but this is clearly not the case here. The additional evidence I've gathered so far: - I'm running the test directly from the ZSQL method, so there's no template involved. - If I use the same query with an additional "where" clause to ensure that only one row is returned, it works - If I use a value in the 'where' clause with no rows returned, it works - The same ZSQL query is being used on a Windows machine running Zope and the free ZODBC module without a problem - The query has been verified directly in mysql-client-browser Other info: - The database is MySQL 4.1.10A-0 - iODBC is the DB driver RJ Juneau -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050505/68d278bf/attachment-0034.htm From mal at egenix.com Thu May 5 12:37:43 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 21 12:01:12 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c5512e$f72798c0$6505a8c0@rjlaptop> References: <000301c5512e$f72798c0$6505a8c0@rjlaptop> Message-ID: <4279E967.6010904@egenix.com> RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 > with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 09:37:42 2005 From: rj at maxxian.com (RJ Juneau) Date: Sat Jan 21 12:01:12 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000101c5516f$3b96de90$6505a8c0@rjlaptop> More interesting info on the problem: If I execute the query directly in the "test" window of the base eGenix mxODBC Database Connection window, it works fine and returns the 20 lines expected. That could point to a problem in the rendering, which seems to be where the traceback ends. Note that within the same Zope system I also have an ODBC connection to a Sybase database, and I have successfully tested multi-line ZSQL queries there. This is the traceback: Time 2005/05/05 07:55:15.294 GMT-4 Exception Type KeyError Exception Value 'query' Traceback (innermost last): Module ZPublisher.Publish, line 101, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 39, in call_object Module Shared.DC.ZRDB.DA, line 337, in manage_test Module DocumentTemplate.DT_String, line 474, in __call__ Module DocumentTemplate.DT_In, line 602, in renderwb Module DocumentTemplate.DT_Var, line 219, in render KeyError: 'query' I don't think the following is an issue, but I'll include it for completeness.I am also getting the following iODBC warnings and errors in the Zope console log, which are related to the ODBC parameters being passed by iODBC. Note that these errors also appear for all of the successful queries. [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (Setup). [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (UsageCount). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Timeout). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Reuse). As for the ZSQL snippet from the template... Since there's no template involved yet (I'm still testing directly from the ZSQL method), I assume you mean the SQL code? select h.host_name, s.system_name, s.system_handle, count(*) from terminal t, system_map s, host h where t.system_index = s.system_index and s.host_index = h.host_index group by s.system_name order by h.host_name Nothing complicated here. There are no parameters passed to the query. RJ -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: May 5, 2005 5:38 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: Re: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is > 2.3.4 with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ---------------------------------------------------------------------- > -- > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 16:00:32 2005 From: charlie at egenix.com (Charlie Clark) Date: Sat Jan 21 12:01:12 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000101c5516f$3b96de90$6505a8c0@rjlaptop> References: <000101c5516f$3b96de90$6505a8c0@rjlaptop> Message-ID: <20050505150032.644.1@bepc.1115296715.fake> On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base eGenix > mxODBC Database Connection window, it works fine and returns the 20 > lines expected. That could point to a problem in the rendering, which > seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection to > a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 10:22:17 2005 From: rj at maxxian.com (RJ Juneau) Date: Sat Jan 21 12:01:12 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505150032.644.1@bepc.1115296715.fake> Message-ID: <000201c55175$75bcad10$6505a8c0@rjlaptop> At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 11:47:14 2005 From: rj at maxxian.com (RJ Juneau) Date: Sat Jan 21 12:01:12 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c55181$549be0e0$6505a8c0@rjlaptop> Charlie, I found a fix. Here it is in case anyone else runs into this. You were correct - the problem is in another part of Zope. Based on your feedback, I did a bit more searching and found something here: http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. html The problem appears to be in Zope versions after 2.7.0. I'm running 2.7.6, and the post indicates that it also happens in 2.7.4. The solution: Edit file /lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. There are two lines in the file that start with . Edit them as follows: Change first line to: Change second line to: Just to be after, I shut down Zope before I made the changes and restarted it after. Thanks for the help! RJ -----Original Message----- From: RJ Juneau [mailto:rj@maxxian.com] Sent: May 5, 2005 9:22 AM To: 'Charlie Clark' Cc: 'egenix-users@lists.egenix.com' Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 17:57:25 2005 From: charlie at egenix.com (Charlie Clark) Date: Sat Jan 21 12:01:12 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <20050505165725.3380.2@bepc.1115296715.fake> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Thu May 5 09:15:21 2005 From: charlie at egenix.com (Charlie Clark) Date: Sat Jan 21 12:01:12 2006 Subject: [Zope-DB] RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <000001c55185$41477730$6b00a8c0@fonacier.local> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________ Zope-DB mailing list Zope-DB@zope.org http://mail.zope.org/mailman/listinfo/zope-db From rj at maxxian.com Thu May 5 12:38:00 2005 From: rj at maxxian.com (RJ Juneau) Date: Sat Jan 21 12:01:12 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000001c55188$6b841eb0$6505a8c0@rjlaptop> I just double-checked. Zope-2.7.6-final. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 12:49:16 2005 From: rj at maxxian.com (RJ Juneau) Date: Sat Jan 21 12:01:12 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000501c55189$fe149ba0$6505a8c0@rjlaptop> Charlie, The fix has only been applied for 2.7.7, 2.8b2. The info is in the original bug report which is closed and can be found here: http://www.zope.org/Collectors/Zope/1745 RJ -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Fri May 6 11:50:09 2005 From: rj at maxxian.com (RJ Juneau) Date: Sat Jan 21 12:01:12 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC Message-ID: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Still on eval for the product. I cannot get a stable connection to Sybase via the iODBC drivers. - The Sybase ODBC connection - including a query - have been verified at the iODBC level. - The setup is already working well for ODBC connection to MySQL. Symptoms include: - If I click on "Open Connection", it still comes back with "Connection Closed" when I go to a ZSQL method - Using 'Connect on Demand' is not working either. - Clicking "Open Connection" gives me the following error: Connection string: DSN=lixbox_sybase; UID=sa; PWD=XXXXXXX Connection pool entry: 0 Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection rejected by data source', 7952) The odbc.ini definition for DSN "lixbox_sybase" is as follows: [lixbox_sybase] JetFix = No NoRowSetSizeLimit = No Description = Test connection to listbox Options = LIXBOX DSQUERY = SQLSERVER TDSHOST = lixbox TDSPORT = 5000 TDSVER = 5.0 SQLSERVER_CATALOG = N CURSOR_SENSITIVITY = LOW UserName = sa Password = XXXXXXXX ServerType = Sybase 10/11/12 Driver = /opt/openlink/lib/sql_mt_lt.so Database = pubs2 ReadOnly = no NoAutoCommit = No NoLoginBox = No FetchBufferSize = 60 Other relevant data: - Connecting via OpenLink's iODBC - Zope 2.7.6-final - Python 2.3.4 - Connection to Sybase has been successfully tested with iODBC, including issuing a query - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC connection RJ Juneau Chief Technology Officer Maxxian Integration Inc. 155 Westhampton Drive Thornhill, Ontario Canada L4J 7X2 E-mail: rj@maxxian.com Phone: +1 905 482 9429 Cell: +1 416 897 6682 Toll free: +1 866 758 9161 Fax: +1 647 722 2038 -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050506/aef33361/attachment-0034.htm From mal at egenix.com Fri May 6 18:27:37 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 21 12:01:12 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC In-Reply-To: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> References: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Message-ID: <427B8CE9.1010601@egenix.com> RJ Juneau wrote: > Still on eval for the product. > > I cannot get a stable connection to Sybase via the iODBC drivers. > > - The Sybase ODBC connection - including a query - have been verified at > the iODBC level. > - The setup is already working well for ODBC connection to MySQL. > > Symptoms include: > > - If I click on "Open Connection", it still comes back with "Connection > Closed" when I go to a ZSQL method > - Using 'Connect on Demand' is not working either. > - Clicking "Open Connection" gives me the following error: > > Connection string: DSN=lixbox_sybase; > UID=sa; > PWD=XXXXXXX Try writing the connection string on one line and without whitespace. ODBC drivers sometimes have problems with this. > Connection pool entry: 0 > Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection > rejected by data source', 7952) This is a generic error that relates to authentication or firewall problems. It is possible that turning on ODBC tracing the ODBC manager will give more clues as to the real cause of the problem. > The odbc.ini definition for DSN "lixbox_sybase" is as follows: > > [lixbox_sybase] > JetFix = No > NoRowSetSizeLimit = No > Description = Test connection to listbox > Options = LIXBOX > DSQUERY = SQLSERVER > TDSHOST = lixbox > TDSPORT = 5000 > TDSVER = 5.0 > SQLSERVER_CATALOG = N > CURSOR_SENSITIVITY = LOW > UserName = sa > Password = XXXXXXXX > ServerType = Sybase 10/11/12 > Driver = /opt/openlink/lib/sql_mt_lt.so > Database = pubs2 > ReadOnly = no > NoAutoCommit = No > NoLoginBox = No > FetchBufferSize = 60 > > > Other relevant data: > - Connecting via OpenLink's iODBC > - Zope 2.7.6-final > - Python 2.3.4 > - Connection to Sybase has been successfully tested with iODBC, > including issuing a query > - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC > connection > > > > RJ Juneau > Chief Technology Officer > Maxxian Integration Inc. > 155 Westhampton Drive > Thornhill, Ontario > Canada L4J 7X2 > E-mail: rj@maxxian.com > Phone: +1 905 482 9429 > Cell: +1 416 897 6682 > Toll free: +1 866 758 9161 > Fax: +1 647 722 2038 > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 06 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From calisp at gmail.com Sun May 15 23:49:03 2005 From: calisp at gmail.com (calisp@gmail.com) Date: Sat Jan 21 12:01:12 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK Message-ID: Hi, I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the following error... 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the last phase of a two-phase commit. This shouldn't happen. Traceback (most recent call last): File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one jar.tpc_finish(self) File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish try: self._finish() File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could not perform COMMIT or ROLLBACK', 1023) What could be causing this? Can I get the mxODBCZopeDA source from somewhere? It would make debugging this much easier. Thanks, Calisp. From mal at egenix.com Mon May 16 13:52:12 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 21 12:01:12 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK In-Reply-To: References: Message-ID: <42887B5C.4010109@egenix.com> calisp@gmail.com wrote: > Hi, > > I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with > unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the > following error... > > 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the > last phase of a two-phase commit. This shouldn't happen. > Traceback (most recent call last): > File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one > jar.tpc_finish(self) > File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish > try: self._finish() > File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish > File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler > ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could > not perform COMMIT or ROLLBACK', 1023) You should have a look at the database logs to see what prevented the commit from being completed. > What could be causing this? Hard to say: mxODBCZopeDA is trying to commit the transaction, but the driver or database failed to complete the request. The above error was generated by the ODBC driver. This could be network or DNS problems, or be related to a bug in FreeTDS (which is getting more stable with every new release, but should still be considered beta quality software at the moment). > Can I get the mxODBCZopeDA source from > somewhere? It would make debugging this much easier. Getting the source is not an option and won't help much either since the source of the problem is not mxODBCZopeDA. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 16 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Sun May 1 21:29:25 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 21 16:01:00 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <427259F3.4090806@egenix.com> References: <20050427130906.52878.qmail@web30008.mail.mud.yahoo.com> <427259F3.4090806@egenix.com> Message-ID: <42752005.7080904@egenix.com> M.-A. Lemburg wrote: > David Rushby wrote: > >> --- "M.-A. Lemburg" wrote: >> >>> Are you using the standard mxDateTime build or one >>> with WANT_SUBCLASSABLE_TYPES defined... >> >> >> >> Presumably "the standard", since I just built with 'py24d setup.py >> build', making no attempt to enable special directives. >> >> >>> ... (mxDateTime_Deallocate is only used by the latter)? >> >> >> >> That's true in 2.1.0-2005-04-15, but not in 2.1.0b5. >> >> >>> In any case, please try our latest snapshot: >>> >>> >> >> http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-04-15.zip >> >>> to see if that makes any difference. >> >> >> >> I can't build it out of the box: > > > Hmm, looks like distutils' sdist command doesn't like our new > repository layout which uses symlinks (after we've switched to > subversion). > > We'll have to debug distutils first, I guess :-( Ok, we've found the problem and fixed it. Here's the new release (which does build out of the box at least on our boxes ;-): http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 01 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From davidrushby at yahoo.com Mon May 2 15:49:53 2005 From: davidrushby at yahoo.com (David Rushby) Date: Sat Jan 21 16:01:00 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Ok, we've found the problem and fixed it. Here's the new > release (which does build out of the box at least on our > boxes ;-): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip It does build now, but: py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" still behaves as it did when I submitted my original message: Fatal Python error: UNREF invalid object Aborted This is the same debug build of Python 2.4.1 that I was previously using, running the same configuration (CentOS Linux 4.0/i386, everything compiled with GCC 3.4.3). Have you examined my original claim as to the cause of the bug? __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 10:21:55 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 21 16:01:00 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> References: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> Message-ID: <42772693.8050306@egenix.com> David Rushby wrote: > --- "M.-A. Lemburg" wrote: > >>Ok, we've found the problem and fixed it. Here's the new >>release (which does build out of the box at least on our >>boxes ;-): >> >> > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip > > It does build now, but: > py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" > still behaves as it did when I submitted my original message: > Fatal Python error: UNREF invalid object > Aborted > > This is the same debug build of Python 2.4.1 that I was previously > using, running the same configuration (CentOS Linux 4.0/i386, > everything compiled with GCC 3.4.3). > > Have you examined my original claim as to the cause of the bug? No. We haven't had time for looking into it. I'm not sure whether your analysis of the problem is correct: if you don't define WANT_SUBCLASSABLE_TYPES, the API mxDateTime_Deallocate() is neither defined nor used. Furthermore, PyObject_Del() is only called by mxDateTime_Free() if you have explicitely edited mxDateTime.c to disabled the free list #defines. In a standard build, PyObject_Del() is only called at module finalization time. Note that the reason we call mxDateTime_Free() in the constructor is that we don't want the destructor of the object to be called. Py_DECREF() would call the destructor (mxDateTime_Deallocate). It is possible that the debug code in Python complains about the refcount in the object not being 0 at the time the object is finalized (module finalization time), but I don't see any such checks in PyObject_Free() (which is what PyObject_Del() maps to). Again, all of this does not happen in regular non-debug Python builds. Please be aware that we don't support debug builds, so fixing the problem (if there is one - gcc has some serious optimization problems on some combinations of platform and version) will take a while. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 09:27:37 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Sat Jan 21 16:01:00 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 Message-ID: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Hi all- I am trying to build the mx-base package, v.2.0.6. This will be used with postgresql 7.3.9, psycopg 1.1.18, and Roundup 0.8.2. RHEL 3.0 Python 2.3 egenix-mx-base-2.0.6.tar.gz I performed a: /usr/local/bin/python2.3 setup.py install Everything looks proper with the exeception of this series of warning statements: ----------------- gcc -pthread -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fno-strict-aliasing -fPIC -Imx/BeeBase/mxBeeBase -I/usr/local/incl ude/python2.3 -I/usr/local/include -c mx/BeeBase/mxBeeBase/btr.c -o build/temp.linux-i686-2.3/mx/BeeBase/mxBeeBase/mxBeeBa se/mx/BeeBase/mxBeeBase/btr.o mx/BeeBase/mxBeeBase/btr.c: In function `dumpBuf': mx/BeeBase/mxBeeBase/btr.c:249: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:250: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:255: warning: unsigned int format, long unsigned int arg (arg 4) mx/BeeBase/mxBeeBase/btr.c:256: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c: In function `_validateTree': mx/BeeBase/mxBeeBase/btr.c:330: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:337: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:339: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:349: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:351: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 3) creating build/lib.linux-i686-2.3/mx/BeeBase creating build/lib.linux-i686-2.3/mx/BeeBase/mxBeeBase -------------- Would someone be kind enough to let me know whether these messages were expected, and if not, how I might resolve these? Thanks! DC __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 22:06:33 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 21 16:01:00 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> References: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Message-ID: <4277CBB9.8020302@egenix.com> Dianne Chen wrote: > Hi all- > > I am trying to build the mx-base package, v.2.0.6. > This will be used with postgresql 7.3.9, psycopg > 1.1.18, and Roundup 0.8.2. > > RHEL 3.0 > Python 2.3 > egenix-mx-base-2.0.6.tar.gz > > I performed a: > > /usr/local/bin/python2.3 setup.py install > > Everything looks proper with the exeception of this > series of warning statements: > > ----------------- > ... > -------------- > > Would someone be kind enough to let me know whether > these messages were expected, and if not, how I might > resolve these? These warning can safely be ignored. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 13:41:14 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Sat Jan 21 16:01:00 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: 6667 Message-ID: <20050503194114.72091.qmail@web31414.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Dianne Chen wrote: > > Hi all- > > > > I am trying to build the mx-base package, v.2.0.6. > > This will be used with postgresql 7.3.9, psycopg > > 1.1.18, and Roundup 0.8.2. > > > > RHEL 3.0 > > Python 2.3 > > egenix-mx-base-2.0.6.tar.gz > > > > I performed a: > > > > /usr/local/bin/python2.3 setup.py install > > > > Everything looks proper with the exeception of > this > > series of warning statements: > > > > ----------------- > > ... > > -------------- > > > > Would someone be kind enough to let me know > whether > > these messages were expected, and if not, how I > might > > resolve these? > > These warning can safely be ignored. > > -- > Marc-Andre Lemburg > eGenix.com > Marc- Thank you very much for the reply. It helps greatly. With kind regards, DC __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From davidrushby at yahoo.com Tue May 3 17:18:46 2005 From: davidrushby at yahoo.com (David Rushby) Date: Sat Jan 21 16:01:00 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050503231846.35012.qmail@web30009.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > I'm not sure whether your analysis of the problem is correct... Indeed, my original analysis wasn't correct; I think this one is. The fatal error I'm complaining about only arises if the arguments to DateTime.DateTime are invalid, so that the object is deallocated in the onError block of mxDateTime_FromDateAndTime. If the object is created successfully, and later deallocated by Python's garbage collector, the fatal error doesn't arise. Here's my analysis of the problem: --- If the debugging directive Py_TRACE_REFS is enabled, as it is in my case, the Python interpreter maintains a doubly linked list of all Python objects (named refchain) via the _ob_next and _ob_prev pointers added to PyObject via _PyObject_HEAD_EXTRA. Each object is inserted into refchain by the _Py_AddToAllObjects call in _Py_NewReference, and removed from refchain by the _Py_ForgetReference call in _Py_Dealloc. _Py_ForgetReference performs an integrity check on the object being deallocated (op) to make sure that its neighbors in refchain recognize it. Specifically, _Py_ForgetReference verifies that the _ob_next pointer of the previous object in refchain (op->_ob_prev->_ob_next) points to op, and that the _ob_prev pointer of the next object in refchain (op->_ob_next->_ob_prev) points to op. If either of those conditions is false, the interpreter raises the fatal error I'm seeing. After mxDateTime_New pulls an mxDateTimeObject out of the free list, it calls _Py_NewReference on that object to transform it from a "conceptually deallocated" object to a "conceptually allocated" one. _Py_NewReference inserts the object into refchain. Later, when the object is being "conceptually deallocated", it should be removed from refchain with _Py_ForgetReference. The version of _Py_Dealloc that's active when Py_TRACE_REFS is enabled does this (_Py_Dealloc is the element of Py_DECREF that performs the actual destruction). _Py_Dealloc first calls _Py_ForgetReference to remove the object from refchain, then calls the object's destructor (op->ob_type->tp_dealloc). If WANT_SUBCLASSABLE_TYPES is not defined (it is not in my case), the destructor for mxDateTime_Type is mxDateTime_Free. So, if a DateTime object is deallocated normally, as a result of its reference count falling to zero, _Py_Dealloc is called on the object, which first removes it from refchain, then passes it to mxDateTime_Free. If a DateTime object is destroyed prematurely, as a result of invalid arguments to its destructor, the onError handler calls mxDateTime_Free, so the object is "conceptually deallocated" (placed in the free list), *but* the object is not removed from refchain. So if a refchain-membership-integrity-check is performed on the object in question or one of its immediate neighbors in refchain, that integrity check fails, leading to the fatal error. --- The solution is to 'Py_DECREF(...)' the object in the onError handler of its constructor, instead of passing the object directly to mxDateTime_Free. That change solves two problems: 1) It causes _Py_Dealloc to execute, which in turn executes _Py_ForgetReference, so the object is removed from refchain, as it should be. 2) At present, objects that are created successfully and later deallocated by normal reference count mechanics have a reference count of 0 when they enter the free list, whereas objects whose constructors abort their creation due to invalid arguments have a reference count of 1 when they enter the free list. Although AFAIK this doesn't cause an actual execution problem (because the object's reference count is *explicitly set to 1* rather than *incremented by 1* when the object is later "conceptually allocated" by _Py_NewReference), it is likely to confuse future maintainers and thereby lead to the introduction of an actual execution problem. I assume that if you agree that this is a reasonable solution, you'll want to apply the change not only to mxDateTime_FromDateAndTime, but to all similar constructors in mxDateTime.c. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From rj at maxxian.com Thu May 5 01:57:40 2005 From: rj at maxxian.com (RJ Juneau) Date: Sat Jan 21 16:01:00 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c5512e$f72798c0$6505a8c0@rjlaptop> I'm on the 30 day evaluation for mxodbc_zope_da. I'm getting the following error when I submit some queries: Error Type: KeyError Error Value: 'query' I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 with UCS4. The error seems to be caused by multiple rows being returned. I did see an earlier posting with the same error message. The response suggested a template error, but this is clearly not the case here. The additional evidence I've gathered so far: - I'm running the test directly from the ZSQL method, so there's no template involved. - If I use the same query with an additional "where" clause to ensure that only one row is returned, it works - If I use a value in the 'where' clause with no rows returned, it works - The same ZSQL query is being used on a Windows machine running Zope and the free ZODBC module without a problem - The query has been verified directly in mysql-client-browser Other info: - The database is MySQL 4.1.10A-0 - iODBC is the DB driver RJ Juneau -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050505/68d278bf/attachment-0035.htm From mal at egenix.com Thu May 5 12:37:43 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 21 16:01:00 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c5512e$f72798c0$6505a8c0@rjlaptop> References: <000301c5512e$f72798c0$6505a8c0@rjlaptop> Message-ID: <4279E967.6010904@egenix.com> RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 > with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 09:37:42 2005 From: rj at maxxian.com (RJ Juneau) Date: Sat Jan 21 16:01:00 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000101c5516f$3b96de90$6505a8c0@rjlaptop> More interesting info on the problem: If I execute the query directly in the "test" window of the base eGenix mxODBC Database Connection window, it works fine and returns the 20 lines expected. That could point to a problem in the rendering, which seems to be where the traceback ends. Note that within the same Zope system I also have an ODBC connection to a Sybase database, and I have successfully tested multi-line ZSQL queries there. This is the traceback: Time 2005/05/05 07:55:15.294 GMT-4 Exception Type KeyError Exception Value 'query' Traceback (innermost last): Module ZPublisher.Publish, line 101, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 39, in call_object Module Shared.DC.ZRDB.DA, line 337, in manage_test Module DocumentTemplate.DT_String, line 474, in __call__ Module DocumentTemplate.DT_In, line 602, in renderwb Module DocumentTemplate.DT_Var, line 219, in render KeyError: 'query' I don't think the following is an issue, but I'll include it for completeness.I am also getting the following iODBC warnings and errors in the Zope console log, which are related to the ODBC parameters being passed by iODBC. Note that these errors also appear for all of the successful queries. [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (Setup). [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (UsageCount). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Timeout). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Reuse). As for the ZSQL snippet from the template... Since there's no template involved yet (I'm still testing directly from the ZSQL method), I assume you mean the SQL code? select h.host_name, s.system_name, s.system_handle, count(*) from terminal t, system_map s, host h where t.system_index = s.system_index and s.host_index = h.host_index group by s.system_name order by h.host_name Nothing complicated here. There are no parameters passed to the query. RJ -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: May 5, 2005 5:38 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: Re: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is > 2.3.4 with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ---------------------------------------------------------------------- > -- > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 16:00:32 2005 From: charlie at egenix.com (Charlie Clark) Date: Sat Jan 21 16:01:00 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000101c5516f$3b96de90$6505a8c0@rjlaptop> References: <000101c5516f$3b96de90$6505a8c0@rjlaptop> Message-ID: <20050505150032.644.1@bepc.1115296715.fake> On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base eGenix > mxODBC Database Connection window, it works fine and returns the 20 > lines expected. That could point to a problem in the rendering, which > seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection to > a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 10:22:17 2005 From: rj at maxxian.com (RJ Juneau) Date: Sat Jan 21 16:01:00 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505150032.644.1@bepc.1115296715.fake> Message-ID: <000201c55175$75bcad10$6505a8c0@rjlaptop> At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 11:47:14 2005 From: rj at maxxian.com (RJ Juneau) Date: Sat Jan 21 16:01:00 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c55181$549be0e0$6505a8c0@rjlaptop> Charlie, I found a fix. Here it is in case anyone else runs into this. You were correct - the problem is in another part of Zope. Based on your feedback, I did a bit more searching and found something here: http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. html The problem appears to be in Zope versions after 2.7.0. I'm running 2.7.6, and the post indicates that it also happens in 2.7.4. The solution: Edit file /lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. There are two lines in the file that start with . Edit them as follows: Change first line to: Change second line to: Just to be after, I shut down Zope before I made the changes and restarted it after. Thanks for the help! RJ -----Original Message----- From: RJ Juneau [mailto:rj@maxxian.com] Sent: May 5, 2005 9:22 AM To: 'Charlie Clark' Cc: 'egenix-users@lists.egenix.com' Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 17:57:25 2005 From: charlie at egenix.com (Charlie Clark) Date: Sat Jan 21 16:01:00 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <20050505165725.3380.2@bepc.1115296715.fake> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Thu May 5 09:15:21 2005 From: charlie at egenix.com (Charlie Clark) Date: Sat Jan 21 16:01:00 2006 Subject: [Zope-DB] RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <000001c55185$41477730$6b00a8c0@fonacier.local> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________ Zope-DB mailing list Zope-DB@zope.org http://mail.zope.org/mailman/listinfo/zope-db From rj at maxxian.com Thu May 5 12:38:00 2005 From: rj at maxxian.com (RJ Juneau) Date: Sat Jan 21 16:01:00 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000001c55188$6b841eb0$6505a8c0@rjlaptop> I just double-checked. Zope-2.7.6-final. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 12:49:16 2005 From: rj at maxxian.com (RJ Juneau) Date: Sat Jan 21 16:01:00 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000501c55189$fe149ba0$6505a8c0@rjlaptop> Charlie, The fix has only been applied for 2.7.7, 2.8b2. The info is in the original bug report which is closed and can be found here: http://www.zope.org/Collectors/Zope/1745 RJ -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Fri May 6 11:50:09 2005 From: rj at maxxian.com (RJ Juneau) Date: Sat Jan 21 16:01:00 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC Message-ID: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Still on eval for the product. I cannot get a stable connection to Sybase via the iODBC drivers. - The Sybase ODBC connection - including a query - have been verified at the iODBC level. - The setup is already working well for ODBC connection to MySQL. Symptoms include: - If I click on "Open Connection", it still comes back with "Connection Closed" when I go to a ZSQL method - Using 'Connect on Demand' is not working either. - Clicking "Open Connection" gives me the following error: Connection string: DSN=lixbox_sybase; UID=sa; PWD=XXXXXXX Connection pool entry: 0 Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection rejected by data source', 7952) The odbc.ini definition for DSN "lixbox_sybase" is as follows: [lixbox_sybase] JetFix = No NoRowSetSizeLimit = No Description = Test connection to listbox Options = LIXBOX DSQUERY = SQLSERVER TDSHOST = lixbox TDSPORT = 5000 TDSVER = 5.0 SQLSERVER_CATALOG = N CURSOR_SENSITIVITY = LOW UserName = sa Password = XXXXXXXX ServerType = Sybase 10/11/12 Driver = /opt/openlink/lib/sql_mt_lt.so Database = pubs2 ReadOnly = no NoAutoCommit = No NoLoginBox = No FetchBufferSize = 60 Other relevant data: - Connecting via OpenLink's iODBC - Zope 2.7.6-final - Python 2.3.4 - Connection to Sybase has been successfully tested with iODBC, including issuing a query - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC connection RJ Juneau Chief Technology Officer Maxxian Integration Inc. 155 Westhampton Drive Thornhill, Ontario Canada L4J 7X2 E-mail: rj@maxxian.com Phone: +1 905 482 9429 Cell: +1 416 897 6682 Toll free: +1 866 758 9161 Fax: +1 647 722 2038 -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050506/aef33361/attachment-0035.htm From mal at egenix.com Fri May 6 18:27:37 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 21 16:01:00 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC In-Reply-To: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> References: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Message-ID: <427B8CE9.1010601@egenix.com> RJ Juneau wrote: > Still on eval for the product. > > I cannot get a stable connection to Sybase via the iODBC drivers. > > - The Sybase ODBC connection - including a query - have been verified at > the iODBC level. > - The setup is already working well for ODBC connection to MySQL. > > Symptoms include: > > - If I click on "Open Connection", it still comes back with "Connection > Closed" when I go to a ZSQL method > - Using 'Connect on Demand' is not working either. > - Clicking "Open Connection" gives me the following error: > > Connection string: DSN=lixbox_sybase; > UID=sa; > PWD=XXXXXXX Try writing the connection string on one line and without whitespace. ODBC drivers sometimes have problems with this. > Connection pool entry: 0 > Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection > rejected by data source', 7952) This is a generic error that relates to authentication or firewall problems. It is possible that turning on ODBC tracing the ODBC manager will give more clues as to the real cause of the problem. > The odbc.ini definition for DSN "lixbox_sybase" is as follows: > > [lixbox_sybase] > JetFix = No > NoRowSetSizeLimit = No > Description = Test connection to listbox > Options = LIXBOX > DSQUERY = SQLSERVER > TDSHOST = lixbox > TDSPORT = 5000 > TDSVER = 5.0 > SQLSERVER_CATALOG = N > CURSOR_SENSITIVITY = LOW > UserName = sa > Password = XXXXXXXX > ServerType = Sybase 10/11/12 > Driver = /opt/openlink/lib/sql_mt_lt.so > Database = pubs2 > ReadOnly = no > NoAutoCommit = No > NoLoginBox = No > FetchBufferSize = 60 > > > Other relevant data: > - Connecting via OpenLink's iODBC > - Zope 2.7.6-final > - Python 2.3.4 > - Connection to Sybase has been successfully tested with iODBC, > including issuing a query > - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC > connection > > > > RJ Juneau > Chief Technology Officer > Maxxian Integration Inc. > 155 Westhampton Drive > Thornhill, Ontario > Canada L4J 7X2 > E-mail: rj@maxxian.com > Phone: +1 905 482 9429 > Cell: +1 416 897 6682 > Toll free: +1 866 758 9161 > Fax: +1 647 722 2038 > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 06 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From calisp at gmail.com Sun May 15 23:49:03 2005 From: calisp at gmail.com (calisp@gmail.com) Date: Sat Jan 21 16:01:00 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK Message-ID: Hi, I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the following error... 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the last phase of a two-phase commit. This shouldn't happen. Traceback (most recent call last): File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one jar.tpc_finish(self) File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish try: self._finish() File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could not perform COMMIT or ROLLBACK', 1023) What could be causing this? Can I get the mxODBCZopeDA source from somewhere? It would make debugging this much easier. Thanks, Calisp. From mal at egenix.com Mon May 16 13:52:12 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 21 16:01:00 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK In-Reply-To: References: Message-ID: <42887B5C.4010109@egenix.com> calisp@gmail.com wrote: > Hi, > > I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with > unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the > following error... > > 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the > last phase of a two-phase commit. This shouldn't happen. > Traceback (most recent call last): > File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one > jar.tpc_finish(self) > File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish > try: self._finish() > File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish > File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler > ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could > not perform COMMIT or ROLLBACK', 1023) You should have a look at the database logs to see what prevented the commit from being completed. > What could be causing this? Hard to say: mxODBCZopeDA is trying to commit the transaction, but the driver or database failed to complete the request. The above error was generated by the ODBC driver. This could be network or DNS problems, or be related to a bug in FreeTDS (which is getting more stable with every new release, but should still be considered beta quality software at the moment). > Can I get the mxODBCZopeDA source from > somewhere? It would make debugging this much easier. Getting the source is not an option and won't help much either since the source of the problem is not mxODBCZopeDA. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 16 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Sun May 1 21:29:25 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 21 20:00:58 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <427259F3.4090806@egenix.com> References: <20050427130906.52878.qmail@web30008.mail.mud.yahoo.com> <427259F3.4090806@egenix.com> Message-ID: <42752005.7080904@egenix.com> M.-A. Lemburg wrote: > David Rushby wrote: > >> --- "M.-A. Lemburg" wrote: >> >>> Are you using the standard mxDateTime build or one >>> with WANT_SUBCLASSABLE_TYPES defined... >> >> >> >> Presumably "the standard", since I just built with 'py24d setup.py >> build', making no attempt to enable special directives. >> >> >>> ... (mxDateTime_Deallocate is only used by the latter)? >> >> >> >> That's true in 2.1.0-2005-04-15, but not in 2.1.0b5. >> >> >>> In any case, please try our latest snapshot: >>> >>> >> >> http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-04-15.zip >> >>> to see if that makes any difference. >> >> >> >> I can't build it out of the box: > > > Hmm, looks like distutils' sdist command doesn't like our new > repository layout which uses symlinks (after we've switched to > subversion). > > We'll have to debug distutils first, I guess :-( Ok, we've found the problem and fixed it. Here's the new release (which does build out of the box at least on our boxes ;-): http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 01 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From davidrushby at yahoo.com Mon May 2 15:49:53 2005 From: davidrushby at yahoo.com (David Rushby) Date: Sat Jan 21 20:00:58 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Ok, we've found the problem and fixed it. Here's the new > release (which does build out of the box at least on our > boxes ;-): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip It does build now, but: py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" still behaves as it did when I submitted my original message: Fatal Python error: UNREF invalid object Aborted This is the same debug build of Python 2.4.1 that I was previously using, running the same configuration (CentOS Linux 4.0/i386, everything compiled with GCC 3.4.3). Have you examined my original claim as to the cause of the bug? __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 10:21:55 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 21 20:00:58 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> References: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> Message-ID: <42772693.8050306@egenix.com> David Rushby wrote: > --- "M.-A. Lemburg" wrote: > >>Ok, we've found the problem and fixed it. Here's the new >>release (which does build out of the box at least on our >>boxes ;-): >> >> > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip > > It does build now, but: > py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" > still behaves as it did when I submitted my original message: > Fatal Python error: UNREF invalid object > Aborted > > This is the same debug build of Python 2.4.1 that I was previously > using, running the same configuration (CentOS Linux 4.0/i386, > everything compiled with GCC 3.4.3). > > Have you examined my original claim as to the cause of the bug? No. We haven't had time for looking into it. I'm not sure whether your analysis of the problem is correct: if you don't define WANT_SUBCLASSABLE_TYPES, the API mxDateTime_Deallocate() is neither defined nor used. Furthermore, PyObject_Del() is only called by mxDateTime_Free() if you have explicitely edited mxDateTime.c to disabled the free list #defines. In a standard build, PyObject_Del() is only called at module finalization time. Note that the reason we call mxDateTime_Free() in the constructor is that we don't want the destructor of the object to be called. Py_DECREF() would call the destructor (mxDateTime_Deallocate). It is possible that the debug code in Python complains about the refcount in the object not being 0 at the time the object is finalized (module finalization time), but I don't see any such checks in PyObject_Free() (which is what PyObject_Del() maps to). Again, all of this does not happen in regular non-debug Python builds. Please be aware that we don't support debug builds, so fixing the problem (if there is one - gcc has some serious optimization problems on some combinations of platform and version) will take a while. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 09:27:37 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Sat Jan 21 20:00:58 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 Message-ID: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Hi all- I am trying to build the mx-base package, v.2.0.6. This will be used with postgresql 7.3.9, psycopg 1.1.18, and Roundup 0.8.2. RHEL 3.0 Python 2.3 egenix-mx-base-2.0.6.tar.gz I performed a: /usr/local/bin/python2.3 setup.py install Everything looks proper with the exeception of this series of warning statements: ----------------- gcc -pthread -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fno-strict-aliasing -fPIC -Imx/BeeBase/mxBeeBase -I/usr/local/incl ude/python2.3 -I/usr/local/include -c mx/BeeBase/mxBeeBase/btr.c -o build/temp.linux-i686-2.3/mx/BeeBase/mxBeeBase/mxBeeBa se/mx/BeeBase/mxBeeBase/btr.o mx/BeeBase/mxBeeBase/btr.c: In function `dumpBuf': mx/BeeBase/mxBeeBase/btr.c:249: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:250: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:255: warning: unsigned int format, long unsigned int arg (arg 4) mx/BeeBase/mxBeeBase/btr.c:256: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c: In function `_validateTree': mx/BeeBase/mxBeeBase/btr.c:330: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:337: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:339: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:349: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:351: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 3) creating build/lib.linux-i686-2.3/mx/BeeBase creating build/lib.linux-i686-2.3/mx/BeeBase/mxBeeBase -------------- Would someone be kind enough to let me know whether these messages were expected, and if not, how I might resolve these? Thanks! DC __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 22:06:33 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 21 20:00:58 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> References: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Message-ID: <4277CBB9.8020302@egenix.com> Dianne Chen wrote: > Hi all- > > I am trying to build the mx-base package, v.2.0.6. > This will be used with postgresql 7.3.9, psycopg > 1.1.18, and Roundup 0.8.2. > > RHEL 3.0 > Python 2.3 > egenix-mx-base-2.0.6.tar.gz > > I performed a: > > /usr/local/bin/python2.3 setup.py install > > Everything looks proper with the exeception of this > series of warning statements: > > ----------------- > ... > -------------- > > Would someone be kind enough to let me know whether > these messages were expected, and if not, how I might > resolve these? These warning can safely be ignored. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 13:41:14 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Sat Jan 21 20:00:58 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: 6667 Message-ID: <20050503194114.72091.qmail@web31414.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Dianne Chen wrote: > > Hi all- > > > > I am trying to build the mx-base package, v.2.0.6. > > This will be used with postgresql 7.3.9, psycopg > > 1.1.18, and Roundup 0.8.2. > > > > RHEL 3.0 > > Python 2.3 > > egenix-mx-base-2.0.6.tar.gz > > > > I performed a: > > > > /usr/local/bin/python2.3 setup.py install > > > > Everything looks proper with the exeception of > this > > series of warning statements: > > > > ----------------- > > ... > > -------------- > > > > Would someone be kind enough to let me know > whether > > these messages were expected, and if not, how I > might > > resolve these? > > These warning can safely be ignored. > > -- > Marc-Andre Lemburg > eGenix.com > Marc- Thank you very much for the reply. It helps greatly. With kind regards, DC __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From davidrushby at yahoo.com Tue May 3 17:18:46 2005 From: davidrushby at yahoo.com (David Rushby) Date: Sat Jan 21 20:00:58 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050503231846.35012.qmail@web30009.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > I'm not sure whether your analysis of the problem is correct... Indeed, my original analysis wasn't correct; I think this one is. The fatal error I'm complaining about only arises if the arguments to DateTime.DateTime are invalid, so that the object is deallocated in the onError block of mxDateTime_FromDateAndTime. If the object is created successfully, and later deallocated by Python's garbage collector, the fatal error doesn't arise. Here's my analysis of the problem: --- If the debugging directive Py_TRACE_REFS is enabled, as it is in my case, the Python interpreter maintains a doubly linked list of all Python objects (named refchain) via the _ob_next and _ob_prev pointers added to PyObject via _PyObject_HEAD_EXTRA. Each object is inserted into refchain by the _Py_AddToAllObjects call in _Py_NewReference, and removed from refchain by the _Py_ForgetReference call in _Py_Dealloc. _Py_ForgetReference performs an integrity check on the object being deallocated (op) to make sure that its neighbors in refchain recognize it. Specifically, _Py_ForgetReference verifies that the _ob_next pointer of the previous object in refchain (op->_ob_prev->_ob_next) points to op, and that the _ob_prev pointer of the next object in refchain (op->_ob_next->_ob_prev) points to op. If either of those conditions is false, the interpreter raises the fatal error I'm seeing. After mxDateTime_New pulls an mxDateTimeObject out of the free list, it calls _Py_NewReference on that object to transform it from a "conceptually deallocated" object to a "conceptually allocated" one. _Py_NewReference inserts the object into refchain. Later, when the object is being "conceptually deallocated", it should be removed from refchain with _Py_ForgetReference. The version of _Py_Dealloc that's active when Py_TRACE_REFS is enabled does this (_Py_Dealloc is the element of Py_DECREF that performs the actual destruction). _Py_Dealloc first calls _Py_ForgetReference to remove the object from refchain, then calls the object's destructor (op->ob_type->tp_dealloc). If WANT_SUBCLASSABLE_TYPES is not defined (it is not in my case), the destructor for mxDateTime_Type is mxDateTime_Free. So, if a DateTime object is deallocated normally, as a result of its reference count falling to zero, _Py_Dealloc is called on the object, which first removes it from refchain, then passes it to mxDateTime_Free. If a DateTime object is destroyed prematurely, as a result of invalid arguments to its destructor, the onError handler calls mxDateTime_Free, so the object is "conceptually deallocated" (placed in the free list), *but* the object is not removed from refchain. So if a refchain-membership-integrity-check is performed on the object in question or one of its immediate neighbors in refchain, that integrity check fails, leading to the fatal error. --- The solution is to 'Py_DECREF(...)' the object in the onError handler of its constructor, instead of passing the object directly to mxDateTime_Free. That change solves two problems: 1) It causes _Py_Dealloc to execute, which in turn executes _Py_ForgetReference, so the object is removed from refchain, as it should be. 2) At present, objects that are created successfully and later deallocated by normal reference count mechanics have a reference count of 0 when they enter the free list, whereas objects whose constructors abort their creation due to invalid arguments have a reference count of 1 when they enter the free list. Although AFAIK this doesn't cause an actual execution problem (because the object's reference count is *explicitly set to 1* rather than *incremented by 1* when the object is later "conceptually allocated" by _Py_NewReference), it is likely to confuse future maintainers and thereby lead to the introduction of an actual execution problem. I assume that if you agree that this is a reasonable solution, you'll want to apply the change not only to mxDateTime_FromDateAndTime, but to all similar constructors in mxDateTime.c. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From rj at maxxian.com Thu May 5 01:57:40 2005 From: rj at maxxian.com (RJ Juneau) Date: Sat Jan 21 20:00:58 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c5512e$f72798c0$6505a8c0@rjlaptop> I'm on the 30 day evaluation for mxodbc_zope_da. I'm getting the following error when I submit some queries: Error Type: KeyError Error Value: 'query' I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 with UCS4. The error seems to be caused by multiple rows being returned. I did see an earlier posting with the same error message. The response suggested a template error, but this is clearly not the case here. The additional evidence I've gathered so far: - I'm running the test directly from the ZSQL method, so there's no template involved. - If I use the same query with an additional "where" clause to ensure that only one row is returned, it works - If I use a value in the 'where' clause with no rows returned, it works - The same ZSQL query is being used on a Windows machine running Zope and the free ZODBC module without a problem - The query has been verified directly in mysql-client-browser Other info: - The database is MySQL 4.1.10A-0 - iODBC is the DB driver RJ Juneau -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050505/68d278bf/attachment-0036.htm From mal at egenix.com Thu May 5 12:37:43 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 21 20:00:58 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c5512e$f72798c0$6505a8c0@rjlaptop> References: <000301c5512e$f72798c0$6505a8c0@rjlaptop> Message-ID: <4279E967.6010904@egenix.com> RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 > with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 09:37:42 2005 From: rj at maxxian.com (RJ Juneau) Date: Sat Jan 21 20:00:58 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000101c5516f$3b96de90$6505a8c0@rjlaptop> More interesting info on the problem: If I execute the query directly in the "test" window of the base eGenix mxODBC Database Connection window, it works fine and returns the 20 lines expected. That could point to a problem in the rendering, which seems to be where the traceback ends. Note that within the same Zope system I also have an ODBC connection to a Sybase database, and I have successfully tested multi-line ZSQL queries there. This is the traceback: Time 2005/05/05 07:55:15.294 GMT-4 Exception Type KeyError Exception Value 'query' Traceback (innermost last): Module ZPublisher.Publish, line 101, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 39, in call_object Module Shared.DC.ZRDB.DA, line 337, in manage_test Module DocumentTemplate.DT_String, line 474, in __call__ Module DocumentTemplate.DT_In, line 602, in renderwb Module DocumentTemplate.DT_Var, line 219, in render KeyError: 'query' I don't think the following is an issue, but I'll include it for completeness.I am also getting the following iODBC warnings and errors in the Zope console log, which are related to the ODBC parameters being passed by iODBC. Note that these errors also appear for all of the successful queries. [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (Setup). [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (UsageCount). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Timeout). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Reuse). As for the ZSQL snippet from the template... Since there's no template involved yet (I'm still testing directly from the ZSQL method), I assume you mean the SQL code? select h.host_name, s.system_name, s.system_handle, count(*) from terminal t, system_map s, host h where t.system_index = s.system_index and s.host_index = h.host_index group by s.system_name order by h.host_name Nothing complicated here. There are no parameters passed to the query. RJ -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: May 5, 2005 5:38 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: Re: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is > 2.3.4 with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ---------------------------------------------------------------------- > -- > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 16:00:32 2005 From: charlie at egenix.com (Charlie Clark) Date: Sat Jan 21 20:00:58 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000101c5516f$3b96de90$6505a8c0@rjlaptop> References: <000101c5516f$3b96de90$6505a8c0@rjlaptop> Message-ID: <20050505150032.644.1@bepc.1115296715.fake> On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base eGenix > mxODBC Database Connection window, it works fine and returns the 20 > lines expected. That could point to a problem in the rendering, which > seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection to > a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 10:22:17 2005 From: rj at maxxian.com (RJ Juneau) Date: Sat Jan 21 20:00:58 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505150032.644.1@bepc.1115296715.fake> Message-ID: <000201c55175$75bcad10$6505a8c0@rjlaptop> At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 11:47:14 2005 From: rj at maxxian.com (RJ Juneau) Date: Sat Jan 21 20:00:58 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c55181$549be0e0$6505a8c0@rjlaptop> Charlie, I found a fix. Here it is in case anyone else runs into this. You were correct - the problem is in another part of Zope. Based on your feedback, I did a bit more searching and found something here: http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. html The problem appears to be in Zope versions after 2.7.0. I'm running 2.7.6, and the post indicates that it also happens in 2.7.4. The solution: Edit file /lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. There are two lines in the file that start with . Edit them as follows: Change first line to: Change second line to: Just to be after, I shut down Zope before I made the changes and restarted it after. Thanks for the help! RJ -----Original Message----- From: RJ Juneau [mailto:rj@maxxian.com] Sent: May 5, 2005 9:22 AM To: 'Charlie Clark' Cc: 'egenix-users@lists.egenix.com' Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 17:57:25 2005 From: charlie at egenix.com (Charlie Clark) Date: Sat Jan 21 20:00:58 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <20050505165725.3380.2@bepc.1115296715.fake> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Thu May 5 09:15:21 2005 From: charlie at egenix.com (Charlie Clark) Date: Sat Jan 21 20:00:58 2006 Subject: [Zope-DB] RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <000001c55185$41477730$6b00a8c0@fonacier.local> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________ Zope-DB mailing list Zope-DB@zope.org http://mail.zope.org/mailman/listinfo/zope-db From rj at maxxian.com Thu May 5 12:38:00 2005 From: rj at maxxian.com (RJ Juneau) Date: Sat Jan 21 20:00:58 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000001c55188$6b841eb0$6505a8c0@rjlaptop> I just double-checked. Zope-2.7.6-final. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 12:49:16 2005 From: rj at maxxian.com (RJ Juneau) Date: Sat Jan 21 20:00:58 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000501c55189$fe149ba0$6505a8c0@rjlaptop> Charlie, The fix has only been applied for 2.7.7, 2.8b2. The info is in the original bug report which is closed and can be found here: http://www.zope.org/Collectors/Zope/1745 RJ -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Fri May 6 11:50:09 2005 From: rj at maxxian.com (RJ Juneau) Date: Sat Jan 21 20:00:58 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC Message-ID: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Still on eval for the product. I cannot get a stable connection to Sybase via the iODBC drivers. - The Sybase ODBC connection - including a query - have been verified at the iODBC level. - The setup is already working well for ODBC connection to MySQL. Symptoms include: - If I click on "Open Connection", it still comes back with "Connection Closed" when I go to a ZSQL method - Using 'Connect on Demand' is not working either. - Clicking "Open Connection" gives me the following error: Connection string: DSN=lixbox_sybase; UID=sa; PWD=XXXXXXX Connection pool entry: 0 Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection rejected by data source', 7952) The odbc.ini definition for DSN "lixbox_sybase" is as follows: [lixbox_sybase] JetFix = No NoRowSetSizeLimit = No Description = Test connection to listbox Options = LIXBOX DSQUERY = SQLSERVER TDSHOST = lixbox TDSPORT = 5000 TDSVER = 5.0 SQLSERVER_CATALOG = N CURSOR_SENSITIVITY = LOW UserName = sa Password = XXXXXXXX ServerType = Sybase 10/11/12 Driver = /opt/openlink/lib/sql_mt_lt.so Database = pubs2 ReadOnly = no NoAutoCommit = No NoLoginBox = No FetchBufferSize = 60 Other relevant data: - Connecting via OpenLink's iODBC - Zope 2.7.6-final - Python 2.3.4 - Connection to Sybase has been successfully tested with iODBC, including issuing a query - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC connection RJ Juneau Chief Technology Officer Maxxian Integration Inc. 155 Westhampton Drive Thornhill, Ontario Canada L4J 7X2 E-mail: rj@maxxian.com Phone: +1 905 482 9429 Cell: +1 416 897 6682 Toll free: +1 866 758 9161 Fax: +1 647 722 2038 -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050506/aef33361/attachment-0036.htm From mal at egenix.com Fri May 6 18:27:37 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 21 20:00:58 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC In-Reply-To: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> References: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Message-ID: <427B8CE9.1010601@egenix.com> RJ Juneau wrote: > Still on eval for the product. > > I cannot get a stable connection to Sybase via the iODBC drivers. > > - The Sybase ODBC connection - including a query - have been verified at > the iODBC level. > - The setup is already working well for ODBC connection to MySQL. > > Symptoms include: > > - If I click on "Open Connection", it still comes back with "Connection > Closed" when I go to a ZSQL method > - Using 'Connect on Demand' is not working either. > - Clicking "Open Connection" gives me the following error: > > Connection string: DSN=lixbox_sybase; > UID=sa; > PWD=XXXXXXX Try writing the connection string on one line and without whitespace. ODBC drivers sometimes have problems with this. > Connection pool entry: 0 > Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection > rejected by data source', 7952) This is a generic error that relates to authentication or firewall problems. It is possible that turning on ODBC tracing the ODBC manager will give more clues as to the real cause of the problem. > The odbc.ini definition for DSN "lixbox_sybase" is as follows: > > [lixbox_sybase] > JetFix = No > NoRowSetSizeLimit = No > Description = Test connection to listbox > Options = LIXBOX > DSQUERY = SQLSERVER > TDSHOST = lixbox > TDSPORT = 5000 > TDSVER = 5.0 > SQLSERVER_CATALOG = N > CURSOR_SENSITIVITY = LOW > UserName = sa > Password = XXXXXXXX > ServerType = Sybase 10/11/12 > Driver = /opt/openlink/lib/sql_mt_lt.so > Database = pubs2 > ReadOnly = no > NoAutoCommit = No > NoLoginBox = No > FetchBufferSize = 60 > > > Other relevant data: > - Connecting via OpenLink's iODBC > - Zope 2.7.6-final > - Python 2.3.4 > - Connection to Sybase has been successfully tested with iODBC, > including issuing a query > - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC > connection > > > > RJ Juneau > Chief Technology Officer > Maxxian Integration Inc. > 155 Westhampton Drive > Thornhill, Ontario > Canada L4J 7X2 > E-mail: rj@maxxian.com > Phone: +1 905 482 9429 > Cell: +1 416 897 6682 > Toll free: +1 866 758 9161 > Fax: +1 647 722 2038 > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 06 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From calisp at gmail.com Sun May 15 23:49:03 2005 From: calisp at gmail.com (calisp@gmail.com) Date: Sat Jan 21 20:00:58 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK Message-ID: Hi, I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the following error... 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the last phase of a two-phase commit. This shouldn't happen. Traceback (most recent call last): File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one jar.tpc_finish(self) File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish try: self._finish() File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could not perform COMMIT or ROLLBACK', 1023) What could be causing this? Can I get the mxODBCZopeDA source from somewhere? It would make debugging this much easier. Thanks, Calisp. From mal at egenix.com Mon May 16 13:52:12 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 21 20:00:58 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK In-Reply-To: References: Message-ID: <42887B5C.4010109@egenix.com> calisp@gmail.com wrote: > Hi, > > I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with > unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the > following error... > > 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the > last phase of a two-phase commit. This shouldn't happen. > Traceback (most recent call last): > File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one > jar.tpc_finish(self) > File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish > try: self._finish() > File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish > File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler > ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could > not perform COMMIT or ROLLBACK', 1023) You should have a look at the database logs to see what prevented the commit from being completed. > What could be causing this? Hard to say: mxODBCZopeDA is trying to commit the transaction, but the driver or database failed to complete the request. The above error was generated by the ODBC driver. This could be network or DNS problems, or be related to a bug in FreeTDS (which is getting more stable with every new release, but should still be considered beta quality software at the moment). > Can I get the mxODBCZopeDA source from > somewhere? It would make debugging this much easier. Getting the source is not an option and won't help much either since the source of the problem is not mxODBCZopeDA. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 16 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Sun May 1 21:29:25 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 22 08:03:02 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <427259F3.4090806@egenix.com> References: <20050427130906.52878.qmail@web30008.mail.mud.yahoo.com> <427259F3.4090806@egenix.com> Message-ID: <42752005.7080904@egenix.com> M.-A. Lemburg wrote: > David Rushby wrote: > >> --- "M.-A. Lemburg" wrote: >> >>> Are you using the standard mxDateTime build or one >>> with WANT_SUBCLASSABLE_TYPES defined... >> >> >> >> Presumably "the standard", since I just built with 'py24d setup.py >> build', making no attempt to enable special directives. >> >> >>> ... (mxDateTime_Deallocate is only used by the latter)? >> >> >> >> That's true in 2.1.0-2005-04-15, but not in 2.1.0b5. >> >> >>> In any case, please try our latest snapshot: >>> >>> >> >> http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-04-15.zip >> >>> to see if that makes any difference. >> >> >> >> I can't build it out of the box: > > > Hmm, looks like distutils' sdist command doesn't like our new > repository layout which uses symlinks (after we've switched to > subversion). > > We'll have to debug distutils first, I guess :-( Ok, we've found the problem and fixed it. Here's the new release (which does build out of the box at least on our boxes ;-): http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 01 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From davidrushby at yahoo.com Mon May 2 15:49:53 2005 From: davidrushby at yahoo.com (David Rushby) Date: Sun Jan 22 08:03:02 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Ok, we've found the problem and fixed it. Here's the new > release (which does build out of the box at least on our > boxes ;-): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip It does build now, but: py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" still behaves as it did when I submitted my original message: Fatal Python error: UNREF invalid object Aborted This is the same debug build of Python 2.4.1 that I was previously using, running the same configuration (CentOS Linux 4.0/i386, everything compiled with GCC 3.4.3). Have you examined my original claim as to the cause of the bug? __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 10:21:55 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 22 08:03:02 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> References: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> Message-ID: <42772693.8050306@egenix.com> David Rushby wrote: > --- "M.-A. Lemburg" wrote: > >>Ok, we've found the problem and fixed it. Here's the new >>release (which does build out of the box at least on our >>boxes ;-): >> >> > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip > > It does build now, but: > py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" > still behaves as it did when I submitted my original message: > Fatal Python error: UNREF invalid object > Aborted > > This is the same debug build of Python 2.4.1 that I was previously > using, running the same configuration (CentOS Linux 4.0/i386, > everything compiled with GCC 3.4.3). > > Have you examined my original claim as to the cause of the bug? No. We haven't had time for looking into it. I'm not sure whether your analysis of the problem is correct: if you don't define WANT_SUBCLASSABLE_TYPES, the API mxDateTime_Deallocate() is neither defined nor used. Furthermore, PyObject_Del() is only called by mxDateTime_Free() if you have explicitely edited mxDateTime.c to disabled the free list #defines. In a standard build, PyObject_Del() is only called at module finalization time. Note that the reason we call mxDateTime_Free() in the constructor is that we don't want the destructor of the object to be called. Py_DECREF() would call the destructor (mxDateTime_Deallocate). It is possible that the debug code in Python complains about the refcount in the object not being 0 at the time the object is finalized (module finalization time), but I don't see any such checks in PyObject_Free() (which is what PyObject_Del() maps to). Again, all of this does not happen in regular non-debug Python builds. Please be aware that we don't support debug builds, so fixing the problem (if there is one - gcc has some serious optimization problems on some combinations of platform and version) will take a while. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 09:27:37 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Sun Jan 22 08:03:02 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 Message-ID: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Hi all- I am trying to build the mx-base package, v.2.0.6. This will be used with postgresql 7.3.9, psycopg 1.1.18, and Roundup 0.8.2. RHEL 3.0 Python 2.3 egenix-mx-base-2.0.6.tar.gz I performed a: /usr/local/bin/python2.3 setup.py install Everything looks proper with the exeception of this series of warning statements: ----------------- gcc -pthread -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fno-strict-aliasing -fPIC -Imx/BeeBase/mxBeeBase -I/usr/local/incl ude/python2.3 -I/usr/local/include -c mx/BeeBase/mxBeeBase/btr.c -o build/temp.linux-i686-2.3/mx/BeeBase/mxBeeBase/mxBeeBa se/mx/BeeBase/mxBeeBase/btr.o mx/BeeBase/mxBeeBase/btr.c: In function `dumpBuf': mx/BeeBase/mxBeeBase/btr.c:249: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:250: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:255: warning: unsigned int format, long unsigned int arg (arg 4) mx/BeeBase/mxBeeBase/btr.c:256: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c: In function `_validateTree': mx/BeeBase/mxBeeBase/btr.c:330: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:337: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:339: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:349: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:351: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 3) creating build/lib.linux-i686-2.3/mx/BeeBase creating build/lib.linux-i686-2.3/mx/BeeBase/mxBeeBase -------------- Would someone be kind enough to let me know whether these messages were expected, and if not, how I might resolve these? Thanks! DC __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 22:06:33 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 22 08:03:02 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> References: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Message-ID: <4277CBB9.8020302@egenix.com> Dianne Chen wrote: > Hi all- > > I am trying to build the mx-base package, v.2.0.6. > This will be used with postgresql 7.3.9, psycopg > 1.1.18, and Roundup 0.8.2. > > RHEL 3.0 > Python 2.3 > egenix-mx-base-2.0.6.tar.gz > > I performed a: > > /usr/local/bin/python2.3 setup.py install > > Everything looks proper with the exeception of this > series of warning statements: > > ----------------- > ... > -------------- > > Would someone be kind enough to let me know whether > these messages were expected, and if not, how I might > resolve these? These warning can safely be ignored. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 13:41:14 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Sun Jan 22 08:03:02 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: 6667 Message-ID: <20050503194114.72091.qmail@web31414.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Dianne Chen wrote: > > Hi all- > > > > I am trying to build the mx-base package, v.2.0.6. > > This will be used with postgresql 7.3.9, psycopg > > 1.1.18, and Roundup 0.8.2. > > > > RHEL 3.0 > > Python 2.3 > > egenix-mx-base-2.0.6.tar.gz > > > > I performed a: > > > > /usr/local/bin/python2.3 setup.py install > > > > Everything looks proper with the exeception of > this > > series of warning statements: > > > > ----------------- > > ... > > -------------- > > > > Would someone be kind enough to let me know > whether > > these messages were expected, and if not, how I > might > > resolve these? > > These warning can safely be ignored. > > -- > Marc-Andre Lemburg > eGenix.com > Marc- Thank you very much for the reply. It helps greatly. With kind regards, DC __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From davidrushby at yahoo.com Tue May 3 17:18:46 2005 From: davidrushby at yahoo.com (David Rushby) Date: Sun Jan 22 08:03:02 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050503231846.35012.qmail@web30009.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > I'm not sure whether your analysis of the problem is correct... Indeed, my original analysis wasn't correct; I think this one is. The fatal error I'm complaining about only arises if the arguments to DateTime.DateTime are invalid, so that the object is deallocated in the onError block of mxDateTime_FromDateAndTime. If the object is created successfully, and later deallocated by Python's garbage collector, the fatal error doesn't arise. Here's my analysis of the problem: --- If the debugging directive Py_TRACE_REFS is enabled, as it is in my case, the Python interpreter maintains a doubly linked list of all Python objects (named refchain) via the _ob_next and _ob_prev pointers added to PyObject via _PyObject_HEAD_EXTRA. Each object is inserted into refchain by the _Py_AddToAllObjects call in _Py_NewReference, and removed from refchain by the _Py_ForgetReference call in _Py_Dealloc. _Py_ForgetReference performs an integrity check on the object being deallocated (op) to make sure that its neighbors in refchain recognize it. Specifically, _Py_ForgetReference verifies that the _ob_next pointer of the previous object in refchain (op->_ob_prev->_ob_next) points to op, and that the _ob_prev pointer of the next object in refchain (op->_ob_next->_ob_prev) points to op. If either of those conditions is false, the interpreter raises the fatal error I'm seeing. After mxDateTime_New pulls an mxDateTimeObject out of the free list, it calls _Py_NewReference on that object to transform it from a "conceptually deallocated" object to a "conceptually allocated" one. _Py_NewReference inserts the object into refchain. Later, when the object is being "conceptually deallocated", it should be removed from refchain with _Py_ForgetReference. The version of _Py_Dealloc that's active when Py_TRACE_REFS is enabled does this (_Py_Dealloc is the element of Py_DECREF that performs the actual destruction). _Py_Dealloc first calls _Py_ForgetReference to remove the object from refchain, then calls the object's destructor (op->ob_type->tp_dealloc). If WANT_SUBCLASSABLE_TYPES is not defined (it is not in my case), the destructor for mxDateTime_Type is mxDateTime_Free. So, if a DateTime object is deallocated normally, as a result of its reference count falling to zero, _Py_Dealloc is called on the object, which first removes it from refchain, then passes it to mxDateTime_Free. If a DateTime object is destroyed prematurely, as a result of invalid arguments to its destructor, the onError handler calls mxDateTime_Free, so the object is "conceptually deallocated" (placed in the free list), *but* the object is not removed from refchain. So if a refchain-membership-integrity-check is performed on the object in question or one of its immediate neighbors in refchain, that integrity check fails, leading to the fatal error. --- The solution is to 'Py_DECREF(...)' the object in the onError handler of its constructor, instead of passing the object directly to mxDateTime_Free. That change solves two problems: 1) It causes _Py_Dealloc to execute, which in turn executes _Py_ForgetReference, so the object is removed from refchain, as it should be. 2) At present, objects that are created successfully and later deallocated by normal reference count mechanics have a reference count of 0 when they enter the free list, whereas objects whose constructors abort their creation due to invalid arguments have a reference count of 1 when they enter the free list. Although AFAIK this doesn't cause an actual execution problem (because the object's reference count is *explicitly set to 1* rather than *incremented by 1* when the object is later "conceptually allocated" by _Py_NewReference), it is likely to confuse future maintainers and thereby lead to the introduction of an actual execution problem. I assume that if you agree that this is a reasonable solution, you'll want to apply the change not only to mxDateTime_FromDateAndTime, but to all similar constructors in mxDateTime.c. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From rj at maxxian.com Thu May 5 01:57:40 2005 From: rj at maxxian.com (RJ Juneau) Date: Sun Jan 22 08:03:03 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c5512e$f72798c0$6505a8c0@rjlaptop> I'm on the 30 day evaluation for mxodbc_zope_da. I'm getting the following error when I submit some queries: Error Type: KeyError Error Value: 'query' I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 with UCS4. The error seems to be caused by multiple rows being returned. I did see an earlier posting with the same error message. The response suggested a template error, but this is clearly not the case here. The additional evidence I've gathered so far: - I'm running the test directly from the ZSQL method, so there's no template involved. - If I use the same query with an additional "where" clause to ensure that only one row is returned, it works - If I use a value in the 'where' clause with no rows returned, it works - The same ZSQL query is being used on a Windows machine running Zope and the free ZODBC module without a problem - The query has been verified directly in mysql-client-browser Other info: - The database is MySQL 4.1.10A-0 - iODBC is the DB driver RJ Juneau -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050505/68d278bf/attachment-0037.htm From mal at egenix.com Thu May 5 12:37:43 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 22 08:03:03 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c5512e$f72798c0$6505a8c0@rjlaptop> References: <000301c5512e$f72798c0$6505a8c0@rjlaptop> Message-ID: <4279E967.6010904@egenix.com> RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 > with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 09:37:42 2005 From: rj at maxxian.com (RJ Juneau) Date: Sun Jan 22 08:03:03 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000101c5516f$3b96de90$6505a8c0@rjlaptop> More interesting info on the problem: If I execute the query directly in the "test" window of the base eGenix mxODBC Database Connection window, it works fine and returns the 20 lines expected. That could point to a problem in the rendering, which seems to be where the traceback ends. Note that within the same Zope system I also have an ODBC connection to a Sybase database, and I have successfully tested multi-line ZSQL queries there. This is the traceback: Time 2005/05/05 07:55:15.294 GMT-4 Exception Type KeyError Exception Value 'query' Traceback (innermost last): Module ZPublisher.Publish, line 101, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 39, in call_object Module Shared.DC.ZRDB.DA, line 337, in manage_test Module DocumentTemplate.DT_String, line 474, in __call__ Module DocumentTemplate.DT_In, line 602, in renderwb Module DocumentTemplate.DT_Var, line 219, in render KeyError: 'query' I don't think the following is an issue, but I'll include it for completeness.I am also getting the following iODBC warnings and errors in the Zope console log, which are related to the ODBC parameters being passed by iODBC. Note that these errors also appear for all of the successful queries. [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (Setup). [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (UsageCount). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Timeout). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Reuse). As for the ZSQL snippet from the template... Since there's no template involved yet (I'm still testing directly from the ZSQL method), I assume you mean the SQL code? select h.host_name, s.system_name, s.system_handle, count(*) from terminal t, system_map s, host h where t.system_index = s.system_index and s.host_index = h.host_index group by s.system_name order by h.host_name Nothing complicated here. There are no parameters passed to the query. RJ -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: May 5, 2005 5:38 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: Re: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is > 2.3.4 with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ---------------------------------------------------------------------- > -- > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 16:00:32 2005 From: charlie at egenix.com (Charlie Clark) Date: Sun Jan 22 08:03:03 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000101c5516f$3b96de90$6505a8c0@rjlaptop> References: <000101c5516f$3b96de90$6505a8c0@rjlaptop> Message-ID: <20050505150032.644.1@bepc.1115296715.fake> On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base eGenix > mxODBC Database Connection window, it works fine and returns the 20 > lines expected. That could point to a problem in the rendering, which > seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection to > a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 10:22:17 2005 From: rj at maxxian.com (RJ Juneau) Date: Sun Jan 22 08:03:03 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505150032.644.1@bepc.1115296715.fake> Message-ID: <000201c55175$75bcad10$6505a8c0@rjlaptop> At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 11:47:14 2005 From: rj at maxxian.com (RJ Juneau) Date: Sun Jan 22 08:03:03 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c55181$549be0e0$6505a8c0@rjlaptop> Charlie, I found a fix. Here it is in case anyone else runs into this. You were correct - the problem is in another part of Zope. Based on your feedback, I did a bit more searching and found something here: http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. html The problem appears to be in Zope versions after 2.7.0. I'm running 2.7.6, and the post indicates that it also happens in 2.7.4. The solution: Edit file /lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. There are two lines in the file that start with . Edit them as follows: Change first line to: Change second line to: Just to be after, I shut down Zope before I made the changes and restarted it after. Thanks for the help! RJ -----Original Message----- From: RJ Juneau [mailto:rj@maxxian.com] Sent: May 5, 2005 9:22 AM To: 'Charlie Clark' Cc: 'egenix-users@lists.egenix.com' Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 17:57:25 2005 From: charlie at egenix.com (Charlie Clark) Date: Sun Jan 22 08:03:03 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <20050505165725.3380.2@bepc.1115296715.fake> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Thu May 5 09:15:21 2005 From: charlie at egenix.com (Charlie Clark) Date: Sun Jan 22 08:03:03 2006 Subject: [Zope-DB] RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <000001c55185$41477730$6b00a8c0@fonacier.local> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________ Zope-DB mailing list Zope-DB@zope.org http://mail.zope.org/mailman/listinfo/zope-db From rj at maxxian.com Thu May 5 12:38:00 2005 From: rj at maxxian.com (RJ Juneau) Date: Sun Jan 22 08:03:03 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000001c55188$6b841eb0$6505a8c0@rjlaptop> I just double-checked. Zope-2.7.6-final. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 12:49:16 2005 From: rj at maxxian.com (RJ Juneau) Date: Sun Jan 22 08:03:03 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000501c55189$fe149ba0$6505a8c0@rjlaptop> Charlie, The fix has only been applied for 2.7.7, 2.8b2. The info is in the original bug report which is closed and can be found here: http://www.zope.org/Collectors/Zope/1745 RJ -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Fri May 6 11:50:09 2005 From: rj at maxxian.com (RJ Juneau) Date: Sun Jan 22 08:03:03 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC Message-ID: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Still on eval for the product. I cannot get a stable connection to Sybase via the iODBC drivers. - The Sybase ODBC connection - including a query - have been verified at the iODBC level. - The setup is already working well for ODBC connection to MySQL. Symptoms include: - If I click on "Open Connection", it still comes back with "Connection Closed" when I go to a ZSQL method - Using 'Connect on Demand' is not working either. - Clicking "Open Connection" gives me the following error: Connection string: DSN=lixbox_sybase; UID=sa; PWD=XXXXXXX Connection pool entry: 0 Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection rejected by data source', 7952) The odbc.ini definition for DSN "lixbox_sybase" is as follows: [lixbox_sybase] JetFix = No NoRowSetSizeLimit = No Description = Test connection to listbox Options = LIXBOX DSQUERY = SQLSERVER TDSHOST = lixbox TDSPORT = 5000 TDSVER = 5.0 SQLSERVER_CATALOG = N CURSOR_SENSITIVITY = LOW UserName = sa Password = XXXXXXXX ServerType = Sybase 10/11/12 Driver = /opt/openlink/lib/sql_mt_lt.so Database = pubs2 ReadOnly = no NoAutoCommit = No NoLoginBox = No FetchBufferSize = 60 Other relevant data: - Connecting via OpenLink's iODBC - Zope 2.7.6-final - Python 2.3.4 - Connection to Sybase has been successfully tested with iODBC, including issuing a query - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC connection RJ Juneau Chief Technology Officer Maxxian Integration Inc. 155 Westhampton Drive Thornhill, Ontario Canada L4J 7X2 E-mail: rj@maxxian.com Phone: +1 905 482 9429 Cell: +1 416 897 6682 Toll free: +1 866 758 9161 Fax: +1 647 722 2038 -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050506/aef33361/attachment-0037.htm From mal at egenix.com Fri May 6 18:27:37 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 22 08:03:03 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC In-Reply-To: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> References: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Message-ID: <427B8CE9.1010601@egenix.com> RJ Juneau wrote: > Still on eval for the product. > > I cannot get a stable connection to Sybase via the iODBC drivers. > > - The Sybase ODBC connection - including a query - have been verified at > the iODBC level. > - The setup is already working well for ODBC connection to MySQL. > > Symptoms include: > > - If I click on "Open Connection", it still comes back with "Connection > Closed" when I go to a ZSQL method > - Using 'Connect on Demand' is not working either. > - Clicking "Open Connection" gives me the following error: > > Connection string: DSN=lixbox_sybase; > UID=sa; > PWD=XXXXXXX Try writing the connection string on one line and without whitespace. ODBC drivers sometimes have problems with this. > Connection pool entry: 0 > Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection > rejected by data source', 7952) This is a generic error that relates to authentication or firewall problems. It is possible that turning on ODBC tracing the ODBC manager will give more clues as to the real cause of the problem. > The odbc.ini definition for DSN "lixbox_sybase" is as follows: > > [lixbox_sybase] > JetFix = No > NoRowSetSizeLimit = No > Description = Test connection to listbox > Options = LIXBOX > DSQUERY = SQLSERVER > TDSHOST = lixbox > TDSPORT = 5000 > TDSVER = 5.0 > SQLSERVER_CATALOG = N > CURSOR_SENSITIVITY = LOW > UserName = sa > Password = XXXXXXXX > ServerType = Sybase 10/11/12 > Driver = /opt/openlink/lib/sql_mt_lt.so > Database = pubs2 > ReadOnly = no > NoAutoCommit = No > NoLoginBox = No > FetchBufferSize = 60 > > > Other relevant data: > - Connecting via OpenLink's iODBC > - Zope 2.7.6-final > - Python 2.3.4 > - Connection to Sybase has been successfully tested with iODBC, > including issuing a query > - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC > connection > > > > RJ Juneau > Chief Technology Officer > Maxxian Integration Inc. > 155 Westhampton Drive > Thornhill, Ontario > Canada L4J 7X2 > E-mail: rj@maxxian.com > Phone: +1 905 482 9429 > Cell: +1 416 897 6682 > Toll free: +1 866 758 9161 > Fax: +1 647 722 2038 > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 06 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From calisp at gmail.com Sun May 15 23:49:03 2005 From: calisp at gmail.com (calisp@gmail.com) Date: Sun Jan 22 08:03:03 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK Message-ID: Hi, I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the following error... 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the last phase of a two-phase commit. This shouldn't happen. Traceback (most recent call last): File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one jar.tpc_finish(self) File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish try: self._finish() File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could not perform COMMIT or ROLLBACK', 1023) What could be causing this? Can I get the mxODBCZopeDA source from somewhere? It would make debugging this much easier. Thanks, Calisp. From mal at egenix.com Mon May 16 13:52:12 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 22 08:03:03 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK In-Reply-To: References: Message-ID: <42887B5C.4010109@egenix.com> calisp@gmail.com wrote: > Hi, > > I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with > unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the > following error... > > 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the > last phase of a two-phase commit. This shouldn't happen. > Traceback (most recent call last): > File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one > jar.tpc_finish(self) > File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish > try: self._finish() > File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish > File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler > ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could > not perform COMMIT or ROLLBACK', 1023) You should have a look at the database logs to see what prevented the commit from being completed. > What could be causing this? Hard to say: mxODBCZopeDA is trying to commit the transaction, but the driver or database failed to complete the request. The above error was generated by the ODBC driver. This could be network or DNS problems, or be related to a bug in FreeTDS (which is getting more stable with every new release, but should still be considered beta quality software at the moment). > Can I get the mxODBCZopeDA source from > somewhere? It would make debugging this much easier. Getting the source is not an option and won't help much either since the source of the problem is not mxODBCZopeDA. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 16 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Sun May 1 21:29:25 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 22 12:01:01 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <427259F3.4090806@egenix.com> References: <20050427130906.52878.qmail@web30008.mail.mud.yahoo.com> <427259F3.4090806@egenix.com> Message-ID: <42752005.7080904@egenix.com> M.-A. Lemburg wrote: > David Rushby wrote: > >> --- "M.-A. Lemburg" wrote: >> >>> Are you using the standard mxDateTime build or one >>> with WANT_SUBCLASSABLE_TYPES defined... >> >> >> >> Presumably "the standard", since I just built with 'py24d setup.py >> build', making no attempt to enable special directives. >> >> >>> ... (mxDateTime_Deallocate is only used by the latter)? >> >> >> >> That's true in 2.1.0-2005-04-15, but not in 2.1.0b5. >> >> >>> In any case, please try our latest snapshot: >>> >>> >> >> http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-04-15.zip >> >>> to see if that makes any difference. >> >> >> >> I can't build it out of the box: > > > Hmm, looks like distutils' sdist command doesn't like our new > repository layout which uses symlinks (after we've switched to > subversion). > > We'll have to debug distutils first, I guess :-( Ok, we've found the problem and fixed it. Here's the new release (which does build out of the box at least on our boxes ;-): http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 01 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From davidrushby at yahoo.com Mon May 2 15:49:53 2005 From: davidrushby at yahoo.com (David Rushby) Date: Sun Jan 22 12:01:01 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Ok, we've found the problem and fixed it. Here's the new > release (which does build out of the box at least on our > boxes ;-): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip It does build now, but: py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" still behaves as it did when I submitted my original message: Fatal Python error: UNREF invalid object Aborted This is the same debug build of Python 2.4.1 that I was previously using, running the same configuration (CentOS Linux 4.0/i386, everything compiled with GCC 3.4.3). Have you examined my original claim as to the cause of the bug? __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 10:21:55 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 22 12:01:01 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> References: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> Message-ID: <42772693.8050306@egenix.com> David Rushby wrote: > --- "M.-A. Lemburg" wrote: > >>Ok, we've found the problem and fixed it. Here's the new >>release (which does build out of the box at least on our >>boxes ;-): >> >> > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip > > It does build now, but: > py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" > still behaves as it did when I submitted my original message: > Fatal Python error: UNREF invalid object > Aborted > > This is the same debug build of Python 2.4.1 that I was previously > using, running the same configuration (CentOS Linux 4.0/i386, > everything compiled with GCC 3.4.3). > > Have you examined my original claim as to the cause of the bug? No. We haven't had time for looking into it. I'm not sure whether your analysis of the problem is correct: if you don't define WANT_SUBCLASSABLE_TYPES, the API mxDateTime_Deallocate() is neither defined nor used. Furthermore, PyObject_Del() is only called by mxDateTime_Free() if you have explicitely edited mxDateTime.c to disabled the free list #defines. In a standard build, PyObject_Del() is only called at module finalization time. Note that the reason we call mxDateTime_Free() in the constructor is that we don't want the destructor of the object to be called. Py_DECREF() would call the destructor (mxDateTime_Deallocate). It is possible that the debug code in Python complains about the refcount in the object not being 0 at the time the object is finalized (module finalization time), but I don't see any such checks in PyObject_Free() (which is what PyObject_Del() maps to). Again, all of this does not happen in regular non-debug Python builds. Please be aware that we don't support debug builds, so fixing the problem (if there is one - gcc has some serious optimization problems on some combinations of platform and version) will take a while. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 09:27:37 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Sun Jan 22 12:01:01 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 Message-ID: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Hi all- I am trying to build the mx-base package, v.2.0.6. This will be used with postgresql 7.3.9, psycopg 1.1.18, and Roundup 0.8.2. RHEL 3.0 Python 2.3 egenix-mx-base-2.0.6.tar.gz I performed a: /usr/local/bin/python2.3 setup.py install Everything looks proper with the exeception of this series of warning statements: ----------------- gcc -pthread -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fno-strict-aliasing -fPIC -Imx/BeeBase/mxBeeBase -I/usr/local/incl ude/python2.3 -I/usr/local/include -c mx/BeeBase/mxBeeBase/btr.c -o build/temp.linux-i686-2.3/mx/BeeBase/mxBeeBase/mxBeeBa se/mx/BeeBase/mxBeeBase/btr.o mx/BeeBase/mxBeeBase/btr.c: In function `dumpBuf': mx/BeeBase/mxBeeBase/btr.c:249: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:250: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:255: warning: unsigned int format, long unsigned int arg (arg 4) mx/BeeBase/mxBeeBase/btr.c:256: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c: In function `_validateTree': mx/BeeBase/mxBeeBase/btr.c:330: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:337: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:339: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:349: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:351: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 3) creating build/lib.linux-i686-2.3/mx/BeeBase creating build/lib.linux-i686-2.3/mx/BeeBase/mxBeeBase -------------- Would someone be kind enough to let me know whether these messages were expected, and if not, how I might resolve these? Thanks! DC __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 22:06:33 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 22 12:01:01 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> References: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Message-ID: <4277CBB9.8020302@egenix.com> Dianne Chen wrote: > Hi all- > > I am trying to build the mx-base package, v.2.0.6. > This will be used with postgresql 7.3.9, psycopg > 1.1.18, and Roundup 0.8.2. > > RHEL 3.0 > Python 2.3 > egenix-mx-base-2.0.6.tar.gz > > I performed a: > > /usr/local/bin/python2.3 setup.py install > > Everything looks proper with the exeception of this > series of warning statements: > > ----------------- > ... > -------------- > > Would someone be kind enough to let me know whether > these messages were expected, and if not, how I might > resolve these? These warning can safely be ignored. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 13:41:14 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Sun Jan 22 12:01:01 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: 6667 Message-ID: <20050503194114.72091.qmail@web31414.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Dianne Chen wrote: > > Hi all- > > > > I am trying to build the mx-base package, v.2.0.6. > > This will be used with postgresql 7.3.9, psycopg > > 1.1.18, and Roundup 0.8.2. > > > > RHEL 3.0 > > Python 2.3 > > egenix-mx-base-2.0.6.tar.gz > > > > I performed a: > > > > /usr/local/bin/python2.3 setup.py install > > > > Everything looks proper with the exeception of > this > > series of warning statements: > > > > ----------------- > > ... > > -------------- > > > > Would someone be kind enough to let me know > whether > > these messages were expected, and if not, how I > might > > resolve these? > > These warning can safely be ignored. > > -- > Marc-Andre Lemburg > eGenix.com > Marc- Thank you very much for the reply. It helps greatly. With kind regards, DC __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From davidrushby at yahoo.com Tue May 3 17:18:46 2005 From: davidrushby at yahoo.com (David Rushby) Date: Sun Jan 22 12:01:01 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050503231846.35012.qmail@web30009.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > I'm not sure whether your analysis of the problem is correct... Indeed, my original analysis wasn't correct; I think this one is. The fatal error I'm complaining about only arises if the arguments to DateTime.DateTime are invalid, so that the object is deallocated in the onError block of mxDateTime_FromDateAndTime. If the object is created successfully, and later deallocated by Python's garbage collector, the fatal error doesn't arise. Here's my analysis of the problem: --- If the debugging directive Py_TRACE_REFS is enabled, as it is in my case, the Python interpreter maintains a doubly linked list of all Python objects (named refchain) via the _ob_next and _ob_prev pointers added to PyObject via _PyObject_HEAD_EXTRA. Each object is inserted into refchain by the _Py_AddToAllObjects call in _Py_NewReference, and removed from refchain by the _Py_ForgetReference call in _Py_Dealloc. _Py_ForgetReference performs an integrity check on the object being deallocated (op) to make sure that its neighbors in refchain recognize it. Specifically, _Py_ForgetReference verifies that the _ob_next pointer of the previous object in refchain (op->_ob_prev->_ob_next) points to op, and that the _ob_prev pointer of the next object in refchain (op->_ob_next->_ob_prev) points to op. If either of those conditions is false, the interpreter raises the fatal error I'm seeing. After mxDateTime_New pulls an mxDateTimeObject out of the free list, it calls _Py_NewReference on that object to transform it from a "conceptually deallocated" object to a "conceptually allocated" one. _Py_NewReference inserts the object into refchain. Later, when the object is being "conceptually deallocated", it should be removed from refchain with _Py_ForgetReference. The version of _Py_Dealloc that's active when Py_TRACE_REFS is enabled does this (_Py_Dealloc is the element of Py_DECREF that performs the actual destruction). _Py_Dealloc first calls _Py_ForgetReference to remove the object from refchain, then calls the object's destructor (op->ob_type->tp_dealloc). If WANT_SUBCLASSABLE_TYPES is not defined (it is not in my case), the destructor for mxDateTime_Type is mxDateTime_Free. So, if a DateTime object is deallocated normally, as a result of its reference count falling to zero, _Py_Dealloc is called on the object, which first removes it from refchain, then passes it to mxDateTime_Free. If a DateTime object is destroyed prematurely, as a result of invalid arguments to its destructor, the onError handler calls mxDateTime_Free, so the object is "conceptually deallocated" (placed in the free list), *but* the object is not removed from refchain. So if a refchain-membership-integrity-check is performed on the object in question or one of its immediate neighbors in refchain, that integrity check fails, leading to the fatal error. --- The solution is to 'Py_DECREF(...)' the object in the onError handler of its constructor, instead of passing the object directly to mxDateTime_Free. That change solves two problems: 1) It causes _Py_Dealloc to execute, which in turn executes _Py_ForgetReference, so the object is removed from refchain, as it should be. 2) At present, objects that are created successfully and later deallocated by normal reference count mechanics have a reference count of 0 when they enter the free list, whereas objects whose constructors abort their creation due to invalid arguments have a reference count of 1 when they enter the free list. Although AFAIK this doesn't cause an actual execution problem (because the object's reference count is *explicitly set to 1* rather than *incremented by 1* when the object is later "conceptually allocated" by _Py_NewReference), it is likely to confuse future maintainers and thereby lead to the introduction of an actual execution problem. I assume that if you agree that this is a reasonable solution, you'll want to apply the change not only to mxDateTime_FromDateAndTime, but to all similar constructors in mxDateTime.c. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From rj at maxxian.com Thu May 5 01:57:40 2005 From: rj at maxxian.com (RJ Juneau) Date: Sun Jan 22 12:01:01 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c5512e$f72798c0$6505a8c0@rjlaptop> I'm on the 30 day evaluation for mxodbc_zope_da. I'm getting the following error when I submit some queries: Error Type: KeyError Error Value: 'query' I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 with UCS4. The error seems to be caused by multiple rows being returned. I did see an earlier posting with the same error message. The response suggested a template error, but this is clearly not the case here. The additional evidence I've gathered so far: - I'm running the test directly from the ZSQL method, so there's no template involved. - If I use the same query with an additional "where" clause to ensure that only one row is returned, it works - If I use a value in the 'where' clause with no rows returned, it works - The same ZSQL query is being used on a Windows machine running Zope and the free ZODBC module without a problem - The query has been verified directly in mysql-client-browser Other info: - The database is MySQL 4.1.10A-0 - iODBC is the DB driver RJ Juneau -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050505/68d278bf/attachment-0038.htm From mal at egenix.com Thu May 5 12:37:43 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 22 12:01:01 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c5512e$f72798c0$6505a8c0@rjlaptop> References: <000301c5512e$f72798c0$6505a8c0@rjlaptop> Message-ID: <4279E967.6010904@egenix.com> RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 > with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 09:37:42 2005 From: rj at maxxian.com (RJ Juneau) Date: Sun Jan 22 12:01:01 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000101c5516f$3b96de90$6505a8c0@rjlaptop> More interesting info on the problem: If I execute the query directly in the "test" window of the base eGenix mxODBC Database Connection window, it works fine and returns the 20 lines expected. That could point to a problem in the rendering, which seems to be where the traceback ends. Note that within the same Zope system I also have an ODBC connection to a Sybase database, and I have successfully tested multi-line ZSQL queries there. This is the traceback: Time 2005/05/05 07:55:15.294 GMT-4 Exception Type KeyError Exception Value 'query' Traceback (innermost last): Module ZPublisher.Publish, line 101, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 39, in call_object Module Shared.DC.ZRDB.DA, line 337, in manage_test Module DocumentTemplate.DT_String, line 474, in __call__ Module DocumentTemplate.DT_In, line 602, in renderwb Module DocumentTemplate.DT_Var, line 219, in render KeyError: 'query' I don't think the following is an issue, but I'll include it for completeness.I am also getting the following iODBC warnings and errors in the Zope console log, which are related to the ODBC parameters being passed by iODBC. Note that these errors also appear for all of the successful queries. [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (Setup). [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (UsageCount). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Timeout). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Reuse). As for the ZSQL snippet from the template... Since there's no template involved yet (I'm still testing directly from the ZSQL method), I assume you mean the SQL code? select h.host_name, s.system_name, s.system_handle, count(*) from terminal t, system_map s, host h where t.system_index = s.system_index and s.host_index = h.host_index group by s.system_name order by h.host_name Nothing complicated here. There are no parameters passed to the query. RJ -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: May 5, 2005 5:38 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: Re: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is > 2.3.4 with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ---------------------------------------------------------------------- > -- > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 16:00:32 2005 From: charlie at egenix.com (Charlie Clark) Date: Sun Jan 22 12:01:01 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000101c5516f$3b96de90$6505a8c0@rjlaptop> References: <000101c5516f$3b96de90$6505a8c0@rjlaptop> Message-ID: <20050505150032.644.1@bepc.1115296715.fake> On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base eGenix > mxODBC Database Connection window, it works fine and returns the 20 > lines expected. That could point to a problem in the rendering, which > seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection to > a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 10:22:17 2005 From: rj at maxxian.com (RJ Juneau) Date: Sun Jan 22 12:01:01 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505150032.644.1@bepc.1115296715.fake> Message-ID: <000201c55175$75bcad10$6505a8c0@rjlaptop> At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 11:47:14 2005 From: rj at maxxian.com (RJ Juneau) Date: Sun Jan 22 12:01:01 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c55181$549be0e0$6505a8c0@rjlaptop> Charlie, I found a fix. Here it is in case anyone else runs into this. You were correct - the problem is in another part of Zope. Based on your feedback, I did a bit more searching and found something here: http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. html The problem appears to be in Zope versions after 2.7.0. I'm running 2.7.6, and the post indicates that it also happens in 2.7.4. The solution: Edit file /lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. There are two lines in the file that start with . Edit them as follows: Change first line to: Change second line to: Just to be after, I shut down Zope before I made the changes and restarted it after. Thanks for the help! RJ -----Original Message----- From: RJ Juneau [mailto:rj@maxxian.com] Sent: May 5, 2005 9:22 AM To: 'Charlie Clark' Cc: 'egenix-users@lists.egenix.com' Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 17:57:25 2005 From: charlie at egenix.com (Charlie Clark) Date: Sun Jan 22 12:01:01 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <20050505165725.3380.2@bepc.1115296715.fake> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Thu May 5 09:15:21 2005 From: charlie at egenix.com (Charlie Clark) Date: Sun Jan 22 12:01:01 2006 Subject: [Zope-DB] RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <000001c55185$41477730$6b00a8c0@fonacier.local> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________ Zope-DB mailing list Zope-DB@zope.org http://mail.zope.org/mailman/listinfo/zope-db From rj at maxxian.com Thu May 5 12:38:00 2005 From: rj at maxxian.com (RJ Juneau) Date: Sun Jan 22 12:01:01 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000001c55188$6b841eb0$6505a8c0@rjlaptop> I just double-checked. Zope-2.7.6-final. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 12:49:16 2005 From: rj at maxxian.com (RJ Juneau) Date: Sun Jan 22 12:01:01 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000501c55189$fe149ba0$6505a8c0@rjlaptop> Charlie, The fix has only been applied for 2.7.7, 2.8b2. The info is in the original bug report which is closed and can be found here: http://www.zope.org/Collectors/Zope/1745 RJ -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Fri May 6 11:50:09 2005 From: rj at maxxian.com (RJ Juneau) Date: Sun Jan 22 12:01:01 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC Message-ID: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Still on eval for the product. I cannot get a stable connection to Sybase via the iODBC drivers. - The Sybase ODBC connection - including a query - have been verified at the iODBC level. - The setup is already working well for ODBC connection to MySQL. Symptoms include: - If I click on "Open Connection", it still comes back with "Connection Closed" when I go to a ZSQL method - Using 'Connect on Demand' is not working either. - Clicking "Open Connection" gives me the following error: Connection string: DSN=lixbox_sybase; UID=sa; PWD=XXXXXXX Connection pool entry: 0 Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection rejected by data source', 7952) The odbc.ini definition for DSN "lixbox_sybase" is as follows: [lixbox_sybase] JetFix = No NoRowSetSizeLimit = No Description = Test connection to listbox Options = LIXBOX DSQUERY = SQLSERVER TDSHOST = lixbox TDSPORT = 5000 TDSVER = 5.0 SQLSERVER_CATALOG = N CURSOR_SENSITIVITY = LOW UserName = sa Password = XXXXXXXX ServerType = Sybase 10/11/12 Driver = /opt/openlink/lib/sql_mt_lt.so Database = pubs2 ReadOnly = no NoAutoCommit = No NoLoginBox = No FetchBufferSize = 60 Other relevant data: - Connecting via OpenLink's iODBC - Zope 2.7.6-final - Python 2.3.4 - Connection to Sybase has been successfully tested with iODBC, including issuing a query - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC connection RJ Juneau Chief Technology Officer Maxxian Integration Inc. 155 Westhampton Drive Thornhill, Ontario Canada L4J 7X2 E-mail: rj@maxxian.com Phone: +1 905 482 9429 Cell: +1 416 897 6682 Toll free: +1 866 758 9161 Fax: +1 647 722 2038 -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050506/aef33361/attachment-0038.htm From mal at egenix.com Fri May 6 18:27:37 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 22 12:01:01 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC In-Reply-To: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> References: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Message-ID: <427B8CE9.1010601@egenix.com> RJ Juneau wrote: > Still on eval for the product. > > I cannot get a stable connection to Sybase via the iODBC drivers. > > - The Sybase ODBC connection - including a query - have been verified at > the iODBC level. > - The setup is already working well for ODBC connection to MySQL. > > Symptoms include: > > - If I click on "Open Connection", it still comes back with "Connection > Closed" when I go to a ZSQL method > - Using 'Connect on Demand' is not working either. > - Clicking "Open Connection" gives me the following error: > > Connection string: DSN=lixbox_sybase; > UID=sa; > PWD=XXXXXXX Try writing the connection string on one line and without whitespace. ODBC drivers sometimes have problems with this. > Connection pool entry: 0 > Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection > rejected by data source', 7952) This is a generic error that relates to authentication or firewall problems. It is possible that turning on ODBC tracing the ODBC manager will give more clues as to the real cause of the problem. > The odbc.ini definition for DSN "lixbox_sybase" is as follows: > > [lixbox_sybase] > JetFix = No > NoRowSetSizeLimit = No > Description = Test connection to listbox > Options = LIXBOX > DSQUERY = SQLSERVER > TDSHOST = lixbox > TDSPORT = 5000 > TDSVER = 5.0 > SQLSERVER_CATALOG = N > CURSOR_SENSITIVITY = LOW > UserName = sa > Password = XXXXXXXX > ServerType = Sybase 10/11/12 > Driver = /opt/openlink/lib/sql_mt_lt.so > Database = pubs2 > ReadOnly = no > NoAutoCommit = No > NoLoginBox = No > FetchBufferSize = 60 > > > Other relevant data: > - Connecting via OpenLink's iODBC > - Zope 2.7.6-final > - Python 2.3.4 > - Connection to Sybase has been successfully tested with iODBC, > including issuing a query > - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC > connection > > > > RJ Juneau > Chief Technology Officer > Maxxian Integration Inc. > 155 Westhampton Drive > Thornhill, Ontario > Canada L4J 7X2 > E-mail: rj@maxxian.com > Phone: +1 905 482 9429 > Cell: +1 416 897 6682 > Toll free: +1 866 758 9161 > Fax: +1 647 722 2038 > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 06 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From calisp at gmail.com Sun May 15 23:49:03 2005 From: calisp at gmail.com (calisp@gmail.com) Date: Sun Jan 22 12:01:01 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK Message-ID: Hi, I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the following error... 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the last phase of a two-phase commit. This shouldn't happen. Traceback (most recent call last): File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one jar.tpc_finish(self) File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish try: self._finish() File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could not perform COMMIT or ROLLBACK', 1023) What could be causing this? Can I get the mxODBCZopeDA source from somewhere? It would make debugging this much easier. Thanks, Calisp. From mal at egenix.com Mon May 16 13:52:12 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 22 12:01:01 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK In-Reply-To: References: Message-ID: <42887B5C.4010109@egenix.com> calisp@gmail.com wrote: > Hi, > > I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with > unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the > following error... > > 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the > last phase of a two-phase commit. This shouldn't happen. > Traceback (most recent call last): > File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one > jar.tpc_finish(self) > File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish > try: self._finish() > File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish > File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler > ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could > not perform COMMIT or ROLLBACK', 1023) You should have a look at the database logs to see what prevented the commit from being completed. > What could be causing this? Hard to say: mxODBCZopeDA is trying to commit the transaction, but the driver or database failed to complete the request. The above error was generated by the ODBC driver. This could be network or DNS problems, or be related to a bug in FreeTDS (which is getting more stable with every new release, but should still be considered beta quality software at the moment). > Can I get the mxODBCZopeDA source from > somewhere? It would make debugging this much easier. Getting the source is not an option and won't help much either since the source of the problem is not mxODBCZopeDA. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 16 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Sun May 1 21:29:25 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 22 16:01:36 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <427259F3.4090806@egenix.com> References: <20050427130906.52878.qmail@web30008.mail.mud.yahoo.com> <427259F3.4090806@egenix.com> Message-ID: <42752005.7080904@egenix.com> M.-A. Lemburg wrote: > David Rushby wrote: > >> --- "M.-A. Lemburg" wrote: >> >>> Are you using the standard mxDateTime build or one >>> with WANT_SUBCLASSABLE_TYPES defined... >> >> >> >> Presumably "the standard", since I just built with 'py24d setup.py >> build', making no attempt to enable special directives. >> >> >>> ... (mxDateTime_Deallocate is only used by the latter)? >> >> >> >> That's true in 2.1.0-2005-04-15, but not in 2.1.0b5. >> >> >>> In any case, please try our latest snapshot: >>> >>> >> >> http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-04-15.zip >> >>> to see if that makes any difference. >> >> >> >> I can't build it out of the box: > > > Hmm, looks like distutils' sdist command doesn't like our new > repository layout which uses symlinks (after we've switched to > subversion). > > We'll have to debug distutils first, I guess :-( Ok, we've found the problem and fixed it. Here's the new release (which does build out of the box at least on our boxes ;-): http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 01 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From davidrushby at yahoo.com Mon May 2 15:49:53 2005 From: davidrushby at yahoo.com (David Rushby) Date: Sun Jan 22 16:01:36 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Ok, we've found the problem and fixed it. Here's the new > release (which does build out of the box at least on our > boxes ;-): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip It does build now, but: py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" still behaves as it did when I submitted my original message: Fatal Python error: UNREF invalid object Aborted This is the same debug build of Python 2.4.1 that I was previously using, running the same configuration (CentOS Linux 4.0/i386, everything compiled with GCC 3.4.3). Have you examined my original claim as to the cause of the bug? __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 10:21:55 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 22 16:01:36 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> References: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> Message-ID: <42772693.8050306@egenix.com> David Rushby wrote: > --- "M.-A. Lemburg" wrote: > >>Ok, we've found the problem and fixed it. Here's the new >>release (which does build out of the box at least on our >>boxes ;-): >> >> > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip > > It does build now, but: > py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" > still behaves as it did when I submitted my original message: > Fatal Python error: UNREF invalid object > Aborted > > This is the same debug build of Python 2.4.1 that I was previously > using, running the same configuration (CentOS Linux 4.0/i386, > everything compiled with GCC 3.4.3). > > Have you examined my original claim as to the cause of the bug? No. We haven't had time for looking into it. I'm not sure whether your analysis of the problem is correct: if you don't define WANT_SUBCLASSABLE_TYPES, the API mxDateTime_Deallocate() is neither defined nor used. Furthermore, PyObject_Del() is only called by mxDateTime_Free() if you have explicitely edited mxDateTime.c to disabled the free list #defines. In a standard build, PyObject_Del() is only called at module finalization time. Note that the reason we call mxDateTime_Free() in the constructor is that we don't want the destructor of the object to be called. Py_DECREF() would call the destructor (mxDateTime_Deallocate). It is possible that the debug code in Python complains about the refcount in the object not being 0 at the time the object is finalized (module finalization time), but I don't see any such checks in PyObject_Free() (which is what PyObject_Del() maps to). Again, all of this does not happen in regular non-debug Python builds. Please be aware that we don't support debug builds, so fixing the problem (if there is one - gcc has some serious optimization problems on some combinations of platform and version) will take a while. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 09:27:37 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Sun Jan 22 16:01:36 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 Message-ID: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Hi all- I am trying to build the mx-base package, v.2.0.6. This will be used with postgresql 7.3.9, psycopg 1.1.18, and Roundup 0.8.2. RHEL 3.0 Python 2.3 egenix-mx-base-2.0.6.tar.gz I performed a: /usr/local/bin/python2.3 setup.py install Everything looks proper with the exeception of this series of warning statements: ----------------- gcc -pthread -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fno-strict-aliasing -fPIC -Imx/BeeBase/mxBeeBase -I/usr/local/incl ude/python2.3 -I/usr/local/include -c mx/BeeBase/mxBeeBase/btr.c -o build/temp.linux-i686-2.3/mx/BeeBase/mxBeeBase/mxBeeBa se/mx/BeeBase/mxBeeBase/btr.o mx/BeeBase/mxBeeBase/btr.c: In function `dumpBuf': mx/BeeBase/mxBeeBase/btr.c:249: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:250: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:255: warning: unsigned int format, long unsigned int arg (arg 4) mx/BeeBase/mxBeeBase/btr.c:256: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c: In function `_validateTree': mx/BeeBase/mxBeeBase/btr.c:330: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:337: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:339: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:349: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:351: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 3) creating build/lib.linux-i686-2.3/mx/BeeBase creating build/lib.linux-i686-2.3/mx/BeeBase/mxBeeBase -------------- Would someone be kind enough to let me know whether these messages were expected, and if not, how I might resolve these? Thanks! DC __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 22:06:33 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 22 16:01:36 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> References: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Message-ID: <4277CBB9.8020302@egenix.com> Dianne Chen wrote: > Hi all- > > I am trying to build the mx-base package, v.2.0.6. > This will be used with postgresql 7.3.9, psycopg > 1.1.18, and Roundup 0.8.2. > > RHEL 3.0 > Python 2.3 > egenix-mx-base-2.0.6.tar.gz > > I performed a: > > /usr/local/bin/python2.3 setup.py install > > Everything looks proper with the exeception of this > series of warning statements: > > ----------------- > ... > -------------- > > Would someone be kind enough to let me know whether > these messages were expected, and if not, how I might > resolve these? These warning can safely be ignored. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 13:41:14 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Sun Jan 22 16:01:36 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: 6667 Message-ID: <20050503194114.72091.qmail@web31414.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Dianne Chen wrote: > > Hi all- > > > > I am trying to build the mx-base package, v.2.0.6. > > This will be used with postgresql 7.3.9, psycopg > > 1.1.18, and Roundup 0.8.2. > > > > RHEL 3.0 > > Python 2.3 > > egenix-mx-base-2.0.6.tar.gz > > > > I performed a: > > > > /usr/local/bin/python2.3 setup.py install > > > > Everything looks proper with the exeception of > this > > series of warning statements: > > > > ----------------- > > ... > > -------------- > > > > Would someone be kind enough to let me know > whether > > these messages were expected, and if not, how I > might > > resolve these? > > These warning can safely be ignored. > > -- > Marc-Andre Lemburg > eGenix.com > Marc- Thank you very much for the reply. It helps greatly. With kind regards, DC __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From davidrushby at yahoo.com Tue May 3 17:18:46 2005 From: davidrushby at yahoo.com (David Rushby) Date: Sun Jan 22 16:01:36 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050503231846.35012.qmail@web30009.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > I'm not sure whether your analysis of the problem is correct... Indeed, my original analysis wasn't correct; I think this one is. The fatal error I'm complaining about only arises if the arguments to DateTime.DateTime are invalid, so that the object is deallocated in the onError block of mxDateTime_FromDateAndTime. If the object is created successfully, and later deallocated by Python's garbage collector, the fatal error doesn't arise. Here's my analysis of the problem: --- If the debugging directive Py_TRACE_REFS is enabled, as it is in my case, the Python interpreter maintains a doubly linked list of all Python objects (named refchain) via the _ob_next and _ob_prev pointers added to PyObject via _PyObject_HEAD_EXTRA. Each object is inserted into refchain by the _Py_AddToAllObjects call in _Py_NewReference, and removed from refchain by the _Py_ForgetReference call in _Py_Dealloc. _Py_ForgetReference performs an integrity check on the object being deallocated (op) to make sure that its neighbors in refchain recognize it. Specifically, _Py_ForgetReference verifies that the _ob_next pointer of the previous object in refchain (op->_ob_prev->_ob_next) points to op, and that the _ob_prev pointer of the next object in refchain (op->_ob_next->_ob_prev) points to op. If either of those conditions is false, the interpreter raises the fatal error I'm seeing. After mxDateTime_New pulls an mxDateTimeObject out of the free list, it calls _Py_NewReference on that object to transform it from a "conceptually deallocated" object to a "conceptually allocated" one. _Py_NewReference inserts the object into refchain. Later, when the object is being "conceptually deallocated", it should be removed from refchain with _Py_ForgetReference. The version of _Py_Dealloc that's active when Py_TRACE_REFS is enabled does this (_Py_Dealloc is the element of Py_DECREF that performs the actual destruction). _Py_Dealloc first calls _Py_ForgetReference to remove the object from refchain, then calls the object's destructor (op->ob_type->tp_dealloc). If WANT_SUBCLASSABLE_TYPES is not defined (it is not in my case), the destructor for mxDateTime_Type is mxDateTime_Free. So, if a DateTime object is deallocated normally, as a result of its reference count falling to zero, _Py_Dealloc is called on the object, which first removes it from refchain, then passes it to mxDateTime_Free. If a DateTime object is destroyed prematurely, as a result of invalid arguments to its destructor, the onError handler calls mxDateTime_Free, so the object is "conceptually deallocated" (placed in the free list), *but* the object is not removed from refchain. So if a refchain-membership-integrity-check is performed on the object in question or one of its immediate neighbors in refchain, that integrity check fails, leading to the fatal error. --- The solution is to 'Py_DECREF(...)' the object in the onError handler of its constructor, instead of passing the object directly to mxDateTime_Free. That change solves two problems: 1) It causes _Py_Dealloc to execute, which in turn executes _Py_ForgetReference, so the object is removed from refchain, as it should be. 2) At present, objects that are created successfully and later deallocated by normal reference count mechanics have a reference count of 0 when they enter the free list, whereas objects whose constructors abort their creation due to invalid arguments have a reference count of 1 when they enter the free list. Although AFAIK this doesn't cause an actual execution problem (because the object's reference count is *explicitly set to 1* rather than *incremented by 1* when the object is later "conceptually allocated" by _Py_NewReference), it is likely to confuse future maintainers and thereby lead to the introduction of an actual execution problem. I assume that if you agree that this is a reasonable solution, you'll want to apply the change not only to mxDateTime_FromDateAndTime, but to all similar constructors in mxDateTime.c. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From rj at maxxian.com Thu May 5 01:57:40 2005 From: rj at maxxian.com (RJ Juneau) Date: Sun Jan 22 16:01:36 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c5512e$f72798c0$6505a8c0@rjlaptop> I'm on the 30 day evaluation for mxodbc_zope_da. I'm getting the following error when I submit some queries: Error Type: KeyError Error Value: 'query' I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 with UCS4. The error seems to be caused by multiple rows being returned. I did see an earlier posting with the same error message. The response suggested a template error, but this is clearly not the case here. The additional evidence I've gathered so far: - I'm running the test directly from the ZSQL method, so there's no template involved. - If I use the same query with an additional "where" clause to ensure that only one row is returned, it works - If I use a value in the 'where' clause with no rows returned, it works - The same ZSQL query is being used on a Windows machine running Zope and the free ZODBC module without a problem - The query has been verified directly in mysql-client-browser Other info: - The database is MySQL 4.1.10A-0 - iODBC is the DB driver RJ Juneau -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050505/68d278bf/attachment-0039.htm From mal at egenix.com Thu May 5 12:37:43 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 22 16:01:36 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c5512e$f72798c0$6505a8c0@rjlaptop> References: <000301c5512e$f72798c0$6505a8c0@rjlaptop> Message-ID: <4279E967.6010904@egenix.com> RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 > with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 09:37:42 2005 From: rj at maxxian.com (RJ Juneau) Date: Sun Jan 22 16:01:37 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000101c5516f$3b96de90$6505a8c0@rjlaptop> More interesting info on the problem: If I execute the query directly in the "test" window of the base eGenix mxODBC Database Connection window, it works fine and returns the 20 lines expected. That could point to a problem in the rendering, which seems to be where the traceback ends. Note that within the same Zope system I also have an ODBC connection to a Sybase database, and I have successfully tested multi-line ZSQL queries there. This is the traceback: Time 2005/05/05 07:55:15.294 GMT-4 Exception Type KeyError Exception Value 'query' Traceback (innermost last): Module ZPublisher.Publish, line 101, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 39, in call_object Module Shared.DC.ZRDB.DA, line 337, in manage_test Module DocumentTemplate.DT_String, line 474, in __call__ Module DocumentTemplate.DT_In, line 602, in renderwb Module DocumentTemplate.DT_Var, line 219, in render KeyError: 'query' I don't think the following is an issue, but I'll include it for completeness.I am also getting the following iODBC warnings and errors in the Zope console log, which are related to the ODBC parameters being passed by iODBC. Note that these errors also appear for all of the successful queries. [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (Setup). [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (UsageCount). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Timeout). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Reuse). As for the ZSQL snippet from the template... Since there's no template involved yet (I'm still testing directly from the ZSQL method), I assume you mean the SQL code? select h.host_name, s.system_name, s.system_handle, count(*) from terminal t, system_map s, host h where t.system_index = s.system_index and s.host_index = h.host_index group by s.system_name order by h.host_name Nothing complicated here. There are no parameters passed to the query. RJ -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: May 5, 2005 5:38 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: Re: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is > 2.3.4 with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ---------------------------------------------------------------------- > -- > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 16:00:32 2005 From: charlie at egenix.com (Charlie Clark) Date: Sun Jan 22 16:01:37 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000101c5516f$3b96de90$6505a8c0@rjlaptop> References: <000101c5516f$3b96de90$6505a8c0@rjlaptop> Message-ID: <20050505150032.644.1@bepc.1115296715.fake> On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base eGenix > mxODBC Database Connection window, it works fine and returns the 20 > lines expected. That could point to a problem in the rendering, which > seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection to > a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 10:22:17 2005 From: rj at maxxian.com (RJ Juneau) Date: Sun Jan 22 16:01:37 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505150032.644.1@bepc.1115296715.fake> Message-ID: <000201c55175$75bcad10$6505a8c0@rjlaptop> At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 11:47:14 2005 From: rj at maxxian.com (RJ Juneau) Date: Sun Jan 22 16:01:37 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c55181$549be0e0$6505a8c0@rjlaptop> Charlie, I found a fix. Here it is in case anyone else runs into this. You were correct - the problem is in another part of Zope. Based on your feedback, I did a bit more searching and found something here: http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. html The problem appears to be in Zope versions after 2.7.0. I'm running 2.7.6, and the post indicates that it also happens in 2.7.4. The solution: Edit file /lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. There are two lines in the file that start with . Edit them as follows: Change first line to: Change second line to: Just to be after, I shut down Zope before I made the changes and restarted it after. Thanks for the help! RJ -----Original Message----- From: RJ Juneau [mailto:rj@maxxian.com] Sent: May 5, 2005 9:22 AM To: 'Charlie Clark' Cc: 'egenix-users@lists.egenix.com' Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 17:57:25 2005 From: charlie at egenix.com (Charlie Clark) Date: Sun Jan 22 16:01:37 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <20050505165725.3380.2@bepc.1115296715.fake> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Thu May 5 09:15:21 2005 From: charlie at egenix.com (Charlie Clark) Date: Sun Jan 22 16:01:37 2006 Subject: [Zope-DB] RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <000001c55185$41477730$6b00a8c0@fonacier.local> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________ Zope-DB mailing list Zope-DB@zope.org http://mail.zope.org/mailman/listinfo/zope-db From rj at maxxian.com Thu May 5 12:38:00 2005 From: rj at maxxian.com (RJ Juneau) Date: Sun Jan 22 16:01:37 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000001c55188$6b841eb0$6505a8c0@rjlaptop> I just double-checked. Zope-2.7.6-final. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 12:49:16 2005 From: rj at maxxian.com (RJ Juneau) Date: Sun Jan 22 16:01:37 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000501c55189$fe149ba0$6505a8c0@rjlaptop> Charlie, The fix has only been applied for 2.7.7, 2.8b2. The info is in the original bug report which is closed and can be found here: http://www.zope.org/Collectors/Zope/1745 RJ -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Fri May 6 11:50:09 2005 From: rj at maxxian.com (RJ Juneau) Date: Sun Jan 22 16:01:37 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC Message-ID: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Still on eval for the product. I cannot get a stable connection to Sybase via the iODBC drivers. - The Sybase ODBC connection - including a query - have been verified at the iODBC level. - The setup is already working well for ODBC connection to MySQL. Symptoms include: - If I click on "Open Connection", it still comes back with "Connection Closed" when I go to a ZSQL method - Using 'Connect on Demand' is not working either. - Clicking "Open Connection" gives me the following error: Connection string: DSN=lixbox_sybase; UID=sa; PWD=XXXXXXX Connection pool entry: 0 Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection rejected by data source', 7952) The odbc.ini definition for DSN "lixbox_sybase" is as follows: [lixbox_sybase] JetFix = No NoRowSetSizeLimit = No Description = Test connection to listbox Options = LIXBOX DSQUERY = SQLSERVER TDSHOST = lixbox TDSPORT = 5000 TDSVER = 5.0 SQLSERVER_CATALOG = N CURSOR_SENSITIVITY = LOW UserName = sa Password = XXXXXXXX ServerType = Sybase 10/11/12 Driver = /opt/openlink/lib/sql_mt_lt.so Database = pubs2 ReadOnly = no NoAutoCommit = No NoLoginBox = No FetchBufferSize = 60 Other relevant data: - Connecting via OpenLink's iODBC - Zope 2.7.6-final - Python 2.3.4 - Connection to Sybase has been successfully tested with iODBC, including issuing a query - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC connection RJ Juneau Chief Technology Officer Maxxian Integration Inc. 155 Westhampton Drive Thornhill, Ontario Canada L4J 7X2 E-mail: rj@maxxian.com Phone: +1 905 482 9429 Cell: +1 416 897 6682 Toll free: +1 866 758 9161 Fax: +1 647 722 2038 -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050506/aef33361/attachment-0039.htm From mal at egenix.com Fri May 6 18:27:37 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 22 16:01:37 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC In-Reply-To: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> References: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Message-ID: <427B8CE9.1010601@egenix.com> RJ Juneau wrote: > Still on eval for the product. > > I cannot get a stable connection to Sybase via the iODBC drivers. > > - The Sybase ODBC connection - including a query - have been verified at > the iODBC level. > - The setup is already working well for ODBC connection to MySQL. > > Symptoms include: > > - If I click on "Open Connection", it still comes back with "Connection > Closed" when I go to a ZSQL method > - Using 'Connect on Demand' is not working either. > - Clicking "Open Connection" gives me the following error: > > Connection string: DSN=lixbox_sybase; > UID=sa; > PWD=XXXXXXX Try writing the connection string on one line and without whitespace. ODBC drivers sometimes have problems with this. > Connection pool entry: 0 > Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection > rejected by data source', 7952) This is a generic error that relates to authentication or firewall problems. It is possible that turning on ODBC tracing the ODBC manager will give more clues as to the real cause of the problem. > The odbc.ini definition for DSN "lixbox_sybase" is as follows: > > [lixbox_sybase] > JetFix = No > NoRowSetSizeLimit = No > Description = Test connection to listbox > Options = LIXBOX > DSQUERY = SQLSERVER > TDSHOST = lixbox > TDSPORT = 5000 > TDSVER = 5.0 > SQLSERVER_CATALOG = N > CURSOR_SENSITIVITY = LOW > UserName = sa > Password = XXXXXXXX > ServerType = Sybase 10/11/12 > Driver = /opt/openlink/lib/sql_mt_lt.so > Database = pubs2 > ReadOnly = no > NoAutoCommit = No > NoLoginBox = No > FetchBufferSize = 60 > > > Other relevant data: > - Connecting via OpenLink's iODBC > - Zope 2.7.6-final > - Python 2.3.4 > - Connection to Sybase has been successfully tested with iODBC, > including issuing a query > - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC > connection > > > > RJ Juneau > Chief Technology Officer > Maxxian Integration Inc. > 155 Westhampton Drive > Thornhill, Ontario > Canada L4J 7X2 > E-mail: rj@maxxian.com > Phone: +1 905 482 9429 > Cell: +1 416 897 6682 > Toll free: +1 866 758 9161 > Fax: +1 647 722 2038 > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 06 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From calisp at gmail.com Sun May 15 23:49:03 2005 From: calisp at gmail.com (calisp@gmail.com) Date: Sun Jan 22 16:01:37 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK Message-ID: Hi, I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the following error... 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the last phase of a two-phase commit. This shouldn't happen. Traceback (most recent call last): File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one jar.tpc_finish(self) File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish try: self._finish() File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could not perform COMMIT or ROLLBACK', 1023) What could be causing this? Can I get the mxODBCZopeDA source from somewhere? It would make debugging this much easier. Thanks, Calisp. From mal at egenix.com Mon May 16 13:52:12 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 22 16:01:37 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK In-Reply-To: References: Message-ID: <42887B5C.4010109@egenix.com> calisp@gmail.com wrote: > Hi, > > I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with > unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the > following error... > > 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the > last phase of a two-phase commit. This shouldn't happen. > Traceback (most recent call last): > File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one > jar.tpc_finish(self) > File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish > try: self._finish() > File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish > File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler > ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could > not perform COMMIT or ROLLBACK', 1023) You should have a look at the database logs to see what prevented the commit from being completed. > What could be causing this? Hard to say: mxODBCZopeDA is trying to commit the transaction, but the driver or database failed to complete the request. The above error was generated by the ODBC driver. This could be network or DNS problems, or be related to a bug in FreeTDS (which is getting more stable with every new release, but should still be considered beta quality software at the moment). > Can I get the mxODBCZopeDA source from > somewhere? It would make debugging this much easier. Getting the source is not an option and won't help much either since the source of the problem is not mxODBCZopeDA. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 16 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Sun May 1 21:29:25 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 22 20:01:30 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <427259F3.4090806@egenix.com> References: <20050427130906.52878.qmail@web30008.mail.mud.yahoo.com> <427259F3.4090806@egenix.com> Message-ID: <42752005.7080904@egenix.com> M.-A. Lemburg wrote: > David Rushby wrote: > >> --- "M.-A. Lemburg" wrote: >> >>> Are you using the standard mxDateTime build or one >>> with WANT_SUBCLASSABLE_TYPES defined... >> >> >> >> Presumably "the standard", since I just built with 'py24d setup.py >> build', making no attempt to enable special directives. >> >> >>> ... (mxDateTime_Deallocate is only used by the latter)? >> >> >> >> That's true in 2.1.0-2005-04-15, but not in 2.1.0b5. >> >> >>> In any case, please try our latest snapshot: >>> >>> >> >> http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-04-15.zip >> >>> to see if that makes any difference. >> >> >> >> I can't build it out of the box: > > > Hmm, looks like distutils' sdist command doesn't like our new > repository layout which uses symlinks (after we've switched to > subversion). > > We'll have to debug distutils first, I guess :-( Ok, we've found the problem and fixed it. Here's the new release (which does build out of the box at least on our boxes ;-): http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 01 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From davidrushby at yahoo.com Mon May 2 15:49:53 2005 From: davidrushby at yahoo.com (David Rushby) Date: Sun Jan 22 20:01:30 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Ok, we've found the problem and fixed it. Here's the new > release (which does build out of the box at least on our > boxes ;-): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip It does build now, but: py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" still behaves as it did when I submitted my original message: Fatal Python error: UNREF invalid object Aborted This is the same debug build of Python 2.4.1 that I was previously using, running the same configuration (CentOS Linux 4.0/i386, everything compiled with GCC 3.4.3). Have you examined my original claim as to the cause of the bug? __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 10:21:55 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 22 20:01:30 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> References: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> Message-ID: <42772693.8050306@egenix.com> David Rushby wrote: > --- "M.-A. Lemburg" wrote: > >>Ok, we've found the problem and fixed it. Here's the new >>release (which does build out of the box at least on our >>boxes ;-): >> >> > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip > > It does build now, but: > py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" > still behaves as it did when I submitted my original message: > Fatal Python error: UNREF invalid object > Aborted > > This is the same debug build of Python 2.4.1 that I was previously > using, running the same configuration (CentOS Linux 4.0/i386, > everything compiled with GCC 3.4.3). > > Have you examined my original claim as to the cause of the bug? No. We haven't had time for looking into it. I'm not sure whether your analysis of the problem is correct: if you don't define WANT_SUBCLASSABLE_TYPES, the API mxDateTime_Deallocate() is neither defined nor used. Furthermore, PyObject_Del() is only called by mxDateTime_Free() if you have explicitely edited mxDateTime.c to disabled the free list #defines. In a standard build, PyObject_Del() is only called at module finalization time. Note that the reason we call mxDateTime_Free() in the constructor is that we don't want the destructor of the object to be called. Py_DECREF() would call the destructor (mxDateTime_Deallocate). It is possible that the debug code in Python complains about the refcount in the object not being 0 at the time the object is finalized (module finalization time), but I don't see any such checks in PyObject_Free() (which is what PyObject_Del() maps to). Again, all of this does not happen in regular non-debug Python builds. Please be aware that we don't support debug builds, so fixing the problem (if there is one - gcc has some serious optimization problems on some combinations of platform and version) will take a while. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 09:27:37 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Sun Jan 22 20:01:31 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 Message-ID: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Hi all- I am trying to build the mx-base package, v.2.0.6. This will be used with postgresql 7.3.9, psycopg 1.1.18, and Roundup 0.8.2. RHEL 3.0 Python 2.3 egenix-mx-base-2.0.6.tar.gz I performed a: /usr/local/bin/python2.3 setup.py install Everything looks proper with the exeception of this series of warning statements: ----------------- gcc -pthread -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fno-strict-aliasing -fPIC -Imx/BeeBase/mxBeeBase -I/usr/local/incl ude/python2.3 -I/usr/local/include -c mx/BeeBase/mxBeeBase/btr.c -o build/temp.linux-i686-2.3/mx/BeeBase/mxBeeBase/mxBeeBa se/mx/BeeBase/mxBeeBase/btr.o mx/BeeBase/mxBeeBase/btr.c: In function `dumpBuf': mx/BeeBase/mxBeeBase/btr.c:249: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:250: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:255: warning: unsigned int format, long unsigned int arg (arg 4) mx/BeeBase/mxBeeBase/btr.c:256: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c: In function `_validateTree': mx/BeeBase/mxBeeBase/btr.c:330: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:337: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:339: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:349: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:351: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 3) creating build/lib.linux-i686-2.3/mx/BeeBase creating build/lib.linux-i686-2.3/mx/BeeBase/mxBeeBase -------------- Would someone be kind enough to let me know whether these messages were expected, and if not, how I might resolve these? Thanks! DC __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 22:06:33 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 22 20:01:31 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> References: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Message-ID: <4277CBB9.8020302@egenix.com> Dianne Chen wrote: > Hi all- > > I am trying to build the mx-base package, v.2.0.6. > This will be used with postgresql 7.3.9, psycopg > 1.1.18, and Roundup 0.8.2. > > RHEL 3.0 > Python 2.3 > egenix-mx-base-2.0.6.tar.gz > > I performed a: > > /usr/local/bin/python2.3 setup.py install > > Everything looks proper with the exeception of this > series of warning statements: > > ----------------- > ... > -------------- > > Would someone be kind enough to let me know whether > these messages were expected, and if not, how I might > resolve these? These warning can safely be ignored. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 13:41:14 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Sun Jan 22 20:01:31 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: 6667 Message-ID: <20050503194114.72091.qmail@web31414.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Dianne Chen wrote: > > Hi all- > > > > I am trying to build the mx-base package, v.2.0.6. > > This will be used with postgresql 7.3.9, psycopg > > 1.1.18, and Roundup 0.8.2. > > > > RHEL 3.0 > > Python 2.3 > > egenix-mx-base-2.0.6.tar.gz > > > > I performed a: > > > > /usr/local/bin/python2.3 setup.py install > > > > Everything looks proper with the exeception of > this > > series of warning statements: > > > > ----------------- > > ... > > -------------- > > > > Would someone be kind enough to let me know > whether > > these messages were expected, and if not, how I > might > > resolve these? > > These warning can safely be ignored. > > -- > Marc-Andre Lemburg > eGenix.com > Marc- Thank you very much for the reply. It helps greatly. With kind regards, DC __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From davidrushby at yahoo.com Tue May 3 17:18:46 2005 From: davidrushby at yahoo.com (David Rushby) Date: Sun Jan 22 20:01:31 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050503231846.35012.qmail@web30009.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > I'm not sure whether your analysis of the problem is correct... Indeed, my original analysis wasn't correct; I think this one is. The fatal error I'm complaining about only arises if the arguments to DateTime.DateTime are invalid, so that the object is deallocated in the onError block of mxDateTime_FromDateAndTime. If the object is created successfully, and later deallocated by Python's garbage collector, the fatal error doesn't arise. Here's my analysis of the problem: --- If the debugging directive Py_TRACE_REFS is enabled, as it is in my case, the Python interpreter maintains a doubly linked list of all Python objects (named refchain) via the _ob_next and _ob_prev pointers added to PyObject via _PyObject_HEAD_EXTRA. Each object is inserted into refchain by the _Py_AddToAllObjects call in _Py_NewReference, and removed from refchain by the _Py_ForgetReference call in _Py_Dealloc. _Py_ForgetReference performs an integrity check on the object being deallocated (op) to make sure that its neighbors in refchain recognize it. Specifically, _Py_ForgetReference verifies that the _ob_next pointer of the previous object in refchain (op->_ob_prev->_ob_next) points to op, and that the _ob_prev pointer of the next object in refchain (op->_ob_next->_ob_prev) points to op. If either of those conditions is false, the interpreter raises the fatal error I'm seeing. After mxDateTime_New pulls an mxDateTimeObject out of the free list, it calls _Py_NewReference on that object to transform it from a "conceptually deallocated" object to a "conceptually allocated" one. _Py_NewReference inserts the object into refchain. Later, when the object is being "conceptually deallocated", it should be removed from refchain with _Py_ForgetReference. The version of _Py_Dealloc that's active when Py_TRACE_REFS is enabled does this (_Py_Dealloc is the element of Py_DECREF that performs the actual destruction). _Py_Dealloc first calls _Py_ForgetReference to remove the object from refchain, then calls the object's destructor (op->ob_type->tp_dealloc). If WANT_SUBCLASSABLE_TYPES is not defined (it is not in my case), the destructor for mxDateTime_Type is mxDateTime_Free. So, if a DateTime object is deallocated normally, as a result of its reference count falling to zero, _Py_Dealloc is called on the object, which first removes it from refchain, then passes it to mxDateTime_Free. If a DateTime object is destroyed prematurely, as a result of invalid arguments to its destructor, the onError handler calls mxDateTime_Free, so the object is "conceptually deallocated" (placed in the free list), *but* the object is not removed from refchain. So if a refchain-membership-integrity-check is performed on the object in question or one of its immediate neighbors in refchain, that integrity check fails, leading to the fatal error. --- The solution is to 'Py_DECREF(...)' the object in the onError handler of its constructor, instead of passing the object directly to mxDateTime_Free. That change solves two problems: 1) It causes _Py_Dealloc to execute, which in turn executes _Py_ForgetReference, so the object is removed from refchain, as it should be. 2) At present, objects that are created successfully and later deallocated by normal reference count mechanics have a reference count of 0 when they enter the free list, whereas objects whose constructors abort their creation due to invalid arguments have a reference count of 1 when they enter the free list. Although AFAIK this doesn't cause an actual execution problem (because the object's reference count is *explicitly set to 1* rather than *incremented by 1* when the object is later "conceptually allocated" by _Py_NewReference), it is likely to confuse future maintainers and thereby lead to the introduction of an actual execution problem. I assume that if you agree that this is a reasonable solution, you'll want to apply the change not only to mxDateTime_FromDateAndTime, but to all similar constructors in mxDateTime.c. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From rj at maxxian.com Thu May 5 01:57:40 2005 From: rj at maxxian.com (RJ Juneau) Date: Sun Jan 22 20:01:31 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c5512e$f72798c0$6505a8c0@rjlaptop> I'm on the 30 day evaluation for mxodbc_zope_da. I'm getting the following error when I submit some queries: Error Type: KeyError Error Value: 'query' I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 with UCS4. The error seems to be caused by multiple rows being returned. I did see an earlier posting with the same error message. The response suggested a template error, but this is clearly not the case here. The additional evidence I've gathered so far: - I'm running the test directly from the ZSQL method, so there's no template involved. - If I use the same query with an additional "where" clause to ensure that only one row is returned, it works - If I use a value in the 'where' clause with no rows returned, it works - The same ZSQL query is being used on a Windows machine running Zope and the free ZODBC module without a problem - The query has been verified directly in mysql-client-browser Other info: - The database is MySQL 4.1.10A-0 - iODBC is the DB driver RJ Juneau -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050505/68d278bf/attachment-0040.htm From mal at egenix.com Thu May 5 12:37:43 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 22 20:01:31 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c5512e$f72798c0$6505a8c0@rjlaptop> References: <000301c5512e$f72798c0$6505a8c0@rjlaptop> Message-ID: <4279E967.6010904@egenix.com> RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 > with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 09:37:42 2005 From: rj at maxxian.com (RJ Juneau) Date: Sun Jan 22 20:01:31 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000101c5516f$3b96de90$6505a8c0@rjlaptop> More interesting info on the problem: If I execute the query directly in the "test" window of the base eGenix mxODBC Database Connection window, it works fine and returns the 20 lines expected. That could point to a problem in the rendering, which seems to be where the traceback ends. Note that within the same Zope system I also have an ODBC connection to a Sybase database, and I have successfully tested multi-line ZSQL queries there. This is the traceback: Time 2005/05/05 07:55:15.294 GMT-4 Exception Type KeyError Exception Value 'query' Traceback (innermost last): Module ZPublisher.Publish, line 101, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 39, in call_object Module Shared.DC.ZRDB.DA, line 337, in manage_test Module DocumentTemplate.DT_String, line 474, in __call__ Module DocumentTemplate.DT_In, line 602, in renderwb Module DocumentTemplate.DT_Var, line 219, in render KeyError: 'query' I don't think the following is an issue, but I'll include it for completeness.I am also getting the following iODBC warnings and errors in the Zope console log, which are related to the ODBC parameters being passed by iODBC. Note that these errors also appear for all of the successful queries. [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (Setup). [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (UsageCount). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Timeout). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Reuse). As for the ZSQL snippet from the template... Since there's no template involved yet (I'm still testing directly from the ZSQL method), I assume you mean the SQL code? select h.host_name, s.system_name, s.system_handle, count(*) from terminal t, system_map s, host h where t.system_index = s.system_index and s.host_index = h.host_index group by s.system_name order by h.host_name Nothing complicated here. There are no parameters passed to the query. RJ -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: May 5, 2005 5:38 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: Re: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is > 2.3.4 with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ---------------------------------------------------------------------- > -- > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 16:00:32 2005 From: charlie at egenix.com (Charlie Clark) Date: Sun Jan 22 20:01:31 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000101c5516f$3b96de90$6505a8c0@rjlaptop> References: <000101c5516f$3b96de90$6505a8c0@rjlaptop> Message-ID: <20050505150032.644.1@bepc.1115296715.fake> On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base eGenix > mxODBC Database Connection window, it works fine and returns the 20 > lines expected. That could point to a problem in the rendering, which > seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection to > a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 10:22:17 2005 From: rj at maxxian.com (RJ Juneau) Date: Sun Jan 22 20:01:31 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505150032.644.1@bepc.1115296715.fake> Message-ID: <000201c55175$75bcad10$6505a8c0@rjlaptop> At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 11:47:14 2005 From: rj at maxxian.com (RJ Juneau) Date: Sun Jan 22 20:01:31 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c55181$549be0e0$6505a8c0@rjlaptop> Charlie, I found a fix. Here it is in case anyone else runs into this. You were correct - the problem is in another part of Zope. Based on your feedback, I did a bit more searching and found something here: http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. html The problem appears to be in Zope versions after 2.7.0. I'm running 2.7.6, and the post indicates that it also happens in 2.7.4. The solution: Edit file /lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. There are two lines in the file that start with . Edit them as follows: Change first line to: Change second line to: Just to be after, I shut down Zope before I made the changes and restarted it after. Thanks for the help! RJ -----Original Message----- From: RJ Juneau [mailto:rj@maxxian.com] Sent: May 5, 2005 9:22 AM To: 'Charlie Clark' Cc: 'egenix-users@lists.egenix.com' Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 17:57:25 2005 From: charlie at egenix.com (Charlie Clark) Date: Sun Jan 22 20:01:31 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <20050505165725.3380.2@bepc.1115296715.fake> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Thu May 5 09:15:21 2005 From: charlie at egenix.com (Charlie Clark) Date: Sun Jan 22 20:01:31 2006 Subject: [Zope-DB] RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <000001c55185$41477730$6b00a8c0@fonacier.local> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________ Zope-DB mailing list Zope-DB@zope.org http://mail.zope.org/mailman/listinfo/zope-db From rj at maxxian.com Thu May 5 12:38:00 2005 From: rj at maxxian.com (RJ Juneau) Date: Sun Jan 22 20:01:31 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000001c55188$6b841eb0$6505a8c0@rjlaptop> I just double-checked. Zope-2.7.6-final. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 12:49:16 2005 From: rj at maxxian.com (RJ Juneau) Date: Sun Jan 22 20:01:31 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000501c55189$fe149ba0$6505a8c0@rjlaptop> Charlie, The fix has only been applied for 2.7.7, 2.8b2. The info is in the original bug report which is closed and can be found here: http://www.zope.org/Collectors/Zope/1745 RJ -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Fri May 6 11:50:09 2005 From: rj at maxxian.com (RJ Juneau) Date: Sun Jan 22 20:01:31 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC Message-ID: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Still on eval for the product. I cannot get a stable connection to Sybase via the iODBC drivers. - The Sybase ODBC connection - including a query - have been verified at the iODBC level. - The setup is already working well for ODBC connection to MySQL. Symptoms include: - If I click on "Open Connection", it still comes back with "Connection Closed" when I go to a ZSQL method - Using 'Connect on Demand' is not working either. - Clicking "Open Connection" gives me the following error: Connection string: DSN=lixbox_sybase; UID=sa; PWD=XXXXXXX Connection pool entry: 0 Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection rejected by data source', 7952) The odbc.ini definition for DSN "lixbox_sybase" is as follows: [lixbox_sybase] JetFix = No NoRowSetSizeLimit = No Description = Test connection to listbox Options = LIXBOX DSQUERY = SQLSERVER TDSHOST = lixbox TDSPORT = 5000 TDSVER = 5.0 SQLSERVER_CATALOG = N CURSOR_SENSITIVITY = LOW UserName = sa Password = XXXXXXXX ServerType = Sybase 10/11/12 Driver = /opt/openlink/lib/sql_mt_lt.so Database = pubs2 ReadOnly = no NoAutoCommit = No NoLoginBox = No FetchBufferSize = 60 Other relevant data: - Connecting via OpenLink's iODBC - Zope 2.7.6-final - Python 2.3.4 - Connection to Sybase has been successfully tested with iODBC, including issuing a query - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC connection RJ Juneau Chief Technology Officer Maxxian Integration Inc. 155 Westhampton Drive Thornhill, Ontario Canada L4J 7X2 E-mail: rj@maxxian.com Phone: +1 905 482 9429 Cell: +1 416 897 6682 Toll free: +1 866 758 9161 Fax: +1 647 722 2038 -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050506/aef33361/attachment-0040.htm From mal at egenix.com Fri May 6 18:27:37 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 22 20:01:31 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC In-Reply-To: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> References: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Message-ID: <427B8CE9.1010601@egenix.com> RJ Juneau wrote: > Still on eval for the product. > > I cannot get a stable connection to Sybase via the iODBC drivers. > > - The Sybase ODBC connection - including a query - have been verified at > the iODBC level. > - The setup is already working well for ODBC connection to MySQL. > > Symptoms include: > > - If I click on "Open Connection", it still comes back with "Connection > Closed" when I go to a ZSQL method > - Using 'Connect on Demand' is not working either. > - Clicking "Open Connection" gives me the following error: > > Connection string: DSN=lixbox_sybase; > UID=sa; > PWD=XXXXXXX Try writing the connection string on one line and without whitespace. ODBC drivers sometimes have problems with this. > Connection pool entry: 0 > Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection > rejected by data source', 7952) This is a generic error that relates to authentication or firewall problems. It is possible that turning on ODBC tracing the ODBC manager will give more clues as to the real cause of the problem. > The odbc.ini definition for DSN "lixbox_sybase" is as follows: > > [lixbox_sybase] > JetFix = No > NoRowSetSizeLimit = No > Description = Test connection to listbox > Options = LIXBOX > DSQUERY = SQLSERVER > TDSHOST = lixbox > TDSPORT = 5000 > TDSVER = 5.0 > SQLSERVER_CATALOG = N > CURSOR_SENSITIVITY = LOW > UserName = sa > Password = XXXXXXXX > ServerType = Sybase 10/11/12 > Driver = /opt/openlink/lib/sql_mt_lt.so > Database = pubs2 > ReadOnly = no > NoAutoCommit = No > NoLoginBox = No > FetchBufferSize = 60 > > > Other relevant data: > - Connecting via OpenLink's iODBC > - Zope 2.7.6-final > - Python 2.3.4 > - Connection to Sybase has been successfully tested with iODBC, > including issuing a query > - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC > connection > > > > RJ Juneau > Chief Technology Officer > Maxxian Integration Inc. > 155 Westhampton Drive > Thornhill, Ontario > Canada L4J 7X2 > E-mail: rj@maxxian.com > Phone: +1 905 482 9429 > Cell: +1 416 897 6682 > Toll free: +1 866 758 9161 > Fax: +1 647 722 2038 > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 06 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From calisp at gmail.com Sun May 15 23:49:03 2005 From: calisp at gmail.com (calisp@gmail.com) Date: Sun Jan 22 20:01:31 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK Message-ID: Hi, I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the following error... 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the last phase of a two-phase commit. This shouldn't happen. Traceback (most recent call last): File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one jar.tpc_finish(self) File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish try: self._finish() File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could not perform COMMIT or ROLLBACK', 1023) What could be causing this? Can I get the mxODBCZopeDA source from somewhere? It would make debugging this much easier. Thanks, Calisp. From mal at egenix.com Mon May 16 13:52:12 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 22 20:01:31 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK In-Reply-To: References: Message-ID: <42887B5C.4010109@egenix.com> calisp@gmail.com wrote: > Hi, > > I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with > unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the > following error... > > 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the > last phase of a two-phase commit. This shouldn't happen. > Traceback (most recent call last): > File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one > jar.tpc_finish(self) > File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish > try: self._finish() > File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish > File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler > ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could > not perform COMMIT or ROLLBACK', 1023) You should have a look at the database logs to see what prevented the commit from being completed. > What could be causing this? Hard to say: mxODBCZopeDA is trying to commit the transaction, but the driver or database failed to complete the request. The above error was generated by the ODBC driver. This could be network or DNS problems, or be related to a bug in FreeTDS (which is getting more stable with every new release, but should still be considered beta quality software at the moment). > Can I get the mxODBCZopeDA source from > somewhere? It would make debugging this much easier. Getting the source is not an option and won't help much either since the source of the problem is not mxODBCZopeDA. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 16 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Sun May 1 21:29:25 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 23 08:02:59 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <427259F3.4090806@egenix.com> References: <20050427130906.52878.qmail@web30008.mail.mud.yahoo.com> <427259F3.4090806@egenix.com> Message-ID: <42752005.7080904@egenix.com> M.-A. Lemburg wrote: > David Rushby wrote: > >> --- "M.-A. Lemburg" wrote: >> >>> Are you using the standard mxDateTime build or one >>> with WANT_SUBCLASSABLE_TYPES defined... >> >> >> >> Presumably "the standard", since I just built with 'py24d setup.py >> build', making no attempt to enable special directives. >> >> >>> ... (mxDateTime_Deallocate is only used by the latter)? >> >> >> >> That's true in 2.1.0-2005-04-15, but not in 2.1.0b5. >> >> >>> In any case, please try our latest snapshot: >>> >>> >> >> http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-04-15.zip >> >>> to see if that makes any difference. >> >> >> >> I can't build it out of the box: > > > Hmm, looks like distutils' sdist command doesn't like our new > repository layout which uses symlinks (after we've switched to > subversion). > > We'll have to debug distutils first, I guess :-( Ok, we've found the problem and fixed it. Here's the new release (which does build out of the box at least on our boxes ;-): http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 01 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From davidrushby at yahoo.com Mon May 2 15:49:53 2005 From: davidrushby at yahoo.com (David Rushby) Date: Mon Jan 23 08:02:59 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Ok, we've found the problem and fixed it. Here's the new > release (which does build out of the box at least on our > boxes ;-): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip It does build now, but: py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" still behaves as it did when I submitted my original message: Fatal Python error: UNREF invalid object Aborted This is the same debug build of Python 2.4.1 that I was previously using, running the same configuration (CentOS Linux 4.0/i386, everything compiled with GCC 3.4.3). Have you examined my original claim as to the cause of the bug? __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 10:21:55 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 23 08:02:59 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> References: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> Message-ID: <42772693.8050306@egenix.com> David Rushby wrote: > --- "M.-A. Lemburg" wrote: > >>Ok, we've found the problem and fixed it. Here's the new >>release (which does build out of the box at least on our >>boxes ;-): >> >> > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip > > It does build now, but: > py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" > still behaves as it did when I submitted my original message: > Fatal Python error: UNREF invalid object > Aborted > > This is the same debug build of Python 2.4.1 that I was previously > using, running the same configuration (CentOS Linux 4.0/i386, > everything compiled with GCC 3.4.3). > > Have you examined my original claim as to the cause of the bug? No. We haven't had time for looking into it. I'm not sure whether your analysis of the problem is correct: if you don't define WANT_SUBCLASSABLE_TYPES, the API mxDateTime_Deallocate() is neither defined nor used. Furthermore, PyObject_Del() is only called by mxDateTime_Free() if you have explicitely edited mxDateTime.c to disabled the free list #defines. In a standard build, PyObject_Del() is only called at module finalization time. Note that the reason we call mxDateTime_Free() in the constructor is that we don't want the destructor of the object to be called. Py_DECREF() would call the destructor (mxDateTime_Deallocate). It is possible that the debug code in Python complains about the refcount in the object not being 0 at the time the object is finalized (module finalization time), but I don't see any such checks in PyObject_Free() (which is what PyObject_Del() maps to). Again, all of this does not happen in regular non-debug Python builds. Please be aware that we don't support debug builds, so fixing the problem (if there is one - gcc has some serious optimization problems on some combinations of platform and version) will take a while. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 09:27:37 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Mon Jan 23 08:02:59 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 Message-ID: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Hi all- I am trying to build the mx-base package, v.2.0.6. This will be used with postgresql 7.3.9, psycopg 1.1.18, and Roundup 0.8.2. RHEL 3.0 Python 2.3 egenix-mx-base-2.0.6.tar.gz I performed a: /usr/local/bin/python2.3 setup.py install Everything looks proper with the exeception of this series of warning statements: ----------------- gcc -pthread -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fno-strict-aliasing -fPIC -Imx/BeeBase/mxBeeBase -I/usr/local/incl ude/python2.3 -I/usr/local/include -c mx/BeeBase/mxBeeBase/btr.c -o build/temp.linux-i686-2.3/mx/BeeBase/mxBeeBase/mxBeeBa se/mx/BeeBase/mxBeeBase/btr.o mx/BeeBase/mxBeeBase/btr.c: In function `dumpBuf': mx/BeeBase/mxBeeBase/btr.c:249: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:250: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:255: warning: unsigned int format, long unsigned int arg (arg 4) mx/BeeBase/mxBeeBase/btr.c:256: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c: In function `_validateTree': mx/BeeBase/mxBeeBase/btr.c:330: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:337: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:339: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:349: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:351: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 3) creating build/lib.linux-i686-2.3/mx/BeeBase creating build/lib.linux-i686-2.3/mx/BeeBase/mxBeeBase -------------- Would someone be kind enough to let me know whether these messages were expected, and if not, how I might resolve these? Thanks! DC __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 22:06:33 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 23 08:02:59 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> References: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Message-ID: <4277CBB9.8020302@egenix.com> Dianne Chen wrote: > Hi all- > > I am trying to build the mx-base package, v.2.0.6. > This will be used with postgresql 7.3.9, psycopg > 1.1.18, and Roundup 0.8.2. > > RHEL 3.0 > Python 2.3 > egenix-mx-base-2.0.6.tar.gz > > I performed a: > > /usr/local/bin/python2.3 setup.py install > > Everything looks proper with the exeception of this > series of warning statements: > > ----------------- > ... > -------------- > > Would someone be kind enough to let me know whether > these messages were expected, and if not, how I might > resolve these? These warning can safely be ignored. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 13:41:14 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Mon Jan 23 08:02:59 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: 6667 Message-ID: <20050503194114.72091.qmail@web31414.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Dianne Chen wrote: > > Hi all- > > > > I am trying to build the mx-base package, v.2.0.6. > > This will be used with postgresql 7.3.9, psycopg > > 1.1.18, and Roundup 0.8.2. > > > > RHEL 3.0 > > Python 2.3 > > egenix-mx-base-2.0.6.tar.gz > > > > I performed a: > > > > /usr/local/bin/python2.3 setup.py install > > > > Everything looks proper with the exeception of > this > > series of warning statements: > > > > ----------------- > > ... > > -------------- > > > > Would someone be kind enough to let me know > whether > > these messages were expected, and if not, how I > might > > resolve these? > > These warning can safely be ignored. > > -- > Marc-Andre Lemburg > eGenix.com > Marc- Thank you very much for the reply. It helps greatly. With kind regards, DC __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From davidrushby at yahoo.com Tue May 3 17:18:46 2005 From: davidrushby at yahoo.com (David Rushby) Date: Mon Jan 23 08:02:59 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050503231846.35012.qmail@web30009.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > I'm not sure whether your analysis of the problem is correct... Indeed, my original analysis wasn't correct; I think this one is. The fatal error I'm complaining about only arises if the arguments to DateTime.DateTime are invalid, so that the object is deallocated in the onError block of mxDateTime_FromDateAndTime. If the object is created successfully, and later deallocated by Python's garbage collector, the fatal error doesn't arise. Here's my analysis of the problem: --- If the debugging directive Py_TRACE_REFS is enabled, as it is in my case, the Python interpreter maintains a doubly linked list of all Python objects (named refchain) via the _ob_next and _ob_prev pointers added to PyObject via _PyObject_HEAD_EXTRA. Each object is inserted into refchain by the _Py_AddToAllObjects call in _Py_NewReference, and removed from refchain by the _Py_ForgetReference call in _Py_Dealloc. _Py_ForgetReference performs an integrity check on the object being deallocated (op) to make sure that its neighbors in refchain recognize it. Specifically, _Py_ForgetReference verifies that the _ob_next pointer of the previous object in refchain (op->_ob_prev->_ob_next) points to op, and that the _ob_prev pointer of the next object in refchain (op->_ob_next->_ob_prev) points to op. If either of those conditions is false, the interpreter raises the fatal error I'm seeing. After mxDateTime_New pulls an mxDateTimeObject out of the free list, it calls _Py_NewReference on that object to transform it from a "conceptually deallocated" object to a "conceptually allocated" one. _Py_NewReference inserts the object into refchain. Later, when the object is being "conceptually deallocated", it should be removed from refchain with _Py_ForgetReference. The version of _Py_Dealloc that's active when Py_TRACE_REFS is enabled does this (_Py_Dealloc is the element of Py_DECREF that performs the actual destruction). _Py_Dealloc first calls _Py_ForgetReference to remove the object from refchain, then calls the object's destructor (op->ob_type->tp_dealloc). If WANT_SUBCLASSABLE_TYPES is not defined (it is not in my case), the destructor for mxDateTime_Type is mxDateTime_Free. So, if a DateTime object is deallocated normally, as a result of its reference count falling to zero, _Py_Dealloc is called on the object, which first removes it from refchain, then passes it to mxDateTime_Free. If a DateTime object is destroyed prematurely, as a result of invalid arguments to its destructor, the onError handler calls mxDateTime_Free, so the object is "conceptually deallocated" (placed in the free list), *but* the object is not removed from refchain. So if a refchain-membership-integrity-check is performed on the object in question or one of its immediate neighbors in refchain, that integrity check fails, leading to the fatal error. --- The solution is to 'Py_DECREF(...)' the object in the onError handler of its constructor, instead of passing the object directly to mxDateTime_Free. That change solves two problems: 1) It causes _Py_Dealloc to execute, which in turn executes _Py_ForgetReference, so the object is removed from refchain, as it should be. 2) At present, objects that are created successfully and later deallocated by normal reference count mechanics have a reference count of 0 when they enter the free list, whereas objects whose constructors abort their creation due to invalid arguments have a reference count of 1 when they enter the free list. Although AFAIK this doesn't cause an actual execution problem (because the object's reference count is *explicitly set to 1* rather than *incremented by 1* when the object is later "conceptually allocated" by _Py_NewReference), it is likely to confuse future maintainers and thereby lead to the introduction of an actual execution problem. I assume that if you agree that this is a reasonable solution, you'll want to apply the change not only to mxDateTime_FromDateAndTime, but to all similar constructors in mxDateTime.c. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From rj at maxxian.com Thu May 5 01:57:40 2005 From: rj at maxxian.com (RJ Juneau) Date: Mon Jan 23 08:02:59 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c5512e$f72798c0$6505a8c0@rjlaptop> I'm on the 30 day evaluation for mxodbc_zope_da. I'm getting the following error when I submit some queries: Error Type: KeyError Error Value: 'query' I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 with UCS4. The error seems to be caused by multiple rows being returned. I did see an earlier posting with the same error message. The response suggested a template error, but this is clearly not the case here. The additional evidence I've gathered so far: - I'm running the test directly from the ZSQL method, so there's no template involved. - If I use the same query with an additional "where" clause to ensure that only one row is returned, it works - If I use a value in the 'where' clause with no rows returned, it works - The same ZSQL query is being used on a Windows machine running Zope and the free ZODBC module without a problem - The query has been verified directly in mysql-client-browser Other info: - The database is MySQL 4.1.10A-0 - iODBC is the DB driver RJ Juneau -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050505/68d278bf/attachment-0041.htm From mal at egenix.com Thu May 5 12:37:43 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 23 08:02:59 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c5512e$f72798c0$6505a8c0@rjlaptop> References: <000301c5512e$f72798c0$6505a8c0@rjlaptop> Message-ID: <4279E967.6010904@egenix.com> RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 > with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 09:37:42 2005 From: rj at maxxian.com (RJ Juneau) Date: Mon Jan 23 08:02:59 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000101c5516f$3b96de90$6505a8c0@rjlaptop> More interesting info on the problem: If I execute the query directly in the "test" window of the base eGenix mxODBC Database Connection window, it works fine and returns the 20 lines expected. That could point to a problem in the rendering, which seems to be where the traceback ends. Note that within the same Zope system I also have an ODBC connection to a Sybase database, and I have successfully tested multi-line ZSQL queries there. This is the traceback: Time 2005/05/05 07:55:15.294 GMT-4 Exception Type KeyError Exception Value 'query' Traceback (innermost last): Module ZPublisher.Publish, line 101, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 39, in call_object Module Shared.DC.ZRDB.DA, line 337, in manage_test Module DocumentTemplate.DT_String, line 474, in __call__ Module DocumentTemplate.DT_In, line 602, in renderwb Module DocumentTemplate.DT_Var, line 219, in render KeyError: 'query' I don't think the following is an issue, but I'll include it for completeness.I am also getting the following iODBC warnings and errors in the Zope console log, which are related to the ODBC parameters being passed by iODBC. Note that these errors also appear for all of the successful queries. [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (Setup). [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (UsageCount). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Timeout). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Reuse). As for the ZSQL snippet from the template... Since there's no template involved yet (I'm still testing directly from the ZSQL method), I assume you mean the SQL code? select h.host_name, s.system_name, s.system_handle, count(*) from terminal t, system_map s, host h where t.system_index = s.system_index and s.host_index = h.host_index group by s.system_name order by h.host_name Nothing complicated here. There are no parameters passed to the query. RJ -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: May 5, 2005 5:38 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: Re: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is > 2.3.4 with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ---------------------------------------------------------------------- > -- > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 16:00:32 2005 From: charlie at egenix.com (Charlie Clark) Date: Mon Jan 23 08:02:59 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000101c5516f$3b96de90$6505a8c0@rjlaptop> References: <000101c5516f$3b96de90$6505a8c0@rjlaptop> Message-ID: <20050505150032.644.1@bepc.1115296715.fake> On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base eGenix > mxODBC Database Connection window, it works fine and returns the 20 > lines expected. That could point to a problem in the rendering, which > seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection to > a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 10:22:17 2005 From: rj at maxxian.com (RJ Juneau) Date: Mon Jan 23 08:02:59 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505150032.644.1@bepc.1115296715.fake> Message-ID: <000201c55175$75bcad10$6505a8c0@rjlaptop> At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 11:47:14 2005 From: rj at maxxian.com (RJ Juneau) Date: Mon Jan 23 08:02:59 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c55181$549be0e0$6505a8c0@rjlaptop> Charlie, I found a fix. Here it is in case anyone else runs into this. You were correct - the problem is in another part of Zope. Based on your feedback, I did a bit more searching and found something here: http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. html The problem appears to be in Zope versions after 2.7.0. I'm running 2.7.6, and the post indicates that it also happens in 2.7.4. The solution: Edit file /lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. There are two lines in the file that start with . Edit them as follows: Change first line to: Change second line to: Just to be after, I shut down Zope before I made the changes and restarted it after. Thanks for the help! RJ -----Original Message----- From: RJ Juneau [mailto:rj@maxxian.com] Sent: May 5, 2005 9:22 AM To: 'Charlie Clark' Cc: 'egenix-users@lists.egenix.com' Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 17:57:25 2005 From: charlie at egenix.com (Charlie Clark) Date: Mon Jan 23 08:02:59 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <20050505165725.3380.2@bepc.1115296715.fake> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Thu May 5 09:15:21 2005 From: charlie at egenix.com (Charlie Clark) Date: Mon Jan 23 08:02:59 2006 Subject: [Zope-DB] RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <000001c55185$41477730$6b00a8c0@fonacier.local> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________ Zope-DB mailing list Zope-DB@zope.org http://mail.zope.org/mailman/listinfo/zope-db From rj at maxxian.com Thu May 5 12:38:00 2005 From: rj at maxxian.com (RJ Juneau) Date: Mon Jan 23 08:02:59 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000001c55188$6b841eb0$6505a8c0@rjlaptop> I just double-checked. Zope-2.7.6-final. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 12:49:16 2005 From: rj at maxxian.com (RJ Juneau) Date: Mon Jan 23 08:02:59 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000501c55189$fe149ba0$6505a8c0@rjlaptop> Charlie, The fix has only been applied for 2.7.7, 2.8b2. The info is in the original bug report which is closed and can be found here: http://www.zope.org/Collectors/Zope/1745 RJ -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Fri May 6 11:50:09 2005 From: rj at maxxian.com (RJ Juneau) Date: Mon Jan 23 08:02:59 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC Message-ID: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Still on eval for the product. I cannot get a stable connection to Sybase via the iODBC drivers. - The Sybase ODBC connection - including a query - have been verified at the iODBC level. - The setup is already working well for ODBC connection to MySQL. Symptoms include: - If I click on "Open Connection", it still comes back with "Connection Closed" when I go to a ZSQL method - Using 'Connect on Demand' is not working either. - Clicking "Open Connection" gives me the following error: Connection string: DSN=lixbox_sybase; UID=sa; PWD=XXXXXXX Connection pool entry: 0 Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection rejected by data source', 7952) The odbc.ini definition for DSN "lixbox_sybase" is as follows: [lixbox_sybase] JetFix = No NoRowSetSizeLimit = No Description = Test connection to listbox Options = LIXBOX DSQUERY = SQLSERVER TDSHOST = lixbox TDSPORT = 5000 TDSVER = 5.0 SQLSERVER_CATALOG = N CURSOR_SENSITIVITY = LOW UserName = sa Password = XXXXXXXX ServerType = Sybase 10/11/12 Driver = /opt/openlink/lib/sql_mt_lt.so Database = pubs2 ReadOnly = no NoAutoCommit = No NoLoginBox = No FetchBufferSize = 60 Other relevant data: - Connecting via OpenLink's iODBC - Zope 2.7.6-final - Python 2.3.4 - Connection to Sybase has been successfully tested with iODBC, including issuing a query - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC connection RJ Juneau Chief Technology Officer Maxxian Integration Inc. 155 Westhampton Drive Thornhill, Ontario Canada L4J 7X2 E-mail: rj@maxxian.com Phone: +1 905 482 9429 Cell: +1 416 897 6682 Toll free: +1 866 758 9161 Fax: +1 647 722 2038 -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050506/aef33361/attachment-0041.htm From mal at egenix.com Fri May 6 18:27:37 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 23 08:02:59 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC In-Reply-To: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> References: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Message-ID: <427B8CE9.1010601@egenix.com> RJ Juneau wrote: > Still on eval for the product. > > I cannot get a stable connection to Sybase via the iODBC drivers. > > - The Sybase ODBC connection - including a query - have been verified at > the iODBC level. > - The setup is already working well for ODBC connection to MySQL. > > Symptoms include: > > - If I click on "Open Connection", it still comes back with "Connection > Closed" when I go to a ZSQL method > - Using 'Connect on Demand' is not working either. > - Clicking "Open Connection" gives me the following error: > > Connection string: DSN=lixbox_sybase; > UID=sa; > PWD=XXXXXXX Try writing the connection string on one line and without whitespace. ODBC drivers sometimes have problems with this. > Connection pool entry: 0 > Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection > rejected by data source', 7952) This is a generic error that relates to authentication or firewall problems. It is possible that turning on ODBC tracing the ODBC manager will give more clues as to the real cause of the problem. > The odbc.ini definition for DSN "lixbox_sybase" is as follows: > > [lixbox_sybase] > JetFix = No > NoRowSetSizeLimit = No > Description = Test connection to listbox > Options = LIXBOX > DSQUERY = SQLSERVER > TDSHOST = lixbox > TDSPORT = 5000 > TDSVER = 5.0 > SQLSERVER_CATALOG = N > CURSOR_SENSITIVITY = LOW > UserName = sa > Password = XXXXXXXX > ServerType = Sybase 10/11/12 > Driver = /opt/openlink/lib/sql_mt_lt.so > Database = pubs2 > ReadOnly = no > NoAutoCommit = No > NoLoginBox = No > FetchBufferSize = 60 > > > Other relevant data: > - Connecting via OpenLink's iODBC > - Zope 2.7.6-final > - Python 2.3.4 > - Connection to Sybase has been successfully tested with iODBC, > including issuing a query > - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC > connection > > > > RJ Juneau > Chief Technology Officer > Maxxian Integration Inc. > 155 Westhampton Drive > Thornhill, Ontario > Canada L4J 7X2 > E-mail: rj@maxxian.com > Phone: +1 905 482 9429 > Cell: +1 416 897 6682 > Toll free: +1 866 758 9161 > Fax: +1 647 722 2038 > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 06 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From calisp at gmail.com Sun May 15 23:49:03 2005 From: calisp at gmail.com (calisp@gmail.com) Date: Mon Jan 23 08:02:59 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK Message-ID: Hi, I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the following error... 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the last phase of a two-phase commit. This shouldn't happen. Traceback (most recent call last): File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one jar.tpc_finish(self) File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish try: self._finish() File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could not perform COMMIT or ROLLBACK', 1023) What could be causing this? Can I get the mxODBCZopeDA source from somewhere? It would make debugging this much easier. Thanks, Calisp. From mal at egenix.com Mon May 16 13:52:12 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 23 08:02:59 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK In-Reply-To: References: Message-ID: <42887B5C.4010109@egenix.com> calisp@gmail.com wrote: > Hi, > > I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with > unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the > following error... > > 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the > last phase of a two-phase commit. This shouldn't happen. > Traceback (most recent call last): > File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one > jar.tpc_finish(self) > File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish > try: self._finish() > File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish > File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler > ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could > not perform COMMIT or ROLLBACK', 1023) You should have a look at the database logs to see what prevented the commit from being completed. > What could be causing this? Hard to say: mxODBCZopeDA is trying to commit the transaction, but the driver or database failed to complete the request. The above error was generated by the ODBC driver. This could be network or DNS problems, or be related to a bug in FreeTDS (which is getting more stable with every new release, but should still be considered beta quality software at the moment). > Can I get the mxODBCZopeDA source from > somewhere? It would make debugging this much easier. Getting the source is not an option and won't help much either since the source of the problem is not mxODBCZopeDA. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 16 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Sun May 1 21:29:25 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 23 12:01:07 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <427259F3.4090806@egenix.com> References: <20050427130906.52878.qmail@web30008.mail.mud.yahoo.com> <427259F3.4090806@egenix.com> Message-ID: <42752005.7080904@egenix.com> M.-A. Lemburg wrote: > David Rushby wrote: > >> --- "M.-A. Lemburg" wrote: >> >>> Are you using the standard mxDateTime build or one >>> with WANT_SUBCLASSABLE_TYPES defined... >> >> >> >> Presumably "the standard", since I just built with 'py24d setup.py >> build', making no attempt to enable special directives. >> >> >>> ... (mxDateTime_Deallocate is only used by the latter)? >> >> >> >> That's true in 2.1.0-2005-04-15, but not in 2.1.0b5. >> >> >>> In any case, please try our latest snapshot: >>> >>> >> >> http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-04-15.zip >> >>> to see if that makes any difference. >> >> >> >> I can't build it out of the box: > > > Hmm, looks like distutils' sdist command doesn't like our new > repository layout which uses symlinks (after we've switched to > subversion). > > We'll have to debug distutils first, I guess :-( Ok, we've found the problem and fixed it. Here's the new release (which does build out of the box at least on our boxes ;-): http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 01 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From davidrushby at yahoo.com Mon May 2 15:49:53 2005 From: davidrushby at yahoo.com (David Rushby) Date: Mon Jan 23 12:01:07 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Ok, we've found the problem and fixed it. Here's the new > release (which does build out of the box at least on our > boxes ;-): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip It does build now, but: py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" still behaves as it did when I submitted my original message: Fatal Python error: UNREF invalid object Aborted This is the same debug build of Python 2.4.1 that I was previously using, running the same configuration (CentOS Linux 4.0/i386, everything compiled with GCC 3.4.3). Have you examined my original claim as to the cause of the bug? __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 10:21:55 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 23 12:01:07 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> References: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> Message-ID: <42772693.8050306@egenix.com> David Rushby wrote: > --- "M.-A. Lemburg" wrote: > >>Ok, we've found the problem and fixed it. Here's the new >>release (which does build out of the box at least on our >>boxes ;-): >> >> > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip > > It does build now, but: > py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" > still behaves as it did when I submitted my original message: > Fatal Python error: UNREF invalid object > Aborted > > This is the same debug build of Python 2.4.1 that I was previously > using, running the same configuration (CentOS Linux 4.0/i386, > everything compiled with GCC 3.4.3). > > Have you examined my original claim as to the cause of the bug? No. We haven't had time for looking into it. I'm not sure whether your analysis of the problem is correct: if you don't define WANT_SUBCLASSABLE_TYPES, the API mxDateTime_Deallocate() is neither defined nor used. Furthermore, PyObject_Del() is only called by mxDateTime_Free() if you have explicitely edited mxDateTime.c to disabled the free list #defines. In a standard build, PyObject_Del() is only called at module finalization time. Note that the reason we call mxDateTime_Free() in the constructor is that we don't want the destructor of the object to be called. Py_DECREF() would call the destructor (mxDateTime_Deallocate). It is possible that the debug code in Python complains about the refcount in the object not being 0 at the time the object is finalized (module finalization time), but I don't see any such checks in PyObject_Free() (which is what PyObject_Del() maps to). Again, all of this does not happen in regular non-debug Python builds. Please be aware that we don't support debug builds, so fixing the problem (if there is one - gcc has some serious optimization problems on some combinations of platform and version) will take a while. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 09:27:37 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Mon Jan 23 12:01:07 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 Message-ID: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Hi all- I am trying to build the mx-base package, v.2.0.6. This will be used with postgresql 7.3.9, psycopg 1.1.18, and Roundup 0.8.2. RHEL 3.0 Python 2.3 egenix-mx-base-2.0.6.tar.gz I performed a: /usr/local/bin/python2.3 setup.py install Everything looks proper with the exeception of this series of warning statements: ----------------- gcc -pthread -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fno-strict-aliasing -fPIC -Imx/BeeBase/mxBeeBase -I/usr/local/incl ude/python2.3 -I/usr/local/include -c mx/BeeBase/mxBeeBase/btr.c -o build/temp.linux-i686-2.3/mx/BeeBase/mxBeeBase/mxBeeBa se/mx/BeeBase/mxBeeBase/btr.o mx/BeeBase/mxBeeBase/btr.c: In function `dumpBuf': mx/BeeBase/mxBeeBase/btr.c:249: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:250: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:255: warning: unsigned int format, long unsigned int arg (arg 4) mx/BeeBase/mxBeeBase/btr.c:256: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c: In function `_validateTree': mx/BeeBase/mxBeeBase/btr.c:330: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:337: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:339: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:349: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:351: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 3) creating build/lib.linux-i686-2.3/mx/BeeBase creating build/lib.linux-i686-2.3/mx/BeeBase/mxBeeBase -------------- Would someone be kind enough to let me know whether these messages were expected, and if not, how I might resolve these? Thanks! DC __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 22:06:33 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 23 12:01:07 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> References: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Message-ID: <4277CBB9.8020302@egenix.com> Dianne Chen wrote: > Hi all- > > I am trying to build the mx-base package, v.2.0.6. > This will be used with postgresql 7.3.9, psycopg > 1.1.18, and Roundup 0.8.2. > > RHEL 3.0 > Python 2.3 > egenix-mx-base-2.0.6.tar.gz > > I performed a: > > /usr/local/bin/python2.3 setup.py install > > Everything looks proper with the exeception of this > series of warning statements: > > ----------------- > ... > -------------- > > Would someone be kind enough to let me know whether > these messages were expected, and if not, how I might > resolve these? These warning can safely be ignored. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 13:41:14 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Mon Jan 23 12:01:07 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: 6667 Message-ID: <20050503194114.72091.qmail@web31414.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Dianne Chen wrote: > > Hi all- > > > > I am trying to build the mx-base package, v.2.0.6. > > This will be used with postgresql 7.3.9, psycopg > > 1.1.18, and Roundup 0.8.2. > > > > RHEL 3.0 > > Python 2.3 > > egenix-mx-base-2.0.6.tar.gz > > > > I performed a: > > > > /usr/local/bin/python2.3 setup.py install > > > > Everything looks proper with the exeception of > this > > series of warning statements: > > > > ----------------- > > ... > > -------------- > > > > Would someone be kind enough to let me know > whether > > these messages were expected, and if not, how I > might > > resolve these? > > These warning can safely be ignored. > > -- > Marc-Andre Lemburg > eGenix.com > Marc- Thank you very much for the reply. It helps greatly. With kind regards, DC __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From davidrushby at yahoo.com Tue May 3 17:18:46 2005 From: davidrushby at yahoo.com (David Rushby) Date: Mon Jan 23 12:01:07 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050503231846.35012.qmail@web30009.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > I'm not sure whether your analysis of the problem is correct... Indeed, my original analysis wasn't correct; I think this one is. The fatal error I'm complaining about only arises if the arguments to DateTime.DateTime are invalid, so that the object is deallocated in the onError block of mxDateTime_FromDateAndTime. If the object is created successfully, and later deallocated by Python's garbage collector, the fatal error doesn't arise. Here's my analysis of the problem: --- If the debugging directive Py_TRACE_REFS is enabled, as it is in my case, the Python interpreter maintains a doubly linked list of all Python objects (named refchain) via the _ob_next and _ob_prev pointers added to PyObject via _PyObject_HEAD_EXTRA. Each object is inserted into refchain by the _Py_AddToAllObjects call in _Py_NewReference, and removed from refchain by the _Py_ForgetReference call in _Py_Dealloc. _Py_ForgetReference performs an integrity check on the object being deallocated (op) to make sure that its neighbors in refchain recognize it. Specifically, _Py_ForgetReference verifies that the _ob_next pointer of the previous object in refchain (op->_ob_prev->_ob_next) points to op, and that the _ob_prev pointer of the next object in refchain (op->_ob_next->_ob_prev) points to op. If either of those conditions is false, the interpreter raises the fatal error I'm seeing. After mxDateTime_New pulls an mxDateTimeObject out of the free list, it calls _Py_NewReference on that object to transform it from a "conceptually deallocated" object to a "conceptually allocated" one. _Py_NewReference inserts the object into refchain. Later, when the object is being "conceptually deallocated", it should be removed from refchain with _Py_ForgetReference. The version of _Py_Dealloc that's active when Py_TRACE_REFS is enabled does this (_Py_Dealloc is the element of Py_DECREF that performs the actual destruction). _Py_Dealloc first calls _Py_ForgetReference to remove the object from refchain, then calls the object's destructor (op->ob_type->tp_dealloc). If WANT_SUBCLASSABLE_TYPES is not defined (it is not in my case), the destructor for mxDateTime_Type is mxDateTime_Free. So, if a DateTime object is deallocated normally, as a result of its reference count falling to zero, _Py_Dealloc is called on the object, which first removes it from refchain, then passes it to mxDateTime_Free. If a DateTime object is destroyed prematurely, as a result of invalid arguments to its destructor, the onError handler calls mxDateTime_Free, so the object is "conceptually deallocated" (placed in the free list), *but* the object is not removed from refchain. So if a refchain-membership-integrity-check is performed on the object in question or one of its immediate neighbors in refchain, that integrity check fails, leading to the fatal error. --- The solution is to 'Py_DECREF(...)' the object in the onError handler of its constructor, instead of passing the object directly to mxDateTime_Free. That change solves two problems: 1) It causes _Py_Dealloc to execute, which in turn executes _Py_ForgetReference, so the object is removed from refchain, as it should be. 2) At present, objects that are created successfully and later deallocated by normal reference count mechanics have a reference count of 0 when they enter the free list, whereas objects whose constructors abort their creation due to invalid arguments have a reference count of 1 when they enter the free list. Although AFAIK this doesn't cause an actual execution problem (because the object's reference count is *explicitly set to 1* rather than *incremented by 1* when the object is later "conceptually allocated" by _Py_NewReference), it is likely to confuse future maintainers and thereby lead to the introduction of an actual execution problem. I assume that if you agree that this is a reasonable solution, you'll want to apply the change not only to mxDateTime_FromDateAndTime, but to all similar constructors in mxDateTime.c. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From rj at maxxian.com Thu May 5 01:57:40 2005 From: rj at maxxian.com (RJ Juneau) Date: Mon Jan 23 12:01:07 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c5512e$f72798c0$6505a8c0@rjlaptop> I'm on the 30 day evaluation for mxodbc_zope_da. I'm getting the following error when I submit some queries: Error Type: KeyError Error Value: 'query' I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 with UCS4. The error seems to be caused by multiple rows being returned. I did see an earlier posting with the same error message. The response suggested a template error, but this is clearly not the case here. The additional evidence I've gathered so far: - I'm running the test directly from the ZSQL method, so there's no template involved. - If I use the same query with an additional "where" clause to ensure that only one row is returned, it works - If I use a value in the 'where' clause with no rows returned, it works - The same ZSQL query is being used on a Windows machine running Zope and the free ZODBC module without a problem - The query has been verified directly in mysql-client-browser Other info: - The database is MySQL 4.1.10A-0 - iODBC is the DB driver RJ Juneau -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050505/68d278bf/attachment-0042.htm From mal at egenix.com Thu May 5 12:37:43 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 23 12:01:07 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c5512e$f72798c0$6505a8c0@rjlaptop> References: <000301c5512e$f72798c0$6505a8c0@rjlaptop> Message-ID: <4279E967.6010904@egenix.com> RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 > with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 09:37:42 2005 From: rj at maxxian.com (RJ Juneau) Date: Mon Jan 23 12:01:07 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000101c5516f$3b96de90$6505a8c0@rjlaptop> More interesting info on the problem: If I execute the query directly in the "test" window of the base eGenix mxODBC Database Connection window, it works fine and returns the 20 lines expected. That could point to a problem in the rendering, which seems to be where the traceback ends. Note that within the same Zope system I also have an ODBC connection to a Sybase database, and I have successfully tested multi-line ZSQL queries there. This is the traceback: Time 2005/05/05 07:55:15.294 GMT-4 Exception Type KeyError Exception Value 'query' Traceback (innermost last): Module ZPublisher.Publish, line 101, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 39, in call_object Module Shared.DC.ZRDB.DA, line 337, in manage_test Module DocumentTemplate.DT_String, line 474, in __call__ Module DocumentTemplate.DT_In, line 602, in renderwb Module DocumentTemplate.DT_Var, line 219, in render KeyError: 'query' I don't think the following is an issue, but I'll include it for completeness.I am also getting the following iODBC warnings and errors in the Zope console log, which are related to the ODBC parameters being passed by iODBC. Note that these errors also appear for all of the successful queries. [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (Setup). [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (UsageCount). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Timeout). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Reuse). As for the ZSQL snippet from the template... Since there's no template involved yet (I'm still testing directly from the ZSQL method), I assume you mean the SQL code? select h.host_name, s.system_name, s.system_handle, count(*) from terminal t, system_map s, host h where t.system_index = s.system_index and s.host_index = h.host_index group by s.system_name order by h.host_name Nothing complicated here. There are no parameters passed to the query. RJ -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: May 5, 2005 5:38 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: Re: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is > 2.3.4 with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ---------------------------------------------------------------------- > -- > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 16:00:32 2005 From: charlie at egenix.com (Charlie Clark) Date: Mon Jan 23 12:01:07 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000101c5516f$3b96de90$6505a8c0@rjlaptop> References: <000101c5516f$3b96de90$6505a8c0@rjlaptop> Message-ID: <20050505150032.644.1@bepc.1115296715.fake> On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base eGenix > mxODBC Database Connection window, it works fine and returns the 20 > lines expected. That could point to a problem in the rendering, which > seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection to > a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 10:22:17 2005 From: rj at maxxian.com (RJ Juneau) Date: Mon Jan 23 12:01:07 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505150032.644.1@bepc.1115296715.fake> Message-ID: <000201c55175$75bcad10$6505a8c0@rjlaptop> At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 11:47:14 2005 From: rj at maxxian.com (RJ Juneau) Date: Mon Jan 23 12:01:07 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c55181$549be0e0$6505a8c0@rjlaptop> Charlie, I found a fix. Here it is in case anyone else runs into this. You were correct - the problem is in another part of Zope. Based on your feedback, I did a bit more searching and found something here: http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. html The problem appears to be in Zope versions after 2.7.0. I'm running 2.7.6, and the post indicates that it also happens in 2.7.4. The solution: Edit file /lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. There are two lines in the file that start with . Edit them as follows: Change first line to: Change second line to: Just to be after, I shut down Zope before I made the changes and restarted it after. Thanks for the help! RJ -----Original Message----- From: RJ Juneau [mailto:rj@maxxian.com] Sent: May 5, 2005 9:22 AM To: 'Charlie Clark' Cc: 'egenix-users@lists.egenix.com' Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 17:57:25 2005 From: charlie at egenix.com (Charlie Clark) Date: Mon Jan 23 12:01:07 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <20050505165725.3380.2@bepc.1115296715.fake> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Thu May 5 09:15:21 2005 From: charlie at egenix.com (Charlie Clark) Date: Mon Jan 23 12:01:07 2006 Subject: [Zope-DB] RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <000001c55185$41477730$6b00a8c0@fonacier.local> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________ Zope-DB mailing list Zope-DB@zope.org http://mail.zope.org/mailman/listinfo/zope-db From rj at maxxian.com Thu May 5 12:38:00 2005 From: rj at maxxian.com (RJ Juneau) Date: Mon Jan 23 12:01:07 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000001c55188$6b841eb0$6505a8c0@rjlaptop> I just double-checked. Zope-2.7.6-final. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 12:49:16 2005 From: rj at maxxian.com (RJ Juneau) Date: Mon Jan 23 12:01:07 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000501c55189$fe149ba0$6505a8c0@rjlaptop> Charlie, The fix has only been applied for 2.7.7, 2.8b2. The info is in the original bug report which is closed and can be found here: http://www.zope.org/Collectors/Zope/1745 RJ -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Fri May 6 11:50:09 2005 From: rj at maxxian.com (RJ Juneau) Date: Mon Jan 23 12:01:07 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC Message-ID: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Still on eval for the product. I cannot get a stable connection to Sybase via the iODBC drivers. - The Sybase ODBC connection - including a query - have been verified at the iODBC level. - The setup is already working well for ODBC connection to MySQL. Symptoms include: - If I click on "Open Connection", it still comes back with "Connection Closed" when I go to a ZSQL method - Using 'Connect on Demand' is not working either. - Clicking "Open Connection" gives me the following error: Connection string: DSN=lixbox_sybase; UID=sa; PWD=XXXXXXX Connection pool entry: 0 Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection rejected by data source', 7952) The odbc.ini definition for DSN "lixbox_sybase" is as follows: [lixbox_sybase] JetFix = No NoRowSetSizeLimit = No Description = Test connection to listbox Options = LIXBOX DSQUERY = SQLSERVER TDSHOST = lixbox TDSPORT = 5000 TDSVER = 5.0 SQLSERVER_CATALOG = N CURSOR_SENSITIVITY = LOW UserName = sa Password = XXXXXXXX ServerType = Sybase 10/11/12 Driver = /opt/openlink/lib/sql_mt_lt.so Database = pubs2 ReadOnly = no NoAutoCommit = No NoLoginBox = No FetchBufferSize = 60 Other relevant data: - Connecting via OpenLink's iODBC - Zope 2.7.6-final - Python 2.3.4 - Connection to Sybase has been successfully tested with iODBC, including issuing a query - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC connection RJ Juneau Chief Technology Officer Maxxian Integration Inc. 155 Westhampton Drive Thornhill, Ontario Canada L4J 7X2 E-mail: rj@maxxian.com Phone: +1 905 482 9429 Cell: +1 416 897 6682 Toll free: +1 866 758 9161 Fax: +1 647 722 2038 -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050506/aef33361/attachment-0042.htm From mal at egenix.com Fri May 6 18:27:37 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 23 12:01:07 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC In-Reply-To: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> References: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Message-ID: <427B8CE9.1010601@egenix.com> RJ Juneau wrote: > Still on eval for the product. > > I cannot get a stable connection to Sybase via the iODBC drivers. > > - The Sybase ODBC connection - including a query - have been verified at > the iODBC level. > - The setup is already working well for ODBC connection to MySQL. > > Symptoms include: > > - If I click on "Open Connection", it still comes back with "Connection > Closed" when I go to a ZSQL method > - Using 'Connect on Demand' is not working either. > - Clicking "Open Connection" gives me the following error: > > Connection string: DSN=lixbox_sybase; > UID=sa; > PWD=XXXXXXX Try writing the connection string on one line and without whitespace. ODBC drivers sometimes have problems with this. > Connection pool entry: 0 > Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection > rejected by data source', 7952) This is a generic error that relates to authentication or firewall problems. It is possible that turning on ODBC tracing the ODBC manager will give more clues as to the real cause of the problem. > The odbc.ini definition for DSN "lixbox_sybase" is as follows: > > [lixbox_sybase] > JetFix = No > NoRowSetSizeLimit = No > Description = Test connection to listbox > Options = LIXBOX > DSQUERY = SQLSERVER > TDSHOST = lixbox > TDSPORT = 5000 > TDSVER = 5.0 > SQLSERVER_CATALOG = N > CURSOR_SENSITIVITY = LOW > UserName = sa > Password = XXXXXXXX > ServerType = Sybase 10/11/12 > Driver = /opt/openlink/lib/sql_mt_lt.so > Database = pubs2 > ReadOnly = no > NoAutoCommit = No > NoLoginBox = No > FetchBufferSize = 60 > > > Other relevant data: > - Connecting via OpenLink's iODBC > - Zope 2.7.6-final > - Python 2.3.4 > - Connection to Sybase has been successfully tested with iODBC, > including issuing a query > - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC > connection > > > > RJ Juneau > Chief Technology Officer > Maxxian Integration Inc. > 155 Westhampton Drive > Thornhill, Ontario > Canada L4J 7X2 > E-mail: rj@maxxian.com > Phone: +1 905 482 9429 > Cell: +1 416 897 6682 > Toll free: +1 866 758 9161 > Fax: +1 647 722 2038 > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 06 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From calisp at gmail.com Sun May 15 23:49:03 2005 From: calisp at gmail.com (calisp@gmail.com) Date: Mon Jan 23 12:01:07 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK Message-ID: Hi, I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the following error... 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the last phase of a two-phase commit. This shouldn't happen. Traceback (most recent call last): File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one jar.tpc_finish(self) File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish try: self._finish() File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could not perform COMMIT or ROLLBACK', 1023) What could be causing this? Can I get the mxODBCZopeDA source from somewhere? It would make debugging this much easier. Thanks, Calisp. From mal at egenix.com Mon May 16 13:52:12 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 23 12:01:07 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK In-Reply-To: References: Message-ID: <42887B5C.4010109@egenix.com> calisp@gmail.com wrote: > Hi, > > I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with > unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the > following error... > > 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the > last phase of a two-phase commit. This shouldn't happen. > Traceback (most recent call last): > File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one > jar.tpc_finish(self) > File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish > try: self._finish() > File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish > File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler > ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could > not perform COMMIT or ROLLBACK', 1023) You should have a look at the database logs to see what prevented the commit from being completed. > What could be causing this? Hard to say: mxODBCZopeDA is trying to commit the transaction, but the driver or database failed to complete the request. The above error was generated by the ODBC driver. This could be network or DNS problems, or be related to a bug in FreeTDS (which is getting more stable with every new release, but should still be considered beta quality software at the moment). > Can I get the mxODBCZopeDA source from > somewhere? It would make debugging this much easier. Getting the source is not an option and won't help much either since the source of the problem is not mxODBCZopeDA. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 16 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Sun May 1 21:29:25 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 23 16:02:10 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <427259F3.4090806@egenix.com> References: <20050427130906.52878.qmail@web30008.mail.mud.yahoo.com> <427259F3.4090806@egenix.com> Message-ID: <42752005.7080904@egenix.com> M.-A. Lemburg wrote: > David Rushby wrote: > >> --- "M.-A. Lemburg" wrote: >> >>> Are you using the standard mxDateTime build or one >>> with WANT_SUBCLASSABLE_TYPES defined... >> >> >> >> Presumably "the standard", since I just built with 'py24d setup.py >> build', making no attempt to enable special directives. >> >> >>> ... (mxDateTime_Deallocate is only used by the latter)? >> >> >> >> That's true in 2.1.0-2005-04-15, but not in 2.1.0b5. >> >> >>> In any case, please try our latest snapshot: >>> >>> >> >> http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-04-15.zip >> >>> to see if that makes any difference. >> >> >> >> I can't build it out of the box: > > > Hmm, looks like distutils' sdist command doesn't like our new > repository layout which uses symlinks (after we've switched to > subversion). > > We'll have to debug distutils first, I guess :-( Ok, we've found the problem and fixed it. Here's the new release (which does build out of the box at least on our boxes ;-): http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 01 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From davidrushby at yahoo.com Mon May 2 15:49:53 2005 From: davidrushby at yahoo.com (David Rushby) Date: Mon Jan 23 16:02:10 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Ok, we've found the problem and fixed it. Here's the new > release (which does build out of the box at least on our > boxes ;-): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip It does build now, but: py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" still behaves as it did when I submitted my original message: Fatal Python error: UNREF invalid object Aborted This is the same debug build of Python 2.4.1 that I was previously using, running the same configuration (CentOS Linux 4.0/i386, everything compiled with GCC 3.4.3). Have you examined my original claim as to the cause of the bug? __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 10:21:55 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 23 16:02:10 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> References: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> Message-ID: <42772693.8050306@egenix.com> David Rushby wrote: > --- "M.-A. Lemburg" wrote: > >>Ok, we've found the problem and fixed it. Here's the new >>release (which does build out of the box at least on our >>boxes ;-): >> >> > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip > > It does build now, but: > py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" > still behaves as it did when I submitted my original message: > Fatal Python error: UNREF invalid object > Aborted > > This is the same debug build of Python 2.4.1 that I was previously > using, running the same configuration (CentOS Linux 4.0/i386, > everything compiled with GCC 3.4.3). > > Have you examined my original claim as to the cause of the bug? No. We haven't had time for looking into it. I'm not sure whether your analysis of the problem is correct: if you don't define WANT_SUBCLASSABLE_TYPES, the API mxDateTime_Deallocate() is neither defined nor used. Furthermore, PyObject_Del() is only called by mxDateTime_Free() if you have explicitely edited mxDateTime.c to disabled the free list #defines. In a standard build, PyObject_Del() is only called at module finalization time. Note that the reason we call mxDateTime_Free() in the constructor is that we don't want the destructor of the object to be called. Py_DECREF() would call the destructor (mxDateTime_Deallocate). It is possible that the debug code in Python complains about the refcount in the object not being 0 at the time the object is finalized (module finalization time), but I don't see any such checks in PyObject_Free() (which is what PyObject_Del() maps to). Again, all of this does not happen in regular non-debug Python builds. Please be aware that we don't support debug builds, so fixing the problem (if there is one - gcc has some serious optimization problems on some combinations of platform and version) will take a while. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 09:27:37 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Mon Jan 23 16:02:10 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 Message-ID: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Hi all- I am trying to build the mx-base package, v.2.0.6. This will be used with postgresql 7.3.9, psycopg 1.1.18, and Roundup 0.8.2. RHEL 3.0 Python 2.3 egenix-mx-base-2.0.6.tar.gz I performed a: /usr/local/bin/python2.3 setup.py install Everything looks proper with the exeception of this series of warning statements: ----------------- gcc -pthread -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fno-strict-aliasing -fPIC -Imx/BeeBase/mxBeeBase -I/usr/local/incl ude/python2.3 -I/usr/local/include -c mx/BeeBase/mxBeeBase/btr.c -o build/temp.linux-i686-2.3/mx/BeeBase/mxBeeBase/mxBeeBa se/mx/BeeBase/mxBeeBase/btr.o mx/BeeBase/mxBeeBase/btr.c: In function `dumpBuf': mx/BeeBase/mxBeeBase/btr.c:249: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:250: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:255: warning: unsigned int format, long unsigned int arg (arg 4) mx/BeeBase/mxBeeBase/btr.c:256: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c: In function `_validateTree': mx/BeeBase/mxBeeBase/btr.c:330: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:337: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:339: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:349: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:351: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 3) creating build/lib.linux-i686-2.3/mx/BeeBase creating build/lib.linux-i686-2.3/mx/BeeBase/mxBeeBase -------------- Would someone be kind enough to let me know whether these messages were expected, and if not, how I might resolve these? Thanks! DC __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 22:06:33 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 23 16:02:10 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> References: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Message-ID: <4277CBB9.8020302@egenix.com> Dianne Chen wrote: > Hi all- > > I am trying to build the mx-base package, v.2.0.6. > This will be used with postgresql 7.3.9, psycopg > 1.1.18, and Roundup 0.8.2. > > RHEL 3.0 > Python 2.3 > egenix-mx-base-2.0.6.tar.gz > > I performed a: > > /usr/local/bin/python2.3 setup.py install > > Everything looks proper with the exeception of this > series of warning statements: > > ----------------- > ... > -------------- > > Would someone be kind enough to let me know whether > these messages were expected, and if not, how I might > resolve these? These warning can safely be ignored. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 13:41:14 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Mon Jan 23 16:02:10 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: 6667 Message-ID: <20050503194114.72091.qmail@web31414.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Dianne Chen wrote: > > Hi all- > > > > I am trying to build the mx-base package, v.2.0.6. > > This will be used with postgresql 7.3.9, psycopg > > 1.1.18, and Roundup 0.8.2. > > > > RHEL 3.0 > > Python 2.3 > > egenix-mx-base-2.0.6.tar.gz > > > > I performed a: > > > > /usr/local/bin/python2.3 setup.py install > > > > Everything looks proper with the exeception of > this > > series of warning statements: > > > > ----------------- > > ... > > -------------- > > > > Would someone be kind enough to let me know > whether > > these messages were expected, and if not, how I > might > > resolve these? > > These warning can safely be ignored. > > -- > Marc-Andre Lemburg > eGenix.com > Marc- Thank you very much for the reply. It helps greatly. With kind regards, DC __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From davidrushby at yahoo.com Tue May 3 17:18:46 2005 From: davidrushby at yahoo.com (David Rushby) Date: Mon Jan 23 16:02:10 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050503231846.35012.qmail@web30009.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > I'm not sure whether your analysis of the problem is correct... Indeed, my original analysis wasn't correct; I think this one is. The fatal error I'm complaining about only arises if the arguments to DateTime.DateTime are invalid, so that the object is deallocated in the onError block of mxDateTime_FromDateAndTime. If the object is created successfully, and later deallocated by Python's garbage collector, the fatal error doesn't arise. Here's my analysis of the problem: --- If the debugging directive Py_TRACE_REFS is enabled, as it is in my case, the Python interpreter maintains a doubly linked list of all Python objects (named refchain) via the _ob_next and _ob_prev pointers added to PyObject via _PyObject_HEAD_EXTRA. Each object is inserted into refchain by the _Py_AddToAllObjects call in _Py_NewReference, and removed from refchain by the _Py_ForgetReference call in _Py_Dealloc. _Py_ForgetReference performs an integrity check on the object being deallocated (op) to make sure that its neighbors in refchain recognize it. Specifically, _Py_ForgetReference verifies that the _ob_next pointer of the previous object in refchain (op->_ob_prev->_ob_next) points to op, and that the _ob_prev pointer of the next object in refchain (op->_ob_next->_ob_prev) points to op. If either of those conditions is false, the interpreter raises the fatal error I'm seeing. After mxDateTime_New pulls an mxDateTimeObject out of the free list, it calls _Py_NewReference on that object to transform it from a "conceptually deallocated" object to a "conceptually allocated" one. _Py_NewReference inserts the object into refchain. Later, when the object is being "conceptually deallocated", it should be removed from refchain with _Py_ForgetReference. The version of _Py_Dealloc that's active when Py_TRACE_REFS is enabled does this (_Py_Dealloc is the element of Py_DECREF that performs the actual destruction). _Py_Dealloc first calls _Py_ForgetReference to remove the object from refchain, then calls the object's destructor (op->ob_type->tp_dealloc). If WANT_SUBCLASSABLE_TYPES is not defined (it is not in my case), the destructor for mxDateTime_Type is mxDateTime_Free. So, if a DateTime object is deallocated normally, as a result of its reference count falling to zero, _Py_Dealloc is called on the object, which first removes it from refchain, then passes it to mxDateTime_Free. If a DateTime object is destroyed prematurely, as a result of invalid arguments to its destructor, the onError handler calls mxDateTime_Free, so the object is "conceptually deallocated" (placed in the free list), *but* the object is not removed from refchain. So if a refchain-membership-integrity-check is performed on the object in question or one of its immediate neighbors in refchain, that integrity check fails, leading to the fatal error. --- The solution is to 'Py_DECREF(...)' the object in the onError handler of its constructor, instead of passing the object directly to mxDateTime_Free. That change solves two problems: 1) It causes _Py_Dealloc to execute, which in turn executes _Py_ForgetReference, so the object is removed from refchain, as it should be. 2) At present, objects that are created successfully and later deallocated by normal reference count mechanics have a reference count of 0 when they enter the free list, whereas objects whose constructors abort their creation due to invalid arguments have a reference count of 1 when they enter the free list. Although AFAIK this doesn't cause an actual execution problem (because the object's reference count is *explicitly set to 1* rather than *incremented by 1* when the object is later "conceptually allocated" by _Py_NewReference), it is likely to confuse future maintainers and thereby lead to the introduction of an actual execution problem. I assume that if you agree that this is a reasonable solution, you'll want to apply the change not only to mxDateTime_FromDateAndTime, but to all similar constructors in mxDateTime.c. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From rj at maxxian.com Thu May 5 01:57:40 2005 From: rj at maxxian.com (RJ Juneau) Date: Mon Jan 23 16:02:10 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c5512e$f72798c0$6505a8c0@rjlaptop> I'm on the 30 day evaluation for mxodbc_zope_da. I'm getting the following error when I submit some queries: Error Type: KeyError Error Value: 'query' I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 with UCS4. The error seems to be caused by multiple rows being returned. I did see an earlier posting with the same error message. The response suggested a template error, but this is clearly not the case here. The additional evidence I've gathered so far: - I'm running the test directly from the ZSQL method, so there's no template involved. - If I use the same query with an additional "where" clause to ensure that only one row is returned, it works - If I use a value in the 'where' clause with no rows returned, it works - The same ZSQL query is being used on a Windows machine running Zope and the free ZODBC module without a problem - The query has been verified directly in mysql-client-browser Other info: - The database is MySQL 4.1.10A-0 - iODBC is the DB driver RJ Juneau -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050505/68d278bf/attachment-0043.htm From mal at egenix.com Thu May 5 12:37:43 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 23 16:02:11 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c5512e$f72798c0$6505a8c0@rjlaptop> References: <000301c5512e$f72798c0$6505a8c0@rjlaptop> Message-ID: <4279E967.6010904@egenix.com> RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 > with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 09:37:42 2005 From: rj at maxxian.com (RJ Juneau) Date: Mon Jan 23 16:02:11 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000101c5516f$3b96de90$6505a8c0@rjlaptop> More interesting info on the problem: If I execute the query directly in the "test" window of the base eGenix mxODBC Database Connection window, it works fine and returns the 20 lines expected. That could point to a problem in the rendering, which seems to be where the traceback ends. Note that within the same Zope system I also have an ODBC connection to a Sybase database, and I have successfully tested multi-line ZSQL queries there. This is the traceback: Time 2005/05/05 07:55:15.294 GMT-4 Exception Type KeyError Exception Value 'query' Traceback (innermost last): Module ZPublisher.Publish, line 101, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 39, in call_object Module Shared.DC.ZRDB.DA, line 337, in manage_test Module DocumentTemplate.DT_String, line 474, in __call__ Module DocumentTemplate.DT_In, line 602, in renderwb Module DocumentTemplate.DT_Var, line 219, in render KeyError: 'query' I don't think the following is an issue, but I'll include it for completeness.I am also getting the following iODBC warnings and errors in the Zope console log, which are related to the ODBC parameters being passed by iODBC. Note that these errors also appear for all of the successful queries. [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (Setup). [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (UsageCount). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Timeout). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Reuse). As for the ZSQL snippet from the template... Since there's no template involved yet (I'm still testing directly from the ZSQL method), I assume you mean the SQL code? select h.host_name, s.system_name, s.system_handle, count(*) from terminal t, system_map s, host h where t.system_index = s.system_index and s.host_index = h.host_index group by s.system_name order by h.host_name Nothing complicated here. There are no parameters passed to the query. RJ -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: May 5, 2005 5:38 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: Re: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is > 2.3.4 with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ---------------------------------------------------------------------- > -- > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 16:00:32 2005 From: charlie at egenix.com (Charlie Clark) Date: Mon Jan 23 16:02:11 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000101c5516f$3b96de90$6505a8c0@rjlaptop> References: <000101c5516f$3b96de90$6505a8c0@rjlaptop> Message-ID: <20050505150032.644.1@bepc.1115296715.fake> On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base eGenix > mxODBC Database Connection window, it works fine and returns the 20 > lines expected. That could point to a problem in the rendering, which > seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection to > a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 10:22:17 2005 From: rj at maxxian.com (RJ Juneau) Date: Mon Jan 23 16:02:11 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505150032.644.1@bepc.1115296715.fake> Message-ID: <000201c55175$75bcad10$6505a8c0@rjlaptop> At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 11:47:14 2005 From: rj at maxxian.com (RJ Juneau) Date: Mon Jan 23 16:02:11 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c55181$549be0e0$6505a8c0@rjlaptop> Charlie, I found a fix. Here it is in case anyone else runs into this. You were correct - the problem is in another part of Zope. Based on your feedback, I did a bit more searching and found something here: http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. html The problem appears to be in Zope versions after 2.7.0. I'm running 2.7.6, and the post indicates that it also happens in 2.7.4. The solution: Edit file /lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. There are two lines in the file that start with . Edit them as follows: Change first line to: Change second line to: Just to be after, I shut down Zope before I made the changes and restarted it after. Thanks for the help! RJ -----Original Message----- From: RJ Juneau [mailto:rj@maxxian.com] Sent: May 5, 2005 9:22 AM To: 'Charlie Clark' Cc: 'egenix-users@lists.egenix.com' Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 17:57:25 2005 From: charlie at egenix.com (Charlie Clark) Date: Mon Jan 23 16:02:12 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <20050505165725.3380.2@bepc.1115296715.fake> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Thu May 5 09:15:21 2005 From: charlie at egenix.com (Charlie Clark) Date: Mon Jan 23 16:02:12 2006 Subject: [Zope-DB] RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <000001c55185$41477730$6b00a8c0@fonacier.local> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________ Zope-DB mailing list Zope-DB@zope.org http://mail.zope.org/mailman/listinfo/zope-db From rj at maxxian.com Thu May 5 12:38:00 2005 From: rj at maxxian.com (RJ Juneau) Date: Mon Jan 23 16:02:12 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000001c55188$6b841eb0$6505a8c0@rjlaptop> I just double-checked. Zope-2.7.6-final. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 12:49:16 2005 From: rj at maxxian.com (RJ Juneau) Date: Mon Jan 23 16:02:12 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000501c55189$fe149ba0$6505a8c0@rjlaptop> Charlie, The fix has only been applied for 2.7.7, 2.8b2. The info is in the original bug report which is closed and can be found here: http://www.zope.org/Collectors/Zope/1745 RJ -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Fri May 6 11:50:09 2005 From: rj at maxxian.com (RJ Juneau) Date: Mon Jan 23 16:02:12 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC Message-ID: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Still on eval for the product. I cannot get a stable connection to Sybase via the iODBC drivers. - The Sybase ODBC connection - including a query - have been verified at the iODBC level. - The setup is already working well for ODBC connection to MySQL. Symptoms include: - If I click on "Open Connection", it still comes back with "Connection Closed" when I go to a ZSQL method - Using 'Connect on Demand' is not working either. - Clicking "Open Connection" gives me the following error: Connection string: DSN=lixbox_sybase; UID=sa; PWD=XXXXXXX Connection pool entry: 0 Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection rejected by data source', 7952) The odbc.ini definition for DSN "lixbox_sybase" is as follows: [lixbox_sybase] JetFix = No NoRowSetSizeLimit = No Description = Test connection to listbox Options = LIXBOX DSQUERY = SQLSERVER TDSHOST = lixbox TDSPORT = 5000 TDSVER = 5.0 SQLSERVER_CATALOG = N CURSOR_SENSITIVITY = LOW UserName = sa Password = XXXXXXXX ServerType = Sybase 10/11/12 Driver = /opt/openlink/lib/sql_mt_lt.so Database = pubs2 ReadOnly = no NoAutoCommit = No NoLoginBox = No FetchBufferSize = 60 Other relevant data: - Connecting via OpenLink's iODBC - Zope 2.7.6-final - Python 2.3.4 - Connection to Sybase has been successfully tested with iODBC, including issuing a query - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC connection RJ Juneau Chief Technology Officer Maxxian Integration Inc. 155 Westhampton Drive Thornhill, Ontario Canada L4J 7X2 E-mail: rj@maxxian.com Phone: +1 905 482 9429 Cell: +1 416 897 6682 Toll free: +1 866 758 9161 Fax: +1 647 722 2038 -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050506/aef33361/attachment-0043.htm From mal at egenix.com Fri May 6 18:27:37 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 23 16:02:12 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC In-Reply-To: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> References: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Message-ID: <427B8CE9.1010601@egenix.com> RJ Juneau wrote: > Still on eval for the product. > > I cannot get a stable connection to Sybase via the iODBC drivers. > > - The Sybase ODBC connection - including a query - have been verified at > the iODBC level. > - The setup is already working well for ODBC connection to MySQL. > > Symptoms include: > > - If I click on "Open Connection", it still comes back with "Connection > Closed" when I go to a ZSQL method > - Using 'Connect on Demand' is not working either. > - Clicking "Open Connection" gives me the following error: > > Connection string: DSN=lixbox_sybase; > UID=sa; > PWD=XXXXXXX Try writing the connection string on one line and without whitespace. ODBC drivers sometimes have problems with this. > Connection pool entry: 0 > Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection > rejected by data source', 7952) This is a generic error that relates to authentication or firewall problems. It is possible that turning on ODBC tracing the ODBC manager will give more clues as to the real cause of the problem. > The odbc.ini definition for DSN "lixbox_sybase" is as follows: > > [lixbox_sybase] > JetFix = No > NoRowSetSizeLimit = No > Description = Test connection to listbox > Options = LIXBOX > DSQUERY = SQLSERVER > TDSHOST = lixbox > TDSPORT = 5000 > TDSVER = 5.0 > SQLSERVER_CATALOG = N > CURSOR_SENSITIVITY = LOW > UserName = sa > Password = XXXXXXXX > ServerType = Sybase 10/11/12 > Driver = /opt/openlink/lib/sql_mt_lt.so > Database = pubs2 > ReadOnly = no > NoAutoCommit = No > NoLoginBox = No > FetchBufferSize = 60 > > > Other relevant data: > - Connecting via OpenLink's iODBC > - Zope 2.7.6-final > - Python 2.3.4 > - Connection to Sybase has been successfully tested with iODBC, > including issuing a query > - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC > connection > > > > RJ Juneau > Chief Technology Officer > Maxxian Integration Inc. > 155 Westhampton Drive > Thornhill, Ontario > Canada L4J 7X2 > E-mail: rj@maxxian.com > Phone: +1 905 482 9429 > Cell: +1 416 897 6682 > Toll free: +1 866 758 9161 > Fax: +1 647 722 2038 > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 06 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From calisp at gmail.com Sun May 15 23:49:03 2005 From: calisp at gmail.com (calisp@gmail.com) Date: Mon Jan 23 16:02:12 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK Message-ID: Hi, I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the following error... 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the last phase of a two-phase commit. This shouldn't happen. Traceback (most recent call last): File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one jar.tpc_finish(self) File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish try: self._finish() File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could not perform COMMIT or ROLLBACK', 1023) What could be causing this? Can I get the mxODBCZopeDA source from somewhere? It would make debugging this much easier. Thanks, Calisp. From mal at egenix.com Mon May 16 13:52:12 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 23 16:02:12 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK In-Reply-To: References: Message-ID: <42887B5C.4010109@egenix.com> calisp@gmail.com wrote: > Hi, > > I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with > unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the > following error... > > 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the > last phase of a two-phase commit. This shouldn't happen. > Traceback (most recent call last): > File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one > jar.tpc_finish(self) > File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish > try: self._finish() > File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish > File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler > ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could > not perform COMMIT or ROLLBACK', 1023) You should have a look at the database logs to see what prevented the commit from being completed. > What could be causing this? Hard to say: mxODBCZopeDA is trying to commit the transaction, but the driver or database failed to complete the request. The above error was generated by the ODBC driver. This could be network or DNS problems, or be related to a bug in FreeTDS (which is getting more stable with every new release, but should still be considered beta quality software at the moment). > Can I get the mxODBCZopeDA source from > somewhere? It would make debugging this much easier. Getting the source is not an option and won't help much either since the source of the problem is not mxODBCZopeDA. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 16 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Sun May 1 21:29:25 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 23 20:01:02 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <427259F3.4090806@egenix.com> References: <20050427130906.52878.qmail@web30008.mail.mud.yahoo.com> <427259F3.4090806@egenix.com> Message-ID: <42752005.7080904@egenix.com> M.-A. Lemburg wrote: > David Rushby wrote: > >> --- "M.-A. Lemburg" wrote: >> >>> Are you using the standard mxDateTime build or one >>> with WANT_SUBCLASSABLE_TYPES defined... >> >> >> >> Presumably "the standard", since I just built with 'py24d setup.py >> build', making no attempt to enable special directives. >> >> >>> ... (mxDateTime_Deallocate is only used by the latter)? >> >> >> >> That's true in 2.1.0-2005-04-15, but not in 2.1.0b5. >> >> >>> In any case, please try our latest snapshot: >>> >>> >> >> http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-04-15.zip >> >>> to see if that makes any difference. >> >> >> >> I can't build it out of the box: > > > Hmm, looks like distutils' sdist command doesn't like our new > repository layout which uses symlinks (after we've switched to > subversion). > > We'll have to debug distutils first, I guess :-( Ok, we've found the problem and fixed it. Here's the new release (which does build out of the box at least on our boxes ;-): http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 01 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From davidrushby at yahoo.com Mon May 2 15:49:53 2005 From: davidrushby at yahoo.com (David Rushby) Date: Mon Jan 23 20:01:02 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Ok, we've found the problem and fixed it. Here's the new > release (which does build out of the box at least on our > boxes ;-): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip It does build now, but: py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" still behaves as it did when I submitted my original message: Fatal Python error: UNREF invalid object Aborted This is the same debug build of Python 2.4.1 that I was previously using, running the same configuration (CentOS Linux 4.0/i386, everything compiled with GCC 3.4.3). Have you examined my original claim as to the cause of the bug? __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 10:21:55 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 23 20:01:02 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> References: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> Message-ID: <42772693.8050306@egenix.com> David Rushby wrote: > --- "M.-A. Lemburg" wrote: > >>Ok, we've found the problem and fixed it. Here's the new >>release (which does build out of the box at least on our >>boxes ;-): >> >> > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip > > It does build now, but: > py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" > still behaves as it did when I submitted my original message: > Fatal Python error: UNREF invalid object > Aborted > > This is the same debug build of Python 2.4.1 that I was previously > using, running the same configuration (CentOS Linux 4.0/i386, > everything compiled with GCC 3.4.3). > > Have you examined my original claim as to the cause of the bug? No. We haven't had time for looking into it. I'm not sure whether your analysis of the problem is correct: if you don't define WANT_SUBCLASSABLE_TYPES, the API mxDateTime_Deallocate() is neither defined nor used. Furthermore, PyObject_Del() is only called by mxDateTime_Free() if you have explicitely edited mxDateTime.c to disabled the free list #defines. In a standard build, PyObject_Del() is only called at module finalization time. Note that the reason we call mxDateTime_Free() in the constructor is that we don't want the destructor of the object to be called. Py_DECREF() would call the destructor (mxDateTime_Deallocate). It is possible that the debug code in Python complains about the refcount in the object not being 0 at the time the object is finalized (module finalization time), but I don't see any such checks in PyObject_Free() (which is what PyObject_Del() maps to). Again, all of this does not happen in regular non-debug Python builds. Please be aware that we don't support debug builds, so fixing the problem (if there is one - gcc has some serious optimization problems on some combinations of platform and version) will take a while. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 09:27:37 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Mon Jan 23 20:01:02 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 Message-ID: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Hi all- I am trying to build the mx-base package, v.2.0.6. This will be used with postgresql 7.3.9, psycopg 1.1.18, and Roundup 0.8.2. RHEL 3.0 Python 2.3 egenix-mx-base-2.0.6.tar.gz I performed a: /usr/local/bin/python2.3 setup.py install Everything looks proper with the exeception of this series of warning statements: ----------------- gcc -pthread -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fno-strict-aliasing -fPIC -Imx/BeeBase/mxBeeBase -I/usr/local/incl ude/python2.3 -I/usr/local/include -c mx/BeeBase/mxBeeBase/btr.c -o build/temp.linux-i686-2.3/mx/BeeBase/mxBeeBase/mxBeeBa se/mx/BeeBase/mxBeeBase/btr.o mx/BeeBase/mxBeeBase/btr.c: In function `dumpBuf': mx/BeeBase/mxBeeBase/btr.c:249: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:250: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:255: warning: unsigned int format, long unsigned int arg (arg 4) mx/BeeBase/mxBeeBase/btr.c:256: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c: In function `_validateTree': mx/BeeBase/mxBeeBase/btr.c:330: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:337: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:339: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:349: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:351: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 3) creating build/lib.linux-i686-2.3/mx/BeeBase creating build/lib.linux-i686-2.3/mx/BeeBase/mxBeeBase -------------- Would someone be kind enough to let me know whether these messages were expected, and if not, how I might resolve these? Thanks! DC __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 22:06:33 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 23 20:01:02 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> References: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Message-ID: <4277CBB9.8020302@egenix.com> Dianne Chen wrote: > Hi all- > > I am trying to build the mx-base package, v.2.0.6. > This will be used with postgresql 7.3.9, psycopg > 1.1.18, and Roundup 0.8.2. > > RHEL 3.0 > Python 2.3 > egenix-mx-base-2.0.6.tar.gz > > I performed a: > > /usr/local/bin/python2.3 setup.py install > > Everything looks proper with the exeception of this > series of warning statements: > > ----------------- > ... > -------------- > > Would someone be kind enough to let me know whether > these messages were expected, and if not, how I might > resolve these? These warning can safely be ignored. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 13:41:14 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Mon Jan 23 20:01:02 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: 6667 Message-ID: <20050503194114.72091.qmail@web31414.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Dianne Chen wrote: > > Hi all- > > > > I am trying to build the mx-base package, v.2.0.6. > > This will be used with postgresql 7.3.9, psycopg > > 1.1.18, and Roundup 0.8.2. > > > > RHEL 3.0 > > Python 2.3 > > egenix-mx-base-2.0.6.tar.gz > > > > I performed a: > > > > /usr/local/bin/python2.3 setup.py install > > > > Everything looks proper with the exeception of > this > > series of warning statements: > > > > ----------------- > > ... > > -------------- > > > > Would someone be kind enough to let me know > whether > > these messages were expected, and if not, how I > might > > resolve these? > > These warning can safely be ignored. > > -- > Marc-Andre Lemburg > eGenix.com > Marc- Thank you very much for the reply. It helps greatly. With kind regards, DC __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From davidrushby at yahoo.com Tue May 3 17:18:46 2005 From: davidrushby at yahoo.com (David Rushby) Date: Mon Jan 23 20:01:02 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050503231846.35012.qmail@web30009.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > I'm not sure whether your analysis of the problem is correct... Indeed, my original analysis wasn't correct; I think this one is. The fatal error I'm complaining about only arises if the arguments to DateTime.DateTime are invalid, so that the object is deallocated in the onError block of mxDateTime_FromDateAndTime. If the object is created successfully, and later deallocated by Python's garbage collector, the fatal error doesn't arise. Here's my analysis of the problem: --- If the debugging directive Py_TRACE_REFS is enabled, as it is in my case, the Python interpreter maintains a doubly linked list of all Python objects (named refchain) via the _ob_next and _ob_prev pointers added to PyObject via _PyObject_HEAD_EXTRA. Each object is inserted into refchain by the _Py_AddToAllObjects call in _Py_NewReference, and removed from refchain by the _Py_ForgetReference call in _Py_Dealloc. _Py_ForgetReference performs an integrity check on the object being deallocated (op) to make sure that its neighbors in refchain recognize it. Specifically, _Py_ForgetReference verifies that the _ob_next pointer of the previous object in refchain (op->_ob_prev->_ob_next) points to op, and that the _ob_prev pointer of the next object in refchain (op->_ob_next->_ob_prev) points to op. If either of those conditions is false, the interpreter raises the fatal error I'm seeing. After mxDateTime_New pulls an mxDateTimeObject out of the free list, it calls _Py_NewReference on that object to transform it from a "conceptually deallocated" object to a "conceptually allocated" one. _Py_NewReference inserts the object into refchain. Later, when the object is being "conceptually deallocated", it should be removed from refchain with _Py_ForgetReference. The version of _Py_Dealloc that's active when Py_TRACE_REFS is enabled does this (_Py_Dealloc is the element of Py_DECREF that performs the actual destruction). _Py_Dealloc first calls _Py_ForgetReference to remove the object from refchain, then calls the object's destructor (op->ob_type->tp_dealloc). If WANT_SUBCLASSABLE_TYPES is not defined (it is not in my case), the destructor for mxDateTime_Type is mxDateTime_Free. So, if a DateTime object is deallocated normally, as a result of its reference count falling to zero, _Py_Dealloc is called on the object, which first removes it from refchain, then passes it to mxDateTime_Free. If a DateTime object is destroyed prematurely, as a result of invalid arguments to its destructor, the onError handler calls mxDateTime_Free, so the object is "conceptually deallocated" (placed in the free list), *but* the object is not removed from refchain. So if a refchain-membership-integrity-check is performed on the object in question or one of its immediate neighbors in refchain, that integrity check fails, leading to the fatal error. --- The solution is to 'Py_DECREF(...)' the object in the onError handler of its constructor, instead of passing the object directly to mxDateTime_Free. That change solves two problems: 1) It causes _Py_Dealloc to execute, which in turn executes _Py_ForgetReference, so the object is removed from refchain, as it should be. 2) At present, objects that are created successfully and later deallocated by normal reference count mechanics have a reference count of 0 when they enter the free list, whereas objects whose constructors abort their creation due to invalid arguments have a reference count of 1 when they enter the free list. Although AFAIK this doesn't cause an actual execution problem (because the object's reference count is *explicitly set to 1* rather than *incremented by 1* when the object is later "conceptually allocated" by _Py_NewReference), it is likely to confuse future maintainers and thereby lead to the introduction of an actual execution problem. I assume that if you agree that this is a reasonable solution, you'll want to apply the change not only to mxDateTime_FromDateAndTime, but to all similar constructors in mxDateTime.c. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From rj at maxxian.com Thu May 5 01:57:40 2005 From: rj at maxxian.com (RJ Juneau) Date: Mon Jan 23 20:01:02 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c5512e$f72798c0$6505a8c0@rjlaptop> I'm on the 30 day evaluation for mxodbc_zope_da. I'm getting the following error when I submit some queries: Error Type: KeyError Error Value: 'query' I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 with UCS4. The error seems to be caused by multiple rows being returned. I did see an earlier posting with the same error message. The response suggested a template error, but this is clearly not the case here. The additional evidence I've gathered so far: - I'm running the test directly from the ZSQL method, so there's no template involved. - If I use the same query with an additional "where" clause to ensure that only one row is returned, it works - If I use a value in the 'where' clause with no rows returned, it works - The same ZSQL query is being used on a Windows machine running Zope and the free ZODBC module without a problem - The query has been verified directly in mysql-client-browser Other info: - The database is MySQL 4.1.10A-0 - iODBC is the DB driver RJ Juneau -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050505/68d278bf/attachment-0044.htm From mal at egenix.com Thu May 5 12:37:43 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 23 20:01:02 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c5512e$f72798c0$6505a8c0@rjlaptop> References: <000301c5512e$f72798c0$6505a8c0@rjlaptop> Message-ID: <4279E967.6010904@egenix.com> RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 > with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 09:37:42 2005 From: rj at maxxian.com (RJ Juneau) Date: Mon Jan 23 20:01:02 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000101c5516f$3b96de90$6505a8c0@rjlaptop> More interesting info on the problem: If I execute the query directly in the "test" window of the base eGenix mxODBC Database Connection window, it works fine and returns the 20 lines expected. That could point to a problem in the rendering, which seems to be where the traceback ends. Note that within the same Zope system I also have an ODBC connection to a Sybase database, and I have successfully tested multi-line ZSQL queries there. This is the traceback: Time 2005/05/05 07:55:15.294 GMT-4 Exception Type KeyError Exception Value 'query' Traceback (innermost last): Module ZPublisher.Publish, line 101, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 39, in call_object Module Shared.DC.ZRDB.DA, line 337, in manage_test Module DocumentTemplate.DT_String, line 474, in __call__ Module DocumentTemplate.DT_In, line 602, in renderwb Module DocumentTemplate.DT_Var, line 219, in render KeyError: 'query' I don't think the following is an issue, but I'll include it for completeness.I am also getting the following iODBC warnings and errors in the Zope console log, which are related to the ODBC parameters being passed by iODBC. Note that these errors also appear for all of the successful queries. [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (Setup). [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (UsageCount). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Timeout). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Reuse). As for the ZSQL snippet from the template... Since there's no template involved yet (I'm still testing directly from the ZSQL method), I assume you mean the SQL code? select h.host_name, s.system_name, s.system_handle, count(*) from terminal t, system_map s, host h where t.system_index = s.system_index and s.host_index = h.host_index group by s.system_name order by h.host_name Nothing complicated here. There are no parameters passed to the query. RJ -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: May 5, 2005 5:38 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: Re: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is > 2.3.4 with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ---------------------------------------------------------------------- > -- > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 16:00:32 2005 From: charlie at egenix.com (Charlie Clark) Date: Mon Jan 23 20:01:02 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000101c5516f$3b96de90$6505a8c0@rjlaptop> References: <000101c5516f$3b96de90$6505a8c0@rjlaptop> Message-ID: <20050505150032.644.1@bepc.1115296715.fake> On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base eGenix > mxODBC Database Connection window, it works fine and returns the 20 > lines expected. That could point to a problem in the rendering, which > seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection to > a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 10:22:17 2005 From: rj at maxxian.com (RJ Juneau) Date: Mon Jan 23 20:01:02 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505150032.644.1@bepc.1115296715.fake> Message-ID: <000201c55175$75bcad10$6505a8c0@rjlaptop> At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 11:47:14 2005 From: rj at maxxian.com (RJ Juneau) Date: Mon Jan 23 20:01:03 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c55181$549be0e0$6505a8c0@rjlaptop> Charlie, I found a fix. Here it is in case anyone else runs into this. You were correct - the problem is in another part of Zope. Based on your feedback, I did a bit more searching and found something here: http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. html The problem appears to be in Zope versions after 2.7.0. I'm running 2.7.6, and the post indicates that it also happens in 2.7.4. The solution: Edit file /lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. There are two lines in the file that start with . Edit them as follows: Change first line to: Change second line to: Just to be after, I shut down Zope before I made the changes and restarted it after. Thanks for the help! RJ -----Original Message----- From: RJ Juneau [mailto:rj@maxxian.com] Sent: May 5, 2005 9:22 AM To: 'Charlie Clark' Cc: 'egenix-users@lists.egenix.com' Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 17:57:25 2005 From: charlie at egenix.com (Charlie Clark) Date: Mon Jan 23 20:01:03 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <20050505165725.3380.2@bepc.1115296715.fake> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Thu May 5 09:15:21 2005 From: charlie at egenix.com (Charlie Clark) Date: Mon Jan 23 20:01:03 2006 Subject: [Zope-DB] RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <000001c55185$41477730$6b00a8c0@fonacier.local> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________ Zope-DB mailing list Zope-DB@zope.org http://mail.zope.org/mailman/listinfo/zope-db From rj at maxxian.com Thu May 5 12:38:00 2005 From: rj at maxxian.com (RJ Juneau) Date: Mon Jan 23 20:01:03 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000001c55188$6b841eb0$6505a8c0@rjlaptop> I just double-checked. Zope-2.7.6-final. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 12:49:16 2005 From: rj at maxxian.com (RJ Juneau) Date: Mon Jan 23 20:01:03 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000501c55189$fe149ba0$6505a8c0@rjlaptop> Charlie, The fix has only been applied for 2.7.7, 2.8b2. The info is in the original bug report which is closed and can be found here: http://www.zope.org/Collectors/Zope/1745 RJ -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Fri May 6 11:50:09 2005 From: rj at maxxian.com (RJ Juneau) Date: Mon Jan 23 20:01:03 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC Message-ID: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Still on eval for the product. I cannot get a stable connection to Sybase via the iODBC drivers. - The Sybase ODBC connection - including a query - have been verified at the iODBC level. - The setup is already working well for ODBC connection to MySQL. Symptoms include: - If I click on "Open Connection", it still comes back with "Connection Closed" when I go to a ZSQL method - Using 'Connect on Demand' is not working either. - Clicking "Open Connection" gives me the following error: Connection string: DSN=lixbox_sybase; UID=sa; PWD=XXXXXXX Connection pool entry: 0 Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection rejected by data source', 7952) The odbc.ini definition for DSN "lixbox_sybase" is as follows: [lixbox_sybase] JetFix = No NoRowSetSizeLimit = No Description = Test connection to listbox Options = LIXBOX DSQUERY = SQLSERVER TDSHOST = lixbox TDSPORT = 5000 TDSVER = 5.0 SQLSERVER_CATALOG = N CURSOR_SENSITIVITY = LOW UserName = sa Password = XXXXXXXX ServerType = Sybase 10/11/12 Driver = /opt/openlink/lib/sql_mt_lt.so Database = pubs2 ReadOnly = no NoAutoCommit = No NoLoginBox = No FetchBufferSize = 60 Other relevant data: - Connecting via OpenLink's iODBC - Zope 2.7.6-final - Python 2.3.4 - Connection to Sybase has been successfully tested with iODBC, including issuing a query - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC connection RJ Juneau Chief Technology Officer Maxxian Integration Inc. 155 Westhampton Drive Thornhill, Ontario Canada L4J 7X2 E-mail: rj@maxxian.com Phone: +1 905 482 9429 Cell: +1 416 897 6682 Toll free: +1 866 758 9161 Fax: +1 647 722 2038 -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050506/aef33361/attachment-0044.htm From mal at egenix.com Fri May 6 18:27:37 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 23 20:01:03 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC In-Reply-To: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> References: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Message-ID: <427B8CE9.1010601@egenix.com> RJ Juneau wrote: > Still on eval for the product. > > I cannot get a stable connection to Sybase via the iODBC drivers. > > - The Sybase ODBC connection - including a query - have been verified at > the iODBC level. > - The setup is already working well for ODBC connection to MySQL. > > Symptoms include: > > - If I click on "Open Connection", it still comes back with "Connection > Closed" when I go to a ZSQL method > - Using 'Connect on Demand' is not working either. > - Clicking "Open Connection" gives me the following error: > > Connection string: DSN=lixbox_sybase; > UID=sa; > PWD=XXXXXXX Try writing the connection string on one line and without whitespace. ODBC drivers sometimes have problems with this. > Connection pool entry: 0 > Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection > rejected by data source', 7952) This is a generic error that relates to authentication or firewall problems. It is possible that turning on ODBC tracing the ODBC manager will give more clues as to the real cause of the problem. > The odbc.ini definition for DSN "lixbox_sybase" is as follows: > > [lixbox_sybase] > JetFix = No > NoRowSetSizeLimit = No > Description = Test connection to listbox > Options = LIXBOX > DSQUERY = SQLSERVER > TDSHOST = lixbox > TDSPORT = 5000 > TDSVER = 5.0 > SQLSERVER_CATALOG = N > CURSOR_SENSITIVITY = LOW > UserName = sa > Password = XXXXXXXX > ServerType = Sybase 10/11/12 > Driver = /opt/openlink/lib/sql_mt_lt.so > Database = pubs2 > ReadOnly = no > NoAutoCommit = No > NoLoginBox = No > FetchBufferSize = 60 > > > Other relevant data: > - Connecting via OpenLink's iODBC > - Zope 2.7.6-final > - Python 2.3.4 > - Connection to Sybase has been successfully tested with iODBC, > including issuing a query > - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC > connection > > > > RJ Juneau > Chief Technology Officer > Maxxian Integration Inc. > 155 Westhampton Drive > Thornhill, Ontario > Canada L4J 7X2 > E-mail: rj@maxxian.com > Phone: +1 905 482 9429 > Cell: +1 416 897 6682 > Toll free: +1 866 758 9161 > Fax: +1 647 722 2038 > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 06 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From calisp at gmail.com Sun May 15 23:49:03 2005 From: calisp at gmail.com (calisp@gmail.com) Date: Mon Jan 23 20:01:03 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK Message-ID: Hi, I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the following error... 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the last phase of a two-phase commit. This shouldn't happen. Traceback (most recent call last): File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one jar.tpc_finish(self) File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish try: self._finish() File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could not perform COMMIT or ROLLBACK', 1023) What could be causing this? Can I get the mxODBCZopeDA source from somewhere? It would make debugging this much easier. Thanks, Calisp. From mal at egenix.com Mon May 16 13:52:12 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 23 20:01:03 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK In-Reply-To: References: Message-ID: <42887B5C.4010109@egenix.com> calisp@gmail.com wrote: > Hi, > > I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with > unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the > following error... > > 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the > last phase of a two-phase commit. This shouldn't happen. > Traceback (most recent call last): > File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one > jar.tpc_finish(self) > File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish > try: self._finish() > File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish > File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler > ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could > not perform COMMIT or ROLLBACK', 1023) You should have a look at the database logs to see what prevented the commit from being completed. > What could be causing this? Hard to say: mxODBCZopeDA is trying to commit the transaction, but the driver or database failed to complete the request. The above error was generated by the ODBC driver. This could be network or DNS problems, or be related to a bug in FreeTDS (which is getting more stable with every new release, but should still be considered beta quality software at the moment). > Can I get the mxODBCZopeDA source from > somewhere? It would make debugging this much easier. Getting the source is not an option and won't help much either since the source of the problem is not mxODBCZopeDA. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 16 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Sun May 1 21:29:25 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 24 08:03:32 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <427259F3.4090806@egenix.com> References: <20050427130906.52878.qmail@web30008.mail.mud.yahoo.com> <427259F3.4090806@egenix.com> Message-ID: <42752005.7080904@egenix.com> M.-A. Lemburg wrote: > David Rushby wrote: > >> --- "M.-A. Lemburg" wrote: >> >>> Are you using the standard mxDateTime build or one >>> with WANT_SUBCLASSABLE_TYPES defined... >> >> >> >> Presumably "the standard", since I just built with 'py24d setup.py >> build', making no attempt to enable special directives. >> >> >>> ... (mxDateTime_Deallocate is only used by the latter)? >> >> >> >> That's true in 2.1.0-2005-04-15, but not in 2.1.0b5. >> >> >>> In any case, please try our latest snapshot: >>> >>> >> >> http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-04-15.zip >> >>> to see if that makes any difference. >> >> >> >> I can't build it out of the box: > > > Hmm, looks like distutils' sdist command doesn't like our new > repository layout which uses symlinks (after we've switched to > subversion). > > We'll have to debug distutils first, I guess :-( Ok, we've found the problem and fixed it. Here's the new release (which does build out of the box at least on our boxes ;-): http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 01 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From davidrushby at yahoo.com Mon May 2 15:49:53 2005 From: davidrushby at yahoo.com (David Rushby) Date: Tue Jan 24 08:03:32 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Ok, we've found the problem and fixed it. Here's the new > release (which does build out of the box at least on our > boxes ;-): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip It does build now, but: py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" still behaves as it did when I submitted my original message: Fatal Python error: UNREF invalid object Aborted This is the same debug build of Python 2.4.1 that I was previously using, running the same configuration (CentOS Linux 4.0/i386, everything compiled with GCC 3.4.3). Have you examined my original claim as to the cause of the bug? __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 10:21:55 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 24 08:03:32 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> References: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> Message-ID: <42772693.8050306@egenix.com> David Rushby wrote: > --- "M.-A. Lemburg" wrote: > >>Ok, we've found the problem and fixed it. Here's the new >>release (which does build out of the box at least on our >>boxes ;-): >> >> > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip > > It does build now, but: > py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" > still behaves as it did when I submitted my original message: > Fatal Python error: UNREF invalid object > Aborted > > This is the same debug build of Python 2.4.1 that I was previously > using, running the same configuration (CentOS Linux 4.0/i386, > everything compiled with GCC 3.4.3). > > Have you examined my original claim as to the cause of the bug? No. We haven't had time for looking into it. I'm not sure whether your analysis of the problem is correct: if you don't define WANT_SUBCLASSABLE_TYPES, the API mxDateTime_Deallocate() is neither defined nor used. Furthermore, PyObject_Del() is only called by mxDateTime_Free() if you have explicitely edited mxDateTime.c to disabled the free list #defines. In a standard build, PyObject_Del() is only called at module finalization time. Note that the reason we call mxDateTime_Free() in the constructor is that we don't want the destructor of the object to be called. Py_DECREF() would call the destructor (mxDateTime_Deallocate). It is possible that the debug code in Python complains about the refcount in the object not being 0 at the time the object is finalized (module finalization time), but I don't see any such checks in PyObject_Free() (which is what PyObject_Del() maps to). Again, all of this does not happen in regular non-debug Python builds. Please be aware that we don't support debug builds, so fixing the problem (if there is one - gcc has some serious optimization problems on some combinations of platform and version) will take a while. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 09:27:37 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Tue Jan 24 08:03:32 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 Message-ID: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Hi all- I am trying to build the mx-base package, v.2.0.6. This will be used with postgresql 7.3.9, psycopg 1.1.18, and Roundup 0.8.2. RHEL 3.0 Python 2.3 egenix-mx-base-2.0.6.tar.gz I performed a: /usr/local/bin/python2.3 setup.py install Everything looks proper with the exeception of this series of warning statements: ----------------- gcc -pthread -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fno-strict-aliasing -fPIC -Imx/BeeBase/mxBeeBase -I/usr/local/incl ude/python2.3 -I/usr/local/include -c mx/BeeBase/mxBeeBase/btr.c -o build/temp.linux-i686-2.3/mx/BeeBase/mxBeeBase/mxBeeBa se/mx/BeeBase/mxBeeBase/btr.o mx/BeeBase/mxBeeBase/btr.c: In function `dumpBuf': mx/BeeBase/mxBeeBase/btr.c:249: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:250: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:255: warning: unsigned int format, long unsigned int arg (arg 4) mx/BeeBase/mxBeeBase/btr.c:256: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c: In function `_validateTree': mx/BeeBase/mxBeeBase/btr.c:330: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:337: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:339: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:349: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:351: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 3) creating build/lib.linux-i686-2.3/mx/BeeBase creating build/lib.linux-i686-2.3/mx/BeeBase/mxBeeBase -------------- Would someone be kind enough to let me know whether these messages were expected, and if not, how I might resolve these? Thanks! DC __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 22:06:33 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 24 08:03:32 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> References: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Message-ID: <4277CBB9.8020302@egenix.com> Dianne Chen wrote: > Hi all- > > I am trying to build the mx-base package, v.2.0.6. > This will be used with postgresql 7.3.9, psycopg > 1.1.18, and Roundup 0.8.2. > > RHEL 3.0 > Python 2.3 > egenix-mx-base-2.0.6.tar.gz > > I performed a: > > /usr/local/bin/python2.3 setup.py install > > Everything looks proper with the exeception of this > series of warning statements: > > ----------------- > ... > -------------- > > Would someone be kind enough to let me know whether > these messages were expected, and if not, how I might > resolve these? These warning can safely be ignored. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 13:41:14 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Tue Jan 24 08:03:32 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: 6667 Message-ID: <20050503194114.72091.qmail@web31414.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Dianne Chen wrote: > > Hi all- > > > > I am trying to build the mx-base package, v.2.0.6. > > This will be used with postgresql 7.3.9, psycopg > > 1.1.18, and Roundup 0.8.2. > > > > RHEL 3.0 > > Python 2.3 > > egenix-mx-base-2.0.6.tar.gz > > > > I performed a: > > > > /usr/local/bin/python2.3 setup.py install > > > > Everything looks proper with the exeception of > this > > series of warning statements: > > > > ----------------- > > ... > > -------------- > > > > Would someone be kind enough to let me know > whether > > these messages were expected, and if not, how I > might > > resolve these? > > These warning can safely be ignored. > > -- > Marc-Andre Lemburg > eGenix.com > Marc- Thank you very much for the reply. It helps greatly. With kind regards, DC __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From davidrushby at yahoo.com Tue May 3 17:18:46 2005 From: davidrushby at yahoo.com (David Rushby) Date: Tue Jan 24 08:03:32 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050503231846.35012.qmail@web30009.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > I'm not sure whether your analysis of the problem is correct... Indeed, my original analysis wasn't correct; I think this one is. The fatal error I'm complaining about only arises if the arguments to DateTime.DateTime are invalid, so that the object is deallocated in the onError block of mxDateTime_FromDateAndTime. If the object is created successfully, and later deallocated by Python's garbage collector, the fatal error doesn't arise. Here's my analysis of the problem: --- If the debugging directive Py_TRACE_REFS is enabled, as it is in my case, the Python interpreter maintains a doubly linked list of all Python objects (named refchain) via the _ob_next and _ob_prev pointers added to PyObject via _PyObject_HEAD_EXTRA. Each object is inserted into refchain by the _Py_AddToAllObjects call in _Py_NewReference, and removed from refchain by the _Py_ForgetReference call in _Py_Dealloc. _Py_ForgetReference performs an integrity check on the object being deallocated (op) to make sure that its neighbors in refchain recognize it. Specifically, _Py_ForgetReference verifies that the _ob_next pointer of the previous object in refchain (op->_ob_prev->_ob_next) points to op, and that the _ob_prev pointer of the next object in refchain (op->_ob_next->_ob_prev) points to op. If either of those conditions is false, the interpreter raises the fatal error I'm seeing. After mxDateTime_New pulls an mxDateTimeObject out of the free list, it calls _Py_NewReference on that object to transform it from a "conceptually deallocated" object to a "conceptually allocated" one. _Py_NewReference inserts the object into refchain. Later, when the object is being "conceptually deallocated", it should be removed from refchain with _Py_ForgetReference. The version of _Py_Dealloc that's active when Py_TRACE_REFS is enabled does this (_Py_Dealloc is the element of Py_DECREF that performs the actual destruction). _Py_Dealloc first calls _Py_ForgetReference to remove the object from refchain, then calls the object's destructor (op->ob_type->tp_dealloc). If WANT_SUBCLASSABLE_TYPES is not defined (it is not in my case), the destructor for mxDateTime_Type is mxDateTime_Free. So, if a DateTime object is deallocated normally, as a result of its reference count falling to zero, _Py_Dealloc is called on the object, which first removes it from refchain, then passes it to mxDateTime_Free. If a DateTime object is destroyed prematurely, as a result of invalid arguments to its destructor, the onError handler calls mxDateTime_Free, so the object is "conceptually deallocated" (placed in the free list), *but* the object is not removed from refchain. So if a refchain-membership-integrity-check is performed on the object in question or one of its immediate neighbors in refchain, that integrity check fails, leading to the fatal error. --- The solution is to 'Py_DECREF(...)' the object in the onError handler of its constructor, instead of passing the object directly to mxDateTime_Free. That change solves two problems: 1) It causes _Py_Dealloc to execute, which in turn executes _Py_ForgetReference, so the object is removed from refchain, as it should be. 2) At present, objects that are created successfully and later deallocated by normal reference count mechanics have a reference count of 0 when they enter the free list, whereas objects whose constructors abort their creation due to invalid arguments have a reference count of 1 when they enter the free list. Although AFAIK this doesn't cause an actual execution problem (because the object's reference count is *explicitly set to 1* rather than *incremented by 1* when the object is later "conceptually allocated" by _Py_NewReference), it is likely to confuse future maintainers and thereby lead to the introduction of an actual execution problem. I assume that if you agree that this is a reasonable solution, you'll want to apply the change not only to mxDateTime_FromDateAndTime, but to all similar constructors in mxDateTime.c. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From rj at maxxian.com Thu May 5 01:57:40 2005 From: rj at maxxian.com (RJ Juneau) Date: Tue Jan 24 08:03:32 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c5512e$f72798c0$6505a8c0@rjlaptop> I'm on the 30 day evaluation for mxodbc_zope_da. I'm getting the following error when I submit some queries: Error Type: KeyError Error Value: 'query' I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 with UCS4. The error seems to be caused by multiple rows being returned. I did see an earlier posting with the same error message. The response suggested a template error, but this is clearly not the case here. The additional evidence I've gathered so far: - I'm running the test directly from the ZSQL method, so there's no template involved. - If I use the same query with an additional "where" clause to ensure that only one row is returned, it works - If I use a value in the 'where' clause with no rows returned, it works - The same ZSQL query is being used on a Windows machine running Zope and the free ZODBC module without a problem - The query has been verified directly in mysql-client-browser Other info: - The database is MySQL 4.1.10A-0 - iODBC is the DB driver RJ Juneau -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050505/68d278bf/attachment-0045.htm From mal at egenix.com Thu May 5 12:37:43 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 24 08:03:32 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c5512e$f72798c0$6505a8c0@rjlaptop> References: <000301c5512e$f72798c0$6505a8c0@rjlaptop> Message-ID: <4279E967.6010904@egenix.com> RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 > with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 09:37:42 2005 From: rj at maxxian.com (RJ Juneau) Date: Tue Jan 24 08:03:32 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000101c5516f$3b96de90$6505a8c0@rjlaptop> More interesting info on the problem: If I execute the query directly in the "test" window of the base eGenix mxODBC Database Connection window, it works fine and returns the 20 lines expected. That could point to a problem in the rendering, which seems to be where the traceback ends. Note that within the same Zope system I also have an ODBC connection to a Sybase database, and I have successfully tested multi-line ZSQL queries there. This is the traceback: Time 2005/05/05 07:55:15.294 GMT-4 Exception Type KeyError Exception Value 'query' Traceback (innermost last): Module ZPublisher.Publish, line 101, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 39, in call_object Module Shared.DC.ZRDB.DA, line 337, in manage_test Module DocumentTemplate.DT_String, line 474, in __call__ Module DocumentTemplate.DT_In, line 602, in renderwb Module DocumentTemplate.DT_Var, line 219, in render KeyError: 'query' I don't think the following is an issue, but I'll include it for completeness.I am also getting the following iODBC warnings and errors in the Zope console log, which are related to the ODBC parameters being passed by iODBC. Note that these errors also appear for all of the successful queries. [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (Setup). [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (UsageCount). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Timeout). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Reuse). As for the ZSQL snippet from the template... Since there's no template involved yet (I'm still testing directly from the ZSQL method), I assume you mean the SQL code? select h.host_name, s.system_name, s.system_handle, count(*) from terminal t, system_map s, host h where t.system_index = s.system_index and s.host_index = h.host_index group by s.system_name order by h.host_name Nothing complicated here. There are no parameters passed to the query. RJ -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: May 5, 2005 5:38 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: Re: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is > 2.3.4 with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ---------------------------------------------------------------------- > -- > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 16:00:32 2005 From: charlie at egenix.com (Charlie Clark) Date: Tue Jan 24 08:03:32 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000101c5516f$3b96de90$6505a8c0@rjlaptop> References: <000101c5516f$3b96de90$6505a8c0@rjlaptop> Message-ID: <20050505150032.644.1@bepc.1115296715.fake> On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base eGenix > mxODBC Database Connection window, it works fine and returns the 20 > lines expected. That could point to a problem in the rendering, which > seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection to > a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 10:22:17 2005 From: rj at maxxian.com (RJ Juneau) Date: Tue Jan 24 08:03:32 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505150032.644.1@bepc.1115296715.fake> Message-ID: <000201c55175$75bcad10$6505a8c0@rjlaptop> At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 11:47:14 2005 From: rj at maxxian.com (RJ Juneau) Date: Tue Jan 24 08:03:32 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c55181$549be0e0$6505a8c0@rjlaptop> Charlie, I found a fix. Here it is in case anyone else runs into this. You were correct - the problem is in another part of Zope. Based on your feedback, I did a bit more searching and found something here: http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. html The problem appears to be in Zope versions after 2.7.0. I'm running 2.7.6, and the post indicates that it also happens in 2.7.4. The solution: Edit file /lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. There are two lines in the file that start with . Edit them as follows: Change first line to: Change second line to: Just to be after, I shut down Zope before I made the changes and restarted it after. Thanks for the help! RJ -----Original Message----- From: RJ Juneau [mailto:rj@maxxian.com] Sent: May 5, 2005 9:22 AM To: 'Charlie Clark' Cc: 'egenix-users@lists.egenix.com' Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 17:57:25 2005 From: charlie at egenix.com (Charlie Clark) Date: Tue Jan 24 08:03:32 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <20050505165725.3380.2@bepc.1115296715.fake> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Thu May 5 09:15:21 2005 From: charlie at egenix.com (Charlie Clark) Date: Tue Jan 24 08:03:32 2006 Subject: [Zope-DB] RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <000001c55185$41477730$6b00a8c0@fonacier.local> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________ Zope-DB mailing list Zope-DB@zope.org http://mail.zope.org/mailman/listinfo/zope-db From rj at maxxian.com Thu May 5 12:38:00 2005 From: rj at maxxian.com (RJ Juneau) Date: Tue Jan 24 08:03:32 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000001c55188$6b841eb0$6505a8c0@rjlaptop> I just double-checked. Zope-2.7.6-final. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 12:49:16 2005 From: rj at maxxian.com (RJ Juneau) Date: Tue Jan 24 08:03:32 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000501c55189$fe149ba0$6505a8c0@rjlaptop> Charlie, The fix has only been applied for 2.7.7, 2.8b2. The info is in the original bug report which is closed and can be found here: http://www.zope.org/Collectors/Zope/1745 RJ -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Fri May 6 11:50:09 2005 From: rj at maxxian.com (RJ Juneau) Date: Tue Jan 24 08:03:32 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC Message-ID: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Still on eval for the product. I cannot get a stable connection to Sybase via the iODBC drivers. - The Sybase ODBC connection - including a query - have been verified at the iODBC level. - The setup is already working well for ODBC connection to MySQL. Symptoms include: - If I click on "Open Connection", it still comes back with "Connection Closed" when I go to a ZSQL method - Using 'Connect on Demand' is not working either. - Clicking "Open Connection" gives me the following error: Connection string: DSN=lixbox_sybase; UID=sa; PWD=XXXXXXX Connection pool entry: 0 Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection rejected by data source', 7952) The odbc.ini definition for DSN "lixbox_sybase" is as follows: [lixbox_sybase] JetFix = No NoRowSetSizeLimit = No Description = Test connection to listbox Options = LIXBOX DSQUERY = SQLSERVER TDSHOST = lixbox TDSPORT = 5000 TDSVER = 5.0 SQLSERVER_CATALOG = N CURSOR_SENSITIVITY = LOW UserName = sa Password = XXXXXXXX ServerType = Sybase 10/11/12 Driver = /opt/openlink/lib/sql_mt_lt.so Database = pubs2 ReadOnly = no NoAutoCommit = No NoLoginBox = No FetchBufferSize = 60 Other relevant data: - Connecting via OpenLink's iODBC - Zope 2.7.6-final - Python 2.3.4 - Connection to Sybase has been successfully tested with iODBC, including issuing a query - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC connection RJ Juneau Chief Technology Officer Maxxian Integration Inc. 155 Westhampton Drive Thornhill, Ontario Canada L4J 7X2 E-mail: rj@maxxian.com Phone: +1 905 482 9429 Cell: +1 416 897 6682 Toll free: +1 866 758 9161 Fax: +1 647 722 2038 -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050506/aef33361/attachment-0045.htm From mal at egenix.com Fri May 6 18:27:37 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 24 08:03:32 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC In-Reply-To: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> References: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Message-ID: <427B8CE9.1010601@egenix.com> RJ Juneau wrote: > Still on eval for the product. > > I cannot get a stable connection to Sybase via the iODBC drivers. > > - The Sybase ODBC connection - including a query - have been verified at > the iODBC level. > - The setup is already working well for ODBC connection to MySQL. > > Symptoms include: > > - If I click on "Open Connection", it still comes back with "Connection > Closed" when I go to a ZSQL method > - Using 'Connect on Demand' is not working either. > - Clicking "Open Connection" gives me the following error: > > Connection string: DSN=lixbox_sybase; > UID=sa; > PWD=XXXXXXX Try writing the connection string on one line and without whitespace. ODBC drivers sometimes have problems with this. > Connection pool entry: 0 > Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection > rejected by data source', 7952) This is a generic error that relates to authentication or firewall problems. It is possible that turning on ODBC tracing the ODBC manager will give more clues as to the real cause of the problem. > The odbc.ini definition for DSN "lixbox_sybase" is as follows: > > [lixbox_sybase] > JetFix = No > NoRowSetSizeLimit = No > Description = Test connection to listbox > Options = LIXBOX > DSQUERY = SQLSERVER > TDSHOST = lixbox > TDSPORT = 5000 > TDSVER = 5.0 > SQLSERVER_CATALOG = N > CURSOR_SENSITIVITY = LOW > UserName = sa > Password = XXXXXXXX > ServerType = Sybase 10/11/12 > Driver = /opt/openlink/lib/sql_mt_lt.so > Database = pubs2 > ReadOnly = no > NoAutoCommit = No > NoLoginBox = No > FetchBufferSize = 60 > > > Other relevant data: > - Connecting via OpenLink's iODBC > - Zope 2.7.6-final > - Python 2.3.4 > - Connection to Sybase has been successfully tested with iODBC, > including issuing a query > - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC > connection > > > > RJ Juneau > Chief Technology Officer > Maxxian Integration Inc. > 155 Westhampton Drive > Thornhill, Ontario > Canada L4J 7X2 > E-mail: rj@maxxian.com > Phone: +1 905 482 9429 > Cell: +1 416 897 6682 > Toll free: +1 866 758 9161 > Fax: +1 647 722 2038 > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 06 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From calisp at gmail.com Sun May 15 23:49:03 2005 From: calisp at gmail.com (calisp@gmail.com) Date: Tue Jan 24 08:03:33 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK Message-ID: Hi, I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the following error... 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the last phase of a two-phase commit. This shouldn't happen. Traceback (most recent call last): File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one jar.tpc_finish(self) File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish try: self._finish() File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could not perform COMMIT or ROLLBACK', 1023) What could be causing this? Can I get the mxODBCZopeDA source from somewhere? It would make debugging this much easier. Thanks, Calisp. From mal at egenix.com Mon May 16 13:52:12 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 24 08:03:33 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK In-Reply-To: References: Message-ID: <42887B5C.4010109@egenix.com> calisp@gmail.com wrote: > Hi, > > I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with > unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the > following error... > > 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the > last phase of a two-phase commit. This shouldn't happen. > Traceback (most recent call last): > File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one > jar.tpc_finish(self) > File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish > try: self._finish() > File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish > File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler > ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could > not perform COMMIT or ROLLBACK', 1023) You should have a look at the database logs to see what prevented the commit from being completed. > What could be causing this? Hard to say: mxODBCZopeDA is trying to commit the transaction, but the driver or database failed to complete the request. The above error was generated by the ODBC driver. This could be network or DNS problems, or be related to a bug in FreeTDS (which is getting more stable with every new release, but should still be considered beta quality software at the moment). > Can I get the mxODBCZopeDA source from > somewhere? It would make debugging this much easier. Getting the source is not an option and won't help much either since the source of the problem is not mxODBCZopeDA. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 16 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Sun May 1 21:29:25 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 24 12:03:38 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <427259F3.4090806@egenix.com> References: <20050427130906.52878.qmail@web30008.mail.mud.yahoo.com> <427259F3.4090806@egenix.com> Message-ID: <42752005.7080904@egenix.com> M.-A. Lemburg wrote: > David Rushby wrote: > >> --- "M.-A. Lemburg" wrote: >> >>> Are you using the standard mxDateTime build or one >>> with WANT_SUBCLASSABLE_TYPES defined... >> >> >> >> Presumably "the standard", since I just built with 'py24d setup.py >> build', making no attempt to enable special directives. >> >> >>> ... (mxDateTime_Deallocate is only used by the latter)? >> >> >> >> That's true in 2.1.0-2005-04-15, but not in 2.1.0b5. >> >> >>> In any case, please try our latest snapshot: >>> >>> >> >> http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-04-15.zip >> >>> to see if that makes any difference. >> >> >> >> I can't build it out of the box: > > > Hmm, looks like distutils' sdist command doesn't like our new > repository layout which uses symlinks (after we've switched to > subversion). > > We'll have to debug distutils first, I guess :-( Ok, we've found the problem and fixed it. Here's the new release (which does build out of the box at least on our boxes ;-): http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 01 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From davidrushby at yahoo.com Mon May 2 15:49:53 2005 From: davidrushby at yahoo.com (David Rushby) Date: Tue Jan 24 12:03:38 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Ok, we've found the problem and fixed it. Here's the new > release (which does build out of the box at least on our > boxes ;-): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip It does build now, but: py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" still behaves as it did when I submitted my original message: Fatal Python error: UNREF invalid object Aborted This is the same debug build of Python 2.4.1 that I was previously using, running the same configuration (CentOS Linux 4.0/i386, everything compiled with GCC 3.4.3). Have you examined my original claim as to the cause of the bug? __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 10:21:55 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 24 12:03:38 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> References: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> Message-ID: <42772693.8050306@egenix.com> David Rushby wrote: > --- "M.-A. Lemburg" wrote: > >>Ok, we've found the problem and fixed it. Here's the new >>release (which does build out of the box at least on our >>boxes ;-): >> >> > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip > > It does build now, but: > py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" > still behaves as it did when I submitted my original message: > Fatal Python error: UNREF invalid object > Aborted > > This is the same debug build of Python 2.4.1 that I was previously > using, running the same configuration (CentOS Linux 4.0/i386, > everything compiled with GCC 3.4.3). > > Have you examined my original claim as to the cause of the bug? No. We haven't had time for looking into it. I'm not sure whether your analysis of the problem is correct: if you don't define WANT_SUBCLASSABLE_TYPES, the API mxDateTime_Deallocate() is neither defined nor used. Furthermore, PyObject_Del() is only called by mxDateTime_Free() if you have explicitely edited mxDateTime.c to disabled the free list #defines. In a standard build, PyObject_Del() is only called at module finalization time. Note that the reason we call mxDateTime_Free() in the constructor is that we don't want the destructor of the object to be called. Py_DECREF() would call the destructor (mxDateTime_Deallocate). It is possible that the debug code in Python complains about the refcount in the object not being 0 at the time the object is finalized (module finalization time), but I don't see any such checks in PyObject_Free() (which is what PyObject_Del() maps to). Again, all of this does not happen in regular non-debug Python builds. Please be aware that we don't support debug builds, so fixing the problem (if there is one - gcc has some serious optimization problems on some combinations of platform and version) will take a while. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 09:27:37 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Tue Jan 24 12:03:38 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 Message-ID: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Hi all- I am trying to build the mx-base package, v.2.0.6. This will be used with postgresql 7.3.9, psycopg 1.1.18, and Roundup 0.8.2. RHEL 3.0 Python 2.3 egenix-mx-base-2.0.6.tar.gz I performed a: /usr/local/bin/python2.3 setup.py install Everything looks proper with the exeception of this series of warning statements: ----------------- gcc -pthread -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fno-strict-aliasing -fPIC -Imx/BeeBase/mxBeeBase -I/usr/local/incl ude/python2.3 -I/usr/local/include -c mx/BeeBase/mxBeeBase/btr.c -o build/temp.linux-i686-2.3/mx/BeeBase/mxBeeBase/mxBeeBa se/mx/BeeBase/mxBeeBase/btr.o mx/BeeBase/mxBeeBase/btr.c: In function `dumpBuf': mx/BeeBase/mxBeeBase/btr.c:249: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:250: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:255: warning: unsigned int format, long unsigned int arg (arg 4) mx/BeeBase/mxBeeBase/btr.c:256: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c: In function `_validateTree': mx/BeeBase/mxBeeBase/btr.c:330: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:337: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:339: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:349: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:351: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 3) creating build/lib.linux-i686-2.3/mx/BeeBase creating build/lib.linux-i686-2.3/mx/BeeBase/mxBeeBase -------------- Would someone be kind enough to let me know whether these messages were expected, and if not, how I might resolve these? Thanks! DC __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 22:06:33 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 24 12:03:38 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> References: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Message-ID: <4277CBB9.8020302@egenix.com> Dianne Chen wrote: > Hi all- > > I am trying to build the mx-base package, v.2.0.6. > This will be used with postgresql 7.3.9, psycopg > 1.1.18, and Roundup 0.8.2. > > RHEL 3.0 > Python 2.3 > egenix-mx-base-2.0.6.tar.gz > > I performed a: > > /usr/local/bin/python2.3 setup.py install > > Everything looks proper with the exeception of this > series of warning statements: > > ----------------- > ... > -------------- > > Would someone be kind enough to let me know whether > these messages were expected, and if not, how I might > resolve these? These warning can safely be ignored. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 13:41:14 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Tue Jan 24 12:03:38 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: 6667 Message-ID: <20050503194114.72091.qmail@web31414.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Dianne Chen wrote: > > Hi all- > > > > I am trying to build the mx-base package, v.2.0.6. > > This will be used with postgresql 7.3.9, psycopg > > 1.1.18, and Roundup 0.8.2. > > > > RHEL 3.0 > > Python 2.3 > > egenix-mx-base-2.0.6.tar.gz > > > > I performed a: > > > > /usr/local/bin/python2.3 setup.py install > > > > Everything looks proper with the exeception of > this > > series of warning statements: > > > > ----------------- > > ... > > -------------- > > > > Would someone be kind enough to let me know > whether > > these messages were expected, and if not, how I > might > > resolve these? > > These warning can safely be ignored. > > -- > Marc-Andre Lemburg > eGenix.com > Marc- Thank you very much for the reply. It helps greatly. With kind regards, DC __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From davidrushby at yahoo.com Tue May 3 17:18:46 2005 From: davidrushby at yahoo.com (David Rushby) Date: Tue Jan 24 12:03:38 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050503231846.35012.qmail@web30009.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > I'm not sure whether your analysis of the problem is correct... Indeed, my original analysis wasn't correct; I think this one is. The fatal error I'm complaining about only arises if the arguments to DateTime.DateTime are invalid, so that the object is deallocated in the onError block of mxDateTime_FromDateAndTime. If the object is created successfully, and later deallocated by Python's garbage collector, the fatal error doesn't arise. Here's my analysis of the problem: --- If the debugging directive Py_TRACE_REFS is enabled, as it is in my case, the Python interpreter maintains a doubly linked list of all Python objects (named refchain) via the _ob_next and _ob_prev pointers added to PyObject via _PyObject_HEAD_EXTRA. Each object is inserted into refchain by the _Py_AddToAllObjects call in _Py_NewReference, and removed from refchain by the _Py_ForgetReference call in _Py_Dealloc. _Py_ForgetReference performs an integrity check on the object being deallocated (op) to make sure that its neighbors in refchain recognize it. Specifically, _Py_ForgetReference verifies that the _ob_next pointer of the previous object in refchain (op->_ob_prev->_ob_next) points to op, and that the _ob_prev pointer of the next object in refchain (op->_ob_next->_ob_prev) points to op. If either of those conditions is false, the interpreter raises the fatal error I'm seeing. After mxDateTime_New pulls an mxDateTimeObject out of the free list, it calls _Py_NewReference on that object to transform it from a "conceptually deallocated" object to a "conceptually allocated" one. _Py_NewReference inserts the object into refchain. Later, when the object is being "conceptually deallocated", it should be removed from refchain with _Py_ForgetReference. The version of _Py_Dealloc that's active when Py_TRACE_REFS is enabled does this (_Py_Dealloc is the element of Py_DECREF that performs the actual destruction). _Py_Dealloc first calls _Py_ForgetReference to remove the object from refchain, then calls the object's destructor (op->ob_type->tp_dealloc). If WANT_SUBCLASSABLE_TYPES is not defined (it is not in my case), the destructor for mxDateTime_Type is mxDateTime_Free. So, if a DateTime object is deallocated normally, as a result of its reference count falling to zero, _Py_Dealloc is called on the object, which first removes it from refchain, then passes it to mxDateTime_Free. If a DateTime object is destroyed prematurely, as a result of invalid arguments to its destructor, the onError handler calls mxDateTime_Free, so the object is "conceptually deallocated" (placed in the free list), *but* the object is not removed from refchain. So if a refchain-membership-integrity-check is performed on the object in question or one of its immediate neighbors in refchain, that integrity check fails, leading to the fatal error. --- The solution is to 'Py_DECREF(...)' the object in the onError handler of its constructor, instead of passing the object directly to mxDateTime_Free. That change solves two problems: 1) It causes _Py_Dealloc to execute, which in turn executes _Py_ForgetReference, so the object is removed from refchain, as it should be. 2) At present, objects that are created successfully and later deallocated by normal reference count mechanics have a reference count of 0 when they enter the free list, whereas objects whose constructors abort their creation due to invalid arguments have a reference count of 1 when they enter the free list. Although AFAIK this doesn't cause an actual execution problem (because the object's reference count is *explicitly set to 1* rather than *incremented by 1* when the object is later "conceptually allocated" by _Py_NewReference), it is likely to confuse future maintainers and thereby lead to the introduction of an actual execution problem. I assume that if you agree that this is a reasonable solution, you'll want to apply the change not only to mxDateTime_FromDateAndTime, but to all similar constructors in mxDateTime.c. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From rj at maxxian.com Thu May 5 01:57:40 2005 From: rj at maxxian.com (RJ Juneau) Date: Tue Jan 24 12:03:39 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c5512e$f72798c0$6505a8c0@rjlaptop> I'm on the 30 day evaluation for mxodbc_zope_da. I'm getting the following error when I submit some queries: Error Type: KeyError Error Value: 'query' I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 with UCS4. The error seems to be caused by multiple rows being returned. I did see an earlier posting with the same error message. The response suggested a template error, but this is clearly not the case here. The additional evidence I've gathered so far: - I'm running the test directly from the ZSQL method, so there's no template involved. - If I use the same query with an additional "where" clause to ensure that only one row is returned, it works - If I use a value in the 'where' clause with no rows returned, it works - The same ZSQL query is being used on a Windows machine running Zope and the free ZODBC module without a problem - The query has been verified directly in mysql-client-browser Other info: - The database is MySQL 4.1.10A-0 - iODBC is the DB driver RJ Juneau -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050505/68d278bf/attachment-0046.htm From mal at egenix.com Thu May 5 12:37:43 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 24 12:03:39 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c5512e$f72798c0$6505a8c0@rjlaptop> References: <000301c5512e$f72798c0$6505a8c0@rjlaptop> Message-ID: <4279E967.6010904@egenix.com> RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 > with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 09:37:42 2005 From: rj at maxxian.com (RJ Juneau) Date: Tue Jan 24 12:03:39 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000101c5516f$3b96de90$6505a8c0@rjlaptop> More interesting info on the problem: If I execute the query directly in the "test" window of the base eGenix mxODBC Database Connection window, it works fine and returns the 20 lines expected. That could point to a problem in the rendering, which seems to be where the traceback ends. Note that within the same Zope system I also have an ODBC connection to a Sybase database, and I have successfully tested multi-line ZSQL queries there. This is the traceback: Time 2005/05/05 07:55:15.294 GMT-4 Exception Type KeyError Exception Value 'query' Traceback (innermost last): Module ZPublisher.Publish, line 101, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 39, in call_object Module Shared.DC.ZRDB.DA, line 337, in manage_test Module DocumentTemplate.DT_String, line 474, in __call__ Module DocumentTemplate.DT_In, line 602, in renderwb Module DocumentTemplate.DT_Var, line 219, in render KeyError: 'query' I don't think the following is an issue, but I'll include it for completeness.I am also getting the following iODBC warnings and errors in the Zope console log, which are related to the ODBC parameters being passed by iODBC. Note that these errors also appear for all of the successful queries. [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (Setup). [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (UsageCount). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Timeout). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Reuse). As for the ZSQL snippet from the template... Since there's no template involved yet (I'm still testing directly from the ZSQL method), I assume you mean the SQL code? select h.host_name, s.system_name, s.system_handle, count(*) from terminal t, system_map s, host h where t.system_index = s.system_index and s.host_index = h.host_index group by s.system_name order by h.host_name Nothing complicated here. There are no parameters passed to the query. RJ -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: May 5, 2005 5:38 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: Re: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is > 2.3.4 with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ---------------------------------------------------------------------- > -- > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 16:00:32 2005 From: charlie at egenix.com (Charlie Clark) Date: Tue Jan 24 12:03:39 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000101c5516f$3b96de90$6505a8c0@rjlaptop> References: <000101c5516f$3b96de90$6505a8c0@rjlaptop> Message-ID: <20050505150032.644.1@bepc.1115296715.fake> On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base eGenix > mxODBC Database Connection window, it works fine and returns the 20 > lines expected. That could point to a problem in the rendering, which > seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection to > a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 10:22:17 2005 From: rj at maxxian.com (RJ Juneau) Date: Tue Jan 24 12:03:39 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505150032.644.1@bepc.1115296715.fake> Message-ID: <000201c55175$75bcad10$6505a8c0@rjlaptop> At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 11:47:14 2005 From: rj at maxxian.com (RJ Juneau) Date: Tue Jan 24 12:03:39 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c55181$549be0e0$6505a8c0@rjlaptop> Charlie, I found a fix. Here it is in case anyone else runs into this. You were correct - the problem is in another part of Zope. Based on your feedback, I did a bit more searching and found something here: http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. html The problem appears to be in Zope versions after 2.7.0. I'm running 2.7.6, and the post indicates that it also happens in 2.7.4. The solution: Edit file /lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. There are two lines in the file that start with . Edit them as follows: Change first line to: Change second line to: Just to be after, I shut down Zope before I made the changes and restarted it after. Thanks for the help! RJ -----Original Message----- From: RJ Juneau [mailto:rj@maxxian.com] Sent: May 5, 2005 9:22 AM To: 'Charlie Clark' Cc: 'egenix-users@lists.egenix.com' Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 17:57:25 2005 From: charlie at egenix.com (Charlie Clark) Date: Tue Jan 24 12:03:39 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <20050505165725.3380.2@bepc.1115296715.fake> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Thu May 5 09:15:21 2005 From: charlie at egenix.com (Charlie Clark) Date: Tue Jan 24 12:03:39 2006 Subject: [Zope-DB] RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <000001c55185$41477730$6b00a8c0@fonacier.local> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________ Zope-DB mailing list Zope-DB@zope.org http://mail.zope.org/mailman/listinfo/zope-db From rj at maxxian.com Thu May 5 12:38:00 2005 From: rj at maxxian.com (RJ Juneau) Date: Tue Jan 24 12:03:40 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000001c55188$6b841eb0$6505a8c0@rjlaptop> I just double-checked. Zope-2.7.6-final. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 12:49:16 2005 From: rj at maxxian.com (RJ Juneau) Date: Tue Jan 24 12:03:40 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000501c55189$fe149ba0$6505a8c0@rjlaptop> Charlie, The fix has only been applied for 2.7.7, 2.8b2. The info is in the original bug report which is closed and can be found here: http://www.zope.org/Collectors/Zope/1745 RJ -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Fri May 6 11:50:09 2005 From: rj at maxxian.com (RJ Juneau) Date: Tue Jan 24 12:03:40 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC Message-ID: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Still on eval for the product. I cannot get a stable connection to Sybase via the iODBC drivers. - The Sybase ODBC connection - including a query - have been verified at the iODBC level. - The setup is already working well for ODBC connection to MySQL. Symptoms include: - If I click on "Open Connection", it still comes back with "Connection Closed" when I go to a ZSQL method - Using 'Connect on Demand' is not working either. - Clicking "Open Connection" gives me the following error: Connection string: DSN=lixbox_sybase; UID=sa; PWD=XXXXXXX Connection pool entry: 0 Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection rejected by data source', 7952) The odbc.ini definition for DSN "lixbox_sybase" is as follows: [lixbox_sybase] JetFix = No NoRowSetSizeLimit = No Description = Test connection to listbox Options = LIXBOX DSQUERY = SQLSERVER TDSHOST = lixbox TDSPORT = 5000 TDSVER = 5.0 SQLSERVER_CATALOG = N CURSOR_SENSITIVITY = LOW UserName = sa Password = XXXXXXXX ServerType = Sybase 10/11/12 Driver = /opt/openlink/lib/sql_mt_lt.so Database = pubs2 ReadOnly = no NoAutoCommit = No NoLoginBox = No FetchBufferSize = 60 Other relevant data: - Connecting via OpenLink's iODBC - Zope 2.7.6-final - Python 2.3.4 - Connection to Sybase has been successfully tested with iODBC, including issuing a query - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC connection RJ Juneau Chief Technology Officer Maxxian Integration Inc. 155 Westhampton Drive Thornhill, Ontario Canada L4J 7X2 E-mail: rj@maxxian.com Phone: +1 905 482 9429 Cell: +1 416 897 6682 Toll free: +1 866 758 9161 Fax: +1 647 722 2038 -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050506/aef33361/attachment-0046.htm From mal at egenix.com Fri May 6 18:27:37 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 24 12:03:40 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC In-Reply-To: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> References: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Message-ID: <427B8CE9.1010601@egenix.com> RJ Juneau wrote: > Still on eval for the product. > > I cannot get a stable connection to Sybase via the iODBC drivers. > > - The Sybase ODBC connection - including a query - have been verified at > the iODBC level. > - The setup is already working well for ODBC connection to MySQL. > > Symptoms include: > > - If I click on "Open Connection", it still comes back with "Connection > Closed" when I go to a ZSQL method > - Using 'Connect on Demand' is not working either. > - Clicking "Open Connection" gives me the following error: > > Connection string: DSN=lixbox_sybase; > UID=sa; > PWD=XXXXXXX Try writing the connection string on one line and without whitespace. ODBC drivers sometimes have problems with this. > Connection pool entry: 0 > Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection > rejected by data source', 7952) This is a generic error that relates to authentication or firewall problems. It is possible that turning on ODBC tracing the ODBC manager will give more clues as to the real cause of the problem. > The odbc.ini definition for DSN "lixbox_sybase" is as follows: > > [lixbox_sybase] > JetFix = No > NoRowSetSizeLimit = No > Description = Test connection to listbox > Options = LIXBOX > DSQUERY = SQLSERVER > TDSHOST = lixbox > TDSPORT = 5000 > TDSVER = 5.0 > SQLSERVER_CATALOG = N > CURSOR_SENSITIVITY = LOW > UserName = sa > Password = XXXXXXXX > ServerType = Sybase 10/11/12 > Driver = /opt/openlink/lib/sql_mt_lt.so > Database = pubs2 > ReadOnly = no > NoAutoCommit = No > NoLoginBox = No > FetchBufferSize = 60 > > > Other relevant data: > - Connecting via OpenLink's iODBC > - Zope 2.7.6-final > - Python 2.3.4 > - Connection to Sybase has been successfully tested with iODBC, > including issuing a query > - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC > connection > > > > RJ Juneau > Chief Technology Officer > Maxxian Integration Inc. > 155 Westhampton Drive > Thornhill, Ontario > Canada L4J 7X2 > E-mail: rj@maxxian.com > Phone: +1 905 482 9429 > Cell: +1 416 897 6682 > Toll free: +1 866 758 9161 > Fax: +1 647 722 2038 > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 06 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From calisp at gmail.com Sun May 15 23:49:03 2005 From: calisp at gmail.com (calisp@gmail.com) Date: Tue Jan 24 12:03:40 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK Message-ID: Hi, I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the following error... 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the last phase of a two-phase commit. This shouldn't happen. Traceback (most recent call last): File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one jar.tpc_finish(self) File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish try: self._finish() File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could not perform COMMIT or ROLLBACK', 1023) What could be causing this? Can I get the mxODBCZopeDA source from somewhere? It would make debugging this much easier. Thanks, Calisp. From mal at egenix.com Mon May 16 13:52:12 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 24 12:03:40 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK In-Reply-To: References: Message-ID: <42887B5C.4010109@egenix.com> calisp@gmail.com wrote: > Hi, > > I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with > unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the > following error... > > 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the > last phase of a two-phase commit. This shouldn't happen. > Traceback (most recent call last): > File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one > jar.tpc_finish(self) > File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish > try: self._finish() > File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish > File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler > ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could > not perform COMMIT or ROLLBACK', 1023) You should have a look at the database logs to see what prevented the commit from being completed. > What could be causing this? Hard to say: mxODBCZopeDA is trying to commit the transaction, but the driver or database failed to complete the request. The above error was generated by the ODBC driver. This could be network or DNS problems, or be related to a bug in FreeTDS (which is getting more stable with every new release, but should still be considered beta quality software at the moment). > Can I get the mxODBCZopeDA source from > somewhere? It would make debugging this much easier. Getting the source is not an option and won't help much either since the source of the problem is not mxODBCZopeDA. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 16 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Sun May 1 21:29:25 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 24 16:01:40 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <427259F3.4090806@egenix.com> References: <20050427130906.52878.qmail@web30008.mail.mud.yahoo.com> <427259F3.4090806@egenix.com> Message-ID: <42752005.7080904@egenix.com> M.-A. Lemburg wrote: > David Rushby wrote: > >> --- "M.-A. Lemburg" wrote: >> >>> Are you using the standard mxDateTime build or one >>> with WANT_SUBCLASSABLE_TYPES defined... >> >> >> >> Presumably "the standard", since I just built with 'py24d setup.py >> build', making no attempt to enable special directives. >> >> >>> ... (mxDateTime_Deallocate is only used by the latter)? >> >> >> >> That's true in 2.1.0-2005-04-15, but not in 2.1.0b5. >> >> >>> In any case, please try our latest snapshot: >>> >>> >> >> http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-04-15.zip >> >>> to see if that makes any difference. >> >> >> >> I can't build it out of the box: > > > Hmm, looks like distutils' sdist command doesn't like our new > repository layout which uses symlinks (after we've switched to > subversion). > > We'll have to debug distutils first, I guess :-( Ok, we've found the problem and fixed it. Here's the new release (which does build out of the box at least on our boxes ;-): http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 01 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From davidrushby at yahoo.com Mon May 2 15:49:53 2005 From: davidrushby at yahoo.com (David Rushby) Date: Tue Jan 24 16:01:40 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Ok, we've found the problem and fixed it. Here's the new > release (which does build out of the box at least on our > boxes ;-): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip It does build now, but: py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" still behaves as it did when I submitted my original message: Fatal Python error: UNREF invalid object Aborted This is the same debug build of Python 2.4.1 that I was previously using, running the same configuration (CentOS Linux 4.0/i386, everything compiled with GCC 3.4.3). Have you examined my original claim as to the cause of the bug? __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 10:21:55 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 24 16:01:41 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> References: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> Message-ID: <42772693.8050306@egenix.com> David Rushby wrote: > --- "M.-A. Lemburg" wrote: > >>Ok, we've found the problem and fixed it. Here's the new >>release (which does build out of the box at least on our >>boxes ;-): >> >> > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip > > It does build now, but: > py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" > still behaves as it did when I submitted my original message: > Fatal Python error: UNREF invalid object > Aborted > > This is the same debug build of Python 2.4.1 that I was previously > using, running the same configuration (CentOS Linux 4.0/i386, > everything compiled with GCC 3.4.3). > > Have you examined my original claim as to the cause of the bug? No. We haven't had time for looking into it. I'm not sure whether your analysis of the problem is correct: if you don't define WANT_SUBCLASSABLE_TYPES, the API mxDateTime_Deallocate() is neither defined nor used. Furthermore, PyObject_Del() is only called by mxDateTime_Free() if you have explicitely edited mxDateTime.c to disabled the free list #defines. In a standard build, PyObject_Del() is only called at module finalization time. Note that the reason we call mxDateTime_Free() in the constructor is that we don't want the destructor of the object to be called. Py_DECREF() would call the destructor (mxDateTime_Deallocate). It is possible that the debug code in Python complains about the refcount in the object not being 0 at the time the object is finalized (module finalization time), but I don't see any such checks in PyObject_Free() (which is what PyObject_Del() maps to). Again, all of this does not happen in regular non-debug Python builds. Please be aware that we don't support debug builds, so fixing the problem (if there is one - gcc has some serious optimization problems on some combinations of platform and version) will take a while. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 09:27:37 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Tue Jan 24 16:01:41 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 Message-ID: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Hi all- I am trying to build the mx-base package, v.2.0.6. This will be used with postgresql 7.3.9, psycopg 1.1.18, and Roundup 0.8.2. RHEL 3.0 Python 2.3 egenix-mx-base-2.0.6.tar.gz I performed a: /usr/local/bin/python2.3 setup.py install Everything looks proper with the exeception of this series of warning statements: ----------------- gcc -pthread -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fno-strict-aliasing -fPIC -Imx/BeeBase/mxBeeBase -I/usr/local/incl ude/python2.3 -I/usr/local/include -c mx/BeeBase/mxBeeBase/btr.c -o build/temp.linux-i686-2.3/mx/BeeBase/mxBeeBase/mxBeeBa se/mx/BeeBase/mxBeeBase/btr.o mx/BeeBase/mxBeeBase/btr.c: In function `dumpBuf': mx/BeeBase/mxBeeBase/btr.c:249: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:250: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:255: warning: unsigned int format, long unsigned int arg (arg 4) mx/BeeBase/mxBeeBase/btr.c:256: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c: In function `_validateTree': mx/BeeBase/mxBeeBase/btr.c:330: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:337: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:339: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:349: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:351: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 3) creating build/lib.linux-i686-2.3/mx/BeeBase creating build/lib.linux-i686-2.3/mx/BeeBase/mxBeeBase -------------- Would someone be kind enough to let me know whether these messages were expected, and if not, how I might resolve these? Thanks! DC __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 22:06:33 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 24 16:01:41 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> References: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Message-ID: <4277CBB9.8020302@egenix.com> Dianne Chen wrote: > Hi all- > > I am trying to build the mx-base package, v.2.0.6. > This will be used with postgresql 7.3.9, psycopg > 1.1.18, and Roundup 0.8.2. > > RHEL 3.0 > Python 2.3 > egenix-mx-base-2.0.6.tar.gz > > I performed a: > > /usr/local/bin/python2.3 setup.py install > > Everything looks proper with the exeception of this > series of warning statements: > > ----------------- > ... > -------------- > > Would someone be kind enough to let me know whether > these messages were expected, and if not, how I might > resolve these? These warning can safely be ignored. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 13:41:14 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Tue Jan 24 16:01:41 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: 6667 Message-ID: <20050503194114.72091.qmail@web31414.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Dianne Chen wrote: > > Hi all- > > > > I am trying to build the mx-base package, v.2.0.6. > > This will be used with postgresql 7.3.9, psycopg > > 1.1.18, and Roundup 0.8.2. > > > > RHEL 3.0 > > Python 2.3 > > egenix-mx-base-2.0.6.tar.gz > > > > I performed a: > > > > /usr/local/bin/python2.3 setup.py install > > > > Everything looks proper with the exeception of > this > > series of warning statements: > > > > ----------------- > > ... > > -------------- > > > > Would someone be kind enough to let me know > whether > > these messages were expected, and if not, how I > might > > resolve these? > > These warning can safely be ignored. > > -- > Marc-Andre Lemburg > eGenix.com > Marc- Thank you very much for the reply. It helps greatly. With kind regards, DC __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From davidrushby at yahoo.com Tue May 3 17:18:46 2005 From: davidrushby at yahoo.com (David Rushby) Date: Tue Jan 24 16:01:41 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050503231846.35012.qmail@web30009.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > I'm not sure whether your analysis of the problem is correct... Indeed, my original analysis wasn't correct; I think this one is. The fatal error I'm complaining about only arises if the arguments to DateTime.DateTime are invalid, so that the object is deallocated in the onError block of mxDateTime_FromDateAndTime. If the object is created successfully, and later deallocated by Python's garbage collector, the fatal error doesn't arise. Here's my analysis of the problem: --- If the debugging directive Py_TRACE_REFS is enabled, as it is in my case, the Python interpreter maintains a doubly linked list of all Python objects (named refchain) via the _ob_next and _ob_prev pointers added to PyObject via _PyObject_HEAD_EXTRA. Each object is inserted into refchain by the _Py_AddToAllObjects call in _Py_NewReference, and removed from refchain by the _Py_ForgetReference call in _Py_Dealloc. _Py_ForgetReference performs an integrity check on the object being deallocated (op) to make sure that its neighbors in refchain recognize it. Specifically, _Py_ForgetReference verifies that the _ob_next pointer of the previous object in refchain (op->_ob_prev->_ob_next) points to op, and that the _ob_prev pointer of the next object in refchain (op->_ob_next->_ob_prev) points to op. If either of those conditions is false, the interpreter raises the fatal error I'm seeing. After mxDateTime_New pulls an mxDateTimeObject out of the free list, it calls _Py_NewReference on that object to transform it from a "conceptually deallocated" object to a "conceptually allocated" one. _Py_NewReference inserts the object into refchain. Later, when the object is being "conceptually deallocated", it should be removed from refchain with _Py_ForgetReference. The version of _Py_Dealloc that's active when Py_TRACE_REFS is enabled does this (_Py_Dealloc is the element of Py_DECREF that performs the actual destruction). _Py_Dealloc first calls _Py_ForgetReference to remove the object from refchain, then calls the object's destructor (op->ob_type->tp_dealloc). If WANT_SUBCLASSABLE_TYPES is not defined (it is not in my case), the destructor for mxDateTime_Type is mxDateTime_Free. So, if a DateTime object is deallocated normally, as a result of its reference count falling to zero, _Py_Dealloc is called on the object, which first removes it from refchain, then passes it to mxDateTime_Free. If a DateTime object is destroyed prematurely, as a result of invalid arguments to its destructor, the onError handler calls mxDateTime_Free, so the object is "conceptually deallocated" (placed in the free list), *but* the object is not removed from refchain. So if a refchain-membership-integrity-check is performed on the object in question or one of its immediate neighbors in refchain, that integrity check fails, leading to the fatal error. --- The solution is to 'Py_DECREF(...)' the object in the onError handler of its constructor, instead of passing the object directly to mxDateTime_Free. That change solves two problems: 1) It causes _Py_Dealloc to execute, which in turn executes _Py_ForgetReference, so the object is removed from refchain, as it should be. 2) At present, objects that are created successfully and later deallocated by normal reference count mechanics have a reference count of 0 when they enter the free list, whereas objects whose constructors abort their creation due to invalid arguments have a reference count of 1 when they enter the free list. Although AFAIK this doesn't cause an actual execution problem (because the object's reference count is *explicitly set to 1* rather than *incremented by 1* when the object is later "conceptually allocated" by _Py_NewReference), it is likely to confuse future maintainers and thereby lead to the introduction of an actual execution problem. I assume that if you agree that this is a reasonable solution, you'll want to apply the change not only to mxDateTime_FromDateAndTime, but to all similar constructors in mxDateTime.c. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From rj at maxxian.com Thu May 5 01:57:40 2005 From: rj at maxxian.com (RJ Juneau) Date: Tue Jan 24 16:01:41 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c5512e$f72798c0$6505a8c0@rjlaptop> I'm on the 30 day evaluation for mxodbc_zope_da. I'm getting the following error when I submit some queries: Error Type: KeyError Error Value: 'query' I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 with UCS4. The error seems to be caused by multiple rows being returned. I did see an earlier posting with the same error message. The response suggested a template error, but this is clearly not the case here. The additional evidence I've gathered so far: - I'm running the test directly from the ZSQL method, so there's no template involved. - If I use the same query with an additional "where" clause to ensure that only one row is returned, it works - If I use a value in the 'where' clause with no rows returned, it works - The same ZSQL query is being used on a Windows machine running Zope and the free ZODBC module without a problem - The query has been verified directly in mysql-client-browser Other info: - The database is MySQL 4.1.10A-0 - iODBC is the DB driver RJ Juneau -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050505/68d278bf/attachment-0047.htm From mal at egenix.com Thu May 5 12:37:43 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 24 16:01:41 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c5512e$f72798c0$6505a8c0@rjlaptop> References: <000301c5512e$f72798c0$6505a8c0@rjlaptop> Message-ID: <4279E967.6010904@egenix.com> RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 > with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 09:37:42 2005 From: rj at maxxian.com (RJ Juneau) Date: Tue Jan 24 16:01:41 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000101c5516f$3b96de90$6505a8c0@rjlaptop> More interesting info on the problem: If I execute the query directly in the "test" window of the base eGenix mxODBC Database Connection window, it works fine and returns the 20 lines expected. That could point to a problem in the rendering, which seems to be where the traceback ends. Note that within the same Zope system I also have an ODBC connection to a Sybase database, and I have successfully tested multi-line ZSQL queries there. This is the traceback: Time 2005/05/05 07:55:15.294 GMT-4 Exception Type KeyError Exception Value 'query' Traceback (innermost last): Module ZPublisher.Publish, line 101, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 39, in call_object Module Shared.DC.ZRDB.DA, line 337, in manage_test Module DocumentTemplate.DT_String, line 474, in __call__ Module DocumentTemplate.DT_In, line 602, in renderwb Module DocumentTemplate.DT_Var, line 219, in render KeyError: 'query' I don't think the following is an issue, but I'll include it for completeness.I am also getting the following iODBC warnings and errors in the Zope console log, which are related to the ODBC parameters being passed by iODBC. Note that these errors also appear for all of the successful queries. [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (Setup). [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (UsageCount). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Timeout). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Reuse). As for the ZSQL snippet from the template... Since there's no template involved yet (I'm still testing directly from the ZSQL method), I assume you mean the SQL code? select h.host_name, s.system_name, s.system_handle, count(*) from terminal t, system_map s, host h where t.system_index = s.system_index and s.host_index = h.host_index group by s.system_name order by h.host_name Nothing complicated here. There are no parameters passed to the query. RJ -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: May 5, 2005 5:38 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: Re: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is > 2.3.4 with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ---------------------------------------------------------------------- > -- > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 16:00:32 2005 From: charlie at egenix.com (Charlie Clark) Date: Tue Jan 24 16:01:41 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000101c5516f$3b96de90$6505a8c0@rjlaptop> References: <000101c5516f$3b96de90$6505a8c0@rjlaptop> Message-ID: <20050505150032.644.1@bepc.1115296715.fake> On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base eGenix > mxODBC Database Connection window, it works fine and returns the 20 > lines expected. That could point to a problem in the rendering, which > seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection to > a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 10:22:17 2005 From: rj at maxxian.com (RJ Juneau) Date: Tue Jan 24 16:01:41 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505150032.644.1@bepc.1115296715.fake> Message-ID: <000201c55175$75bcad10$6505a8c0@rjlaptop> At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 11:47:14 2005 From: rj at maxxian.com (RJ Juneau) Date: Tue Jan 24 16:01:41 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c55181$549be0e0$6505a8c0@rjlaptop> Charlie, I found a fix. Here it is in case anyone else runs into this. You were correct - the problem is in another part of Zope. Based on your feedback, I did a bit more searching and found something here: http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. html The problem appears to be in Zope versions after 2.7.0. I'm running 2.7.6, and the post indicates that it also happens in 2.7.4. The solution: Edit file /lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. There are two lines in the file that start with . Edit them as follows: Change first line to: Change second line to: Just to be after, I shut down Zope before I made the changes and restarted it after. Thanks for the help! RJ -----Original Message----- From: RJ Juneau [mailto:rj@maxxian.com] Sent: May 5, 2005 9:22 AM To: 'Charlie Clark' Cc: 'egenix-users@lists.egenix.com' Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 17:57:25 2005 From: charlie at egenix.com (Charlie Clark) Date: Tue Jan 24 16:01:41 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <20050505165725.3380.2@bepc.1115296715.fake> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Thu May 5 09:15:21 2005 From: charlie at egenix.com (Charlie Clark) Date: Tue Jan 24 16:01:41 2006 Subject: [Zope-DB] RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <000001c55185$41477730$6b00a8c0@fonacier.local> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________ Zope-DB mailing list Zope-DB@zope.org http://mail.zope.org/mailman/listinfo/zope-db From rj at maxxian.com Thu May 5 12:38:00 2005 From: rj at maxxian.com (RJ Juneau) Date: Tue Jan 24 16:01:41 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000001c55188$6b841eb0$6505a8c0@rjlaptop> I just double-checked. Zope-2.7.6-final. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 12:49:16 2005 From: rj at maxxian.com (RJ Juneau) Date: Tue Jan 24 16:01:41 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000501c55189$fe149ba0$6505a8c0@rjlaptop> Charlie, The fix has only been applied for 2.7.7, 2.8b2. The info is in the original bug report which is closed and can be found here: http://www.zope.org/Collectors/Zope/1745 RJ -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Fri May 6 11:50:09 2005 From: rj at maxxian.com (RJ Juneau) Date: Tue Jan 24 16:01:41 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC Message-ID: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Still on eval for the product. I cannot get a stable connection to Sybase via the iODBC drivers. - The Sybase ODBC connection - including a query - have been verified at the iODBC level. - The setup is already working well for ODBC connection to MySQL. Symptoms include: - If I click on "Open Connection", it still comes back with "Connection Closed" when I go to a ZSQL method - Using 'Connect on Demand' is not working either. - Clicking "Open Connection" gives me the following error: Connection string: DSN=lixbox_sybase; UID=sa; PWD=XXXXXXX Connection pool entry: 0 Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection rejected by data source', 7952) The odbc.ini definition for DSN "lixbox_sybase" is as follows: [lixbox_sybase] JetFix = No NoRowSetSizeLimit = No Description = Test connection to listbox Options = LIXBOX DSQUERY = SQLSERVER TDSHOST = lixbox TDSPORT = 5000 TDSVER = 5.0 SQLSERVER_CATALOG = N CURSOR_SENSITIVITY = LOW UserName = sa Password = XXXXXXXX ServerType = Sybase 10/11/12 Driver = /opt/openlink/lib/sql_mt_lt.so Database = pubs2 ReadOnly = no NoAutoCommit = No NoLoginBox = No FetchBufferSize = 60 Other relevant data: - Connecting via OpenLink's iODBC - Zope 2.7.6-final - Python 2.3.4 - Connection to Sybase has been successfully tested with iODBC, including issuing a query - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC connection RJ Juneau Chief Technology Officer Maxxian Integration Inc. 155 Westhampton Drive Thornhill, Ontario Canada L4J 7X2 E-mail: rj@maxxian.com Phone: +1 905 482 9429 Cell: +1 416 897 6682 Toll free: +1 866 758 9161 Fax: +1 647 722 2038 -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050506/aef33361/attachment-0047.htm From mal at egenix.com Fri May 6 18:27:37 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 24 16:01:41 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC In-Reply-To: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> References: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Message-ID: <427B8CE9.1010601@egenix.com> RJ Juneau wrote: > Still on eval for the product. > > I cannot get a stable connection to Sybase via the iODBC drivers. > > - The Sybase ODBC connection - including a query - have been verified at > the iODBC level. > - The setup is already working well for ODBC connection to MySQL. > > Symptoms include: > > - If I click on "Open Connection", it still comes back with "Connection > Closed" when I go to a ZSQL method > - Using 'Connect on Demand' is not working either. > - Clicking "Open Connection" gives me the following error: > > Connection string: DSN=lixbox_sybase; > UID=sa; > PWD=XXXXXXX Try writing the connection string on one line and without whitespace. ODBC drivers sometimes have problems with this. > Connection pool entry: 0 > Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection > rejected by data source', 7952) This is a generic error that relates to authentication or firewall problems. It is possible that turning on ODBC tracing the ODBC manager will give more clues as to the real cause of the problem. > The odbc.ini definition for DSN "lixbox_sybase" is as follows: > > [lixbox_sybase] > JetFix = No > NoRowSetSizeLimit = No > Description = Test connection to listbox > Options = LIXBOX > DSQUERY = SQLSERVER > TDSHOST = lixbox > TDSPORT = 5000 > TDSVER = 5.0 > SQLSERVER_CATALOG = N > CURSOR_SENSITIVITY = LOW > UserName = sa > Password = XXXXXXXX > ServerType = Sybase 10/11/12 > Driver = /opt/openlink/lib/sql_mt_lt.so > Database = pubs2 > ReadOnly = no > NoAutoCommit = No > NoLoginBox = No > FetchBufferSize = 60 > > > Other relevant data: > - Connecting via OpenLink's iODBC > - Zope 2.7.6-final > - Python 2.3.4 > - Connection to Sybase has been successfully tested with iODBC, > including issuing a query > - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC > connection > > > > RJ Juneau > Chief Technology Officer > Maxxian Integration Inc. > 155 Westhampton Drive > Thornhill, Ontario > Canada L4J 7X2 > E-mail: rj@maxxian.com > Phone: +1 905 482 9429 > Cell: +1 416 897 6682 > Toll free: +1 866 758 9161 > Fax: +1 647 722 2038 > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 06 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From calisp at gmail.com Sun May 15 23:49:03 2005 From: calisp at gmail.com (calisp@gmail.com) Date: Tue Jan 24 16:01:41 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK Message-ID: Hi, I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the following error... 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the last phase of a two-phase commit. This shouldn't happen. Traceback (most recent call last): File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one jar.tpc_finish(self) File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish try: self._finish() File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could not perform COMMIT or ROLLBACK', 1023) What could be causing this? Can I get the mxODBCZopeDA source from somewhere? It would make debugging this much easier. Thanks, Calisp. From mal at egenix.com Mon May 16 13:52:12 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 24 16:01:41 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK In-Reply-To: References: Message-ID: <42887B5C.4010109@egenix.com> calisp@gmail.com wrote: > Hi, > > I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with > unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the > following error... > > 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the > last phase of a two-phase commit. This shouldn't happen. > Traceback (most recent call last): > File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one > jar.tpc_finish(self) > File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish > try: self._finish() > File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish > File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler > ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could > not perform COMMIT or ROLLBACK', 1023) You should have a look at the database logs to see what prevented the commit from being completed. > What could be causing this? Hard to say: mxODBCZopeDA is trying to commit the transaction, but the driver or database failed to complete the request. The above error was generated by the ODBC driver. This could be network or DNS problems, or be related to a bug in FreeTDS (which is getting more stable with every new release, but should still be considered beta quality software at the moment). > Can I get the mxODBCZopeDA source from > somewhere? It would make debugging this much easier. Getting the source is not an option and won't help much either since the source of the problem is not mxODBCZopeDA. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 16 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Sun May 1 21:29:25 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 24 20:02:08 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <427259F3.4090806@egenix.com> References: <20050427130906.52878.qmail@web30008.mail.mud.yahoo.com> <427259F3.4090806@egenix.com> Message-ID: <42752005.7080904@egenix.com> M.-A. Lemburg wrote: > David Rushby wrote: > >> --- "M.-A. Lemburg" wrote: >> >>> Are you using the standard mxDateTime build or one >>> with WANT_SUBCLASSABLE_TYPES defined... >> >> >> >> Presumably "the standard", since I just built with 'py24d setup.py >> build', making no attempt to enable special directives. >> >> >>> ... (mxDateTime_Deallocate is only used by the latter)? >> >> >> >> That's true in 2.1.0-2005-04-15, but not in 2.1.0b5. >> >> >>> In any case, please try our latest snapshot: >>> >>> >> >> http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-04-15.zip >> >>> to see if that makes any difference. >> >> >> >> I can't build it out of the box: > > > Hmm, looks like distutils' sdist command doesn't like our new > repository layout which uses symlinks (after we've switched to > subversion). > > We'll have to debug distutils first, I guess :-( Ok, we've found the problem and fixed it. Here's the new release (which does build out of the box at least on our boxes ;-): http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 01 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From davidrushby at yahoo.com Mon May 2 15:49:53 2005 From: davidrushby at yahoo.com (David Rushby) Date: Tue Jan 24 20:02:08 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Ok, we've found the problem and fixed it. Here's the new > release (which does build out of the box at least on our > boxes ;-): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip It does build now, but: py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" still behaves as it did when I submitted my original message: Fatal Python error: UNREF invalid object Aborted This is the same debug build of Python 2.4.1 that I was previously using, running the same configuration (CentOS Linux 4.0/i386, everything compiled with GCC 3.4.3). Have you examined my original claim as to the cause of the bug? __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 10:21:55 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 24 20:02:08 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> References: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> Message-ID: <42772693.8050306@egenix.com> David Rushby wrote: > --- "M.-A. Lemburg" wrote: > >>Ok, we've found the problem and fixed it. Here's the new >>release (which does build out of the box at least on our >>boxes ;-): >> >> > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip > > It does build now, but: > py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" > still behaves as it did when I submitted my original message: > Fatal Python error: UNREF invalid object > Aborted > > This is the same debug build of Python 2.4.1 that I was previously > using, running the same configuration (CentOS Linux 4.0/i386, > everything compiled with GCC 3.4.3). > > Have you examined my original claim as to the cause of the bug? No. We haven't had time for looking into it. I'm not sure whether your analysis of the problem is correct: if you don't define WANT_SUBCLASSABLE_TYPES, the API mxDateTime_Deallocate() is neither defined nor used. Furthermore, PyObject_Del() is only called by mxDateTime_Free() if you have explicitely edited mxDateTime.c to disabled the free list #defines. In a standard build, PyObject_Del() is only called at module finalization time. Note that the reason we call mxDateTime_Free() in the constructor is that we don't want the destructor of the object to be called. Py_DECREF() would call the destructor (mxDateTime_Deallocate). It is possible that the debug code in Python complains about the refcount in the object not being 0 at the time the object is finalized (module finalization time), but I don't see any such checks in PyObject_Free() (which is what PyObject_Del() maps to). Again, all of this does not happen in regular non-debug Python builds. Please be aware that we don't support debug builds, so fixing the problem (if there is one - gcc has some serious optimization problems on some combinations of platform and version) will take a while. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 09:27:37 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Tue Jan 24 20:02:08 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 Message-ID: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Hi all- I am trying to build the mx-base package, v.2.0.6. This will be used with postgresql 7.3.9, psycopg 1.1.18, and Roundup 0.8.2. RHEL 3.0 Python 2.3 egenix-mx-base-2.0.6.tar.gz I performed a: /usr/local/bin/python2.3 setup.py install Everything looks proper with the exeception of this series of warning statements: ----------------- gcc -pthread -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fno-strict-aliasing -fPIC -Imx/BeeBase/mxBeeBase -I/usr/local/incl ude/python2.3 -I/usr/local/include -c mx/BeeBase/mxBeeBase/btr.c -o build/temp.linux-i686-2.3/mx/BeeBase/mxBeeBase/mxBeeBa se/mx/BeeBase/mxBeeBase/btr.o mx/BeeBase/mxBeeBase/btr.c: In function `dumpBuf': mx/BeeBase/mxBeeBase/btr.c:249: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:250: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:255: warning: unsigned int format, long unsigned int arg (arg 4) mx/BeeBase/mxBeeBase/btr.c:256: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c: In function `_validateTree': mx/BeeBase/mxBeeBase/btr.c:330: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:337: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:339: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:349: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:351: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 3) creating build/lib.linux-i686-2.3/mx/BeeBase creating build/lib.linux-i686-2.3/mx/BeeBase/mxBeeBase -------------- Would someone be kind enough to let me know whether these messages were expected, and if not, how I might resolve these? Thanks! DC __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 22:06:33 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 24 20:02:08 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> References: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Message-ID: <4277CBB9.8020302@egenix.com> Dianne Chen wrote: > Hi all- > > I am trying to build the mx-base package, v.2.0.6. > This will be used with postgresql 7.3.9, psycopg > 1.1.18, and Roundup 0.8.2. > > RHEL 3.0 > Python 2.3 > egenix-mx-base-2.0.6.tar.gz > > I performed a: > > /usr/local/bin/python2.3 setup.py install > > Everything looks proper with the exeception of this > series of warning statements: > > ----------------- > ... > -------------- > > Would someone be kind enough to let me know whether > these messages were expected, and if not, how I might > resolve these? These warning can safely be ignored. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 13:41:14 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Tue Jan 24 20:02:08 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: 6667 Message-ID: <20050503194114.72091.qmail@web31414.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Dianne Chen wrote: > > Hi all- > > > > I am trying to build the mx-base package, v.2.0.6. > > This will be used with postgresql 7.3.9, psycopg > > 1.1.18, and Roundup 0.8.2. > > > > RHEL 3.0 > > Python 2.3 > > egenix-mx-base-2.0.6.tar.gz > > > > I performed a: > > > > /usr/local/bin/python2.3 setup.py install > > > > Everything looks proper with the exeception of > this > > series of warning statements: > > > > ----------------- > > ... > > -------------- > > > > Would someone be kind enough to let me know > whether > > these messages were expected, and if not, how I > might > > resolve these? > > These warning can safely be ignored. > > -- > Marc-Andre Lemburg > eGenix.com > Marc- Thank you very much for the reply. It helps greatly. With kind regards, DC __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From davidrushby at yahoo.com Tue May 3 17:18:46 2005 From: davidrushby at yahoo.com (David Rushby) Date: Tue Jan 24 20:02:08 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050503231846.35012.qmail@web30009.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > I'm not sure whether your analysis of the problem is correct... Indeed, my original analysis wasn't correct; I think this one is. The fatal error I'm complaining about only arises if the arguments to DateTime.DateTime are invalid, so that the object is deallocated in the onError block of mxDateTime_FromDateAndTime. If the object is created successfully, and later deallocated by Python's garbage collector, the fatal error doesn't arise. Here's my analysis of the problem: --- If the debugging directive Py_TRACE_REFS is enabled, as it is in my case, the Python interpreter maintains a doubly linked list of all Python objects (named refchain) via the _ob_next and _ob_prev pointers added to PyObject via _PyObject_HEAD_EXTRA. Each object is inserted into refchain by the _Py_AddToAllObjects call in _Py_NewReference, and removed from refchain by the _Py_ForgetReference call in _Py_Dealloc. _Py_ForgetReference performs an integrity check on the object being deallocated (op) to make sure that its neighbors in refchain recognize it. Specifically, _Py_ForgetReference verifies that the _ob_next pointer of the previous object in refchain (op->_ob_prev->_ob_next) points to op, and that the _ob_prev pointer of the next object in refchain (op->_ob_next->_ob_prev) points to op. If either of those conditions is false, the interpreter raises the fatal error I'm seeing. After mxDateTime_New pulls an mxDateTimeObject out of the free list, it calls _Py_NewReference on that object to transform it from a "conceptually deallocated" object to a "conceptually allocated" one. _Py_NewReference inserts the object into refchain. Later, when the object is being "conceptually deallocated", it should be removed from refchain with _Py_ForgetReference. The version of _Py_Dealloc that's active when Py_TRACE_REFS is enabled does this (_Py_Dealloc is the element of Py_DECREF that performs the actual destruction). _Py_Dealloc first calls _Py_ForgetReference to remove the object from refchain, then calls the object's destructor (op->ob_type->tp_dealloc). If WANT_SUBCLASSABLE_TYPES is not defined (it is not in my case), the destructor for mxDateTime_Type is mxDateTime_Free. So, if a DateTime object is deallocated normally, as a result of its reference count falling to zero, _Py_Dealloc is called on the object, which first removes it from refchain, then passes it to mxDateTime_Free. If a DateTime object is destroyed prematurely, as a result of invalid arguments to its destructor, the onError handler calls mxDateTime_Free, so the object is "conceptually deallocated" (placed in the free list), *but* the object is not removed from refchain. So if a refchain-membership-integrity-check is performed on the object in question or one of its immediate neighbors in refchain, that integrity check fails, leading to the fatal error. --- The solution is to 'Py_DECREF(...)' the object in the onError handler of its constructor, instead of passing the object directly to mxDateTime_Free. That change solves two problems: 1) It causes _Py_Dealloc to execute, which in turn executes _Py_ForgetReference, so the object is removed from refchain, as it should be. 2) At present, objects that are created successfully and later deallocated by normal reference count mechanics have a reference count of 0 when they enter the free list, whereas objects whose constructors abort their creation due to invalid arguments have a reference count of 1 when they enter the free list. Although AFAIK this doesn't cause an actual execution problem (because the object's reference count is *explicitly set to 1* rather than *incremented by 1* when the object is later "conceptually allocated" by _Py_NewReference), it is likely to confuse future maintainers and thereby lead to the introduction of an actual execution problem. I assume that if you agree that this is a reasonable solution, you'll want to apply the change not only to mxDateTime_FromDateAndTime, but to all similar constructors in mxDateTime.c. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From rj at maxxian.com Thu May 5 01:57:40 2005 From: rj at maxxian.com (RJ Juneau) Date: Tue Jan 24 20:02:08 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c5512e$f72798c0$6505a8c0@rjlaptop> I'm on the 30 day evaluation for mxodbc_zope_da. I'm getting the following error when I submit some queries: Error Type: KeyError Error Value: 'query' I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 with UCS4. The error seems to be caused by multiple rows being returned. I did see an earlier posting with the same error message. The response suggested a template error, but this is clearly not the case here. The additional evidence I've gathered so far: - I'm running the test directly from the ZSQL method, so there's no template involved. - If I use the same query with an additional "where" clause to ensure that only one row is returned, it works - If I use a value in the 'where' clause with no rows returned, it works - The same ZSQL query is being used on a Windows machine running Zope and the free ZODBC module without a problem - The query has been verified directly in mysql-client-browser Other info: - The database is MySQL 4.1.10A-0 - iODBC is the DB driver RJ Juneau -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050505/68d278bf/attachment-0048.htm From mal at egenix.com Thu May 5 12:37:43 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 24 20:02:08 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c5512e$f72798c0$6505a8c0@rjlaptop> References: <000301c5512e$f72798c0$6505a8c0@rjlaptop> Message-ID: <4279E967.6010904@egenix.com> RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 > with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 09:37:42 2005 From: rj at maxxian.com (RJ Juneau) Date: Tue Jan 24 20:02:08 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000101c5516f$3b96de90$6505a8c0@rjlaptop> More interesting info on the problem: If I execute the query directly in the "test" window of the base eGenix mxODBC Database Connection window, it works fine and returns the 20 lines expected. That could point to a problem in the rendering, which seems to be where the traceback ends. Note that within the same Zope system I also have an ODBC connection to a Sybase database, and I have successfully tested multi-line ZSQL queries there. This is the traceback: Time 2005/05/05 07:55:15.294 GMT-4 Exception Type KeyError Exception Value 'query' Traceback (innermost last): Module ZPublisher.Publish, line 101, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 39, in call_object Module Shared.DC.ZRDB.DA, line 337, in manage_test Module DocumentTemplate.DT_String, line 474, in __call__ Module DocumentTemplate.DT_In, line 602, in renderwb Module DocumentTemplate.DT_Var, line 219, in render KeyError: 'query' I don't think the following is an issue, but I'll include it for completeness.I am also getting the following iODBC warnings and errors in the Zope console log, which are related to the ODBC parameters being passed by iODBC. Note that these errors also appear for all of the successful queries. [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (Setup). [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (UsageCount). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Timeout). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Reuse). As for the ZSQL snippet from the template... Since there's no template involved yet (I'm still testing directly from the ZSQL method), I assume you mean the SQL code? select h.host_name, s.system_name, s.system_handle, count(*) from terminal t, system_map s, host h where t.system_index = s.system_index and s.host_index = h.host_index group by s.system_name order by h.host_name Nothing complicated here. There are no parameters passed to the query. RJ -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: May 5, 2005 5:38 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: Re: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is > 2.3.4 with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ---------------------------------------------------------------------- > -- > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 16:00:32 2005 From: charlie at egenix.com (Charlie Clark) Date: Tue Jan 24 20:02:08 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000101c5516f$3b96de90$6505a8c0@rjlaptop> References: <000101c5516f$3b96de90$6505a8c0@rjlaptop> Message-ID: <20050505150032.644.1@bepc.1115296715.fake> On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base eGenix > mxODBC Database Connection window, it works fine and returns the 20 > lines expected. That could point to a problem in the rendering, which > seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection to > a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 10:22:17 2005 From: rj at maxxian.com (RJ Juneau) Date: Tue Jan 24 20:02:08 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505150032.644.1@bepc.1115296715.fake> Message-ID: <000201c55175$75bcad10$6505a8c0@rjlaptop> At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 11:47:14 2005 From: rj at maxxian.com (RJ Juneau) Date: Tue Jan 24 20:02:08 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c55181$549be0e0$6505a8c0@rjlaptop> Charlie, I found a fix. Here it is in case anyone else runs into this. You were correct - the problem is in another part of Zope. Based on your feedback, I did a bit more searching and found something here: http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. html The problem appears to be in Zope versions after 2.7.0. I'm running 2.7.6, and the post indicates that it also happens in 2.7.4. The solution: Edit file /lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. There are two lines in the file that start with . Edit them as follows: Change first line to: Change second line to: Just to be after, I shut down Zope before I made the changes and restarted it after. Thanks for the help! RJ -----Original Message----- From: RJ Juneau [mailto:rj@maxxian.com] Sent: May 5, 2005 9:22 AM To: 'Charlie Clark' Cc: 'egenix-users@lists.egenix.com' Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 17:57:25 2005 From: charlie at egenix.com (Charlie Clark) Date: Tue Jan 24 20:02:08 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <20050505165725.3380.2@bepc.1115296715.fake> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Thu May 5 09:15:21 2005 From: charlie at egenix.com (Charlie Clark) Date: Tue Jan 24 20:02:08 2006 Subject: [Zope-DB] RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <000001c55185$41477730$6b00a8c0@fonacier.local> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________ Zope-DB mailing list Zope-DB@zope.org http://mail.zope.org/mailman/listinfo/zope-db From rj at maxxian.com Thu May 5 12:38:00 2005 From: rj at maxxian.com (RJ Juneau) Date: Tue Jan 24 20:02:08 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000001c55188$6b841eb0$6505a8c0@rjlaptop> I just double-checked. Zope-2.7.6-final. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 12:49:16 2005 From: rj at maxxian.com (RJ Juneau) Date: Tue Jan 24 20:02:08 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000501c55189$fe149ba0$6505a8c0@rjlaptop> Charlie, The fix has only been applied for 2.7.7, 2.8b2. The info is in the original bug report which is closed and can be found here: http://www.zope.org/Collectors/Zope/1745 RJ -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Fri May 6 11:50:09 2005 From: rj at maxxian.com (RJ Juneau) Date: Tue Jan 24 20:02:08 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC Message-ID: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Still on eval for the product. I cannot get a stable connection to Sybase via the iODBC drivers. - The Sybase ODBC connection - including a query - have been verified at the iODBC level. - The setup is already working well for ODBC connection to MySQL. Symptoms include: - If I click on "Open Connection", it still comes back with "Connection Closed" when I go to a ZSQL method - Using 'Connect on Demand' is not working either. - Clicking "Open Connection" gives me the following error: Connection string: DSN=lixbox_sybase; UID=sa; PWD=XXXXXXX Connection pool entry: 0 Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection rejected by data source', 7952) The odbc.ini definition for DSN "lixbox_sybase" is as follows: [lixbox_sybase] JetFix = No NoRowSetSizeLimit = No Description = Test connection to listbox Options = LIXBOX DSQUERY = SQLSERVER TDSHOST = lixbox TDSPORT = 5000 TDSVER = 5.0 SQLSERVER_CATALOG = N CURSOR_SENSITIVITY = LOW UserName = sa Password = XXXXXXXX ServerType = Sybase 10/11/12 Driver = /opt/openlink/lib/sql_mt_lt.so Database = pubs2 ReadOnly = no NoAutoCommit = No NoLoginBox = No FetchBufferSize = 60 Other relevant data: - Connecting via OpenLink's iODBC - Zope 2.7.6-final - Python 2.3.4 - Connection to Sybase has been successfully tested with iODBC, including issuing a query - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC connection RJ Juneau Chief Technology Officer Maxxian Integration Inc. 155 Westhampton Drive Thornhill, Ontario Canada L4J 7X2 E-mail: rj@maxxian.com Phone: +1 905 482 9429 Cell: +1 416 897 6682 Toll free: +1 866 758 9161 Fax: +1 647 722 2038 -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050506/aef33361/attachment-0048.htm From mal at egenix.com Fri May 6 18:27:37 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 24 20:02:08 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC In-Reply-To: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> References: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Message-ID: <427B8CE9.1010601@egenix.com> RJ Juneau wrote: > Still on eval for the product. > > I cannot get a stable connection to Sybase via the iODBC drivers. > > - The Sybase ODBC connection - including a query - have been verified at > the iODBC level. > - The setup is already working well for ODBC connection to MySQL. > > Symptoms include: > > - If I click on "Open Connection", it still comes back with "Connection > Closed" when I go to a ZSQL method > - Using 'Connect on Demand' is not working either. > - Clicking "Open Connection" gives me the following error: > > Connection string: DSN=lixbox_sybase; > UID=sa; > PWD=XXXXXXX Try writing the connection string on one line and without whitespace. ODBC drivers sometimes have problems with this. > Connection pool entry: 0 > Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection > rejected by data source', 7952) This is a generic error that relates to authentication or firewall problems. It is possible that turning on ODBC tracing the ODBC manager will give more clues as to the real cause of the problem. > The odbc.ini definition for DSN "lixbox_sybase" is as follows: > > [lixbox_sybase] > JetFix = No > NoRowSetSizeLimit = No > Description = Test connection to listbox > Options = LIXBOX > DSQUERY = SQLSERVER > TDSHOST = lixbox > TDSPORT = 5000 > TDSVER = 5.0 > SQLSERVER_CATALOG = N > CURSOR_SENSITIVITY = LOW > UserName = sa > Password = XXXXXXXX > ServerType = Sybase 10/11/12 > Driver = /opt/openlink/lib/sql_mt_lt.so > Database = pubs2 > ReadOnly = no > NoAutoCommit = No > NoLoginBox = No > FetchBufferSize = 60 > > > Other relevant data: > - Connecting via OpenLink's iODBC > - Zope 2.7.6-final > - Python 2.3.4 > - Connection to Sybase has been successfully tested with iODBC, > including issuing a query > - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC > connection > > > > RJ Juneau > Chief Technology Officer > Maxxian Integration Inc. > 155 Westhampton Drive > Thornhill, Ontario > Canada L4J 7X2 > E-mail: rj@maxxian.com > Phone: +1 905 482 9429 > Cell: +1 416 897 6682 > Toll free: +1 866 758 9161 > Fax: +1 647 722 2038 > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 06 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From calisp at gmail.com Sun May 15 23:49:03 2005 From: calisp at gmail.com (calisp@gmail.com) Date: Tue Jan 24 20:02:08 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK Message-ID: Hi, I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the following error... 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the last phase of a two-phase commit. This shouldn't happen. Traceback (most recent call last): File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one jar.tpc_finish(self) File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish try: self._finish() File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could not perform COMMIT or ROLLBACK', 1023) What could be causing this? Can I get the mxODBCZopeDA source from somewhere? It would make debugging this much easier. Thanks, Calisp. From mal at egenix.com Mon May 16 13:52:12 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 24 20:02:08 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK In-Reply-To: References: Message-ID: <42887B5C.4010109@egenix.com> calisp@gmail.com wrote: > Hi, > > I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with > unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the > following error... > > 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the > last phase of a two-phase commit. This shouldn't happen. > Traceback (most recent call last): > File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one > jar.tpc_finish(self) > File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish > try: self._finish() > File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish > File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler > ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could > not perform COMMIT or ROLLBACK', 1023) You should have a look at the database logs to see what prevented the commit from being completed. > What could be causing this? Hard to say: mxODBCZopeDA is trying to commit the transaction, but the driver or database failed to complete the request. The above error was generated by the ODBC driver. This could be network or DNS problems, or be related to a bug in FreeTDS (which is getting more stable with every new release, but should still be considered beta quality software at the moment). > Can I get the mxODBCZopeDA source from > somewhere? It would make debugging this much easier. Getting the source is not an option and won't help much either since the source of the problem is not mxODBCZopeDA. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 16 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Sun May 1 21:29:25 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Jan 25 08:02:21 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <427259F3.4090806@egenix.com> References: <20050427130906.52878.qmail@web30008.mail.mud.yahoo.com> <427259F3.4090806@egenix.com> Message-ID: <42752005.7080904@egenix.com> M.-A. Lemburg wrote: > David Rushby wrote: > >> --- "M.-A. Lemburg" wrote: >> >>> Are you using the standard mxDateTime build or one >>> with WANT_SUBCLASSABLE_TYPES defined... >> >> >> >> Presumably "the standard", since I just built with 'py24d setup.py >> build', making no attempt to enable special directives. >> >> >>> ... (mxDateTime_Deallocate is only used by the latter)? >> >> >> >> That's true in 2.1.0-2005-04-15, but not in 2.1.0b5. >> >> >>> In any case, please try our latest snapshot: >>> >>> >> >> http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-04-15.zip >> >>> to see if that makes any difference. >> >> >> >> I can't build it out of the box: > > > Hmm, looks like distutils' sdist command doesn't like our new > repository layout which uses symlinks (after we've switched to > subversion). > > We'll have to debug distutils first, I guess :-( Ok, we've found the problem and fixed it. Here's the new release (which does build out of the box at least on our boxes ;-): http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 01 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From davidrushby at yahoo.com Mon May 2 15:49:53 2005 From: davidrushby at yahoo.com (David Rushby) Date: Wed Jan 25 08:02:21 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Ok, we've found the problem and fixed it. Here's the new > release (which does build out of the box at least on our > boxes ;-): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip It does build now, but: py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" still behaves as it did when I submitted my original message: Fatal Python error: UNREF invalid object Aborted This is the same debug build of Python 2.4.1 that I was previously using, running the same configuration (CentOS Linux 4.0/i386, everything compiled with GCC 3.4.3). Have you examined my original claim as to the cause of the bug? __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 10:21:55 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Jan 25 08:02:21 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> References: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> Message-ID: <42772693.8050306@egenix.com> David Rushby wrote: > --- "M.-A. Lemburg" wrote: > >>Ok, we've found the problem and fixed it. Here's the new >>release (which does build out of the box at least on our >>boxes ;-): >> >> > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip > > It does build now, but: > py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" > still behaves as it did when I submitted my original message: > Fatal Python error: UNREF invalid object > Aborted > > This is the same debug build of Python 2.4.1 that I was previously > using, running the same configuration (CentOS Linux 4.0/i386, > everything compiled with GCC 3.4.3). > > Have you examined my original claim as to the cause of the bug? No. We haven't had time for looking into it. I'm not sure whether your analysis of the problem is correct: if you don't define WANT_SUBCLASSABLE_TYPES, the API mxDateTime_Deallocate() is neither defined nor used. Furthermore, PyObject_Del() is only called by mxDateTime_Free() if you have explicitely edited mxDateTime.c to disabled the free list #defines. In a standard build, PyObject_Del() is only called at module finalization time. Note that the reason we call mxDateTime_Free() in the constructor is that we don't want the destructor of the object to be called. Py_DECREF() would call the destructor (mxDateTime_Deallocate). It is possible that the debug code in Python complains about the refcount in the object not being 0 at the time the object is finalized (module finalization time), but I don't see any such checks in PyObject_Free() (which is what PyObject_Del() maps to). Again, all of this does not happen in regular non-debug Python builds. Please be aware that we don't support debug builds, so fixing the problem (if there is one - gcc has some serious optimization problems on some combinations of platform and version) will take a while. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 09:27:37 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Wed Jan 25 08:02:21 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 Message-ID: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Hi all- I am trying to build the mx-base package, v.2.0.6. This will be used with postgresql 7.3.9, psycopg 1.1.18, and Roundup 0.8.2. RHEL 3.0 Python 2.3 egenix-mx-base-2.0.6.tar.gz I performed a: /usr/local/bin/python2.3 setup.py install Everything looks proper with the exeception of this series of warning statements: ----------------- gcc -pthread -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fno-strict-aliasing -fPIC -Imx/BeeBase/mxBeeBase -I/usr/local/incl ude/python2.3 -I/usr/local/include -c mx/BeeBase/mxBeeBase/btr.c -o build/temp.linux-i686-2.3/mx/BeeBase/mxBeeBase/mxBeeBa se/mx/BeeBase/mxBeeBase/btr.o mx/BeeBase/mxBeeBase/btr.c: In function `dumpBuf': mx/BeeBase/mxBeeBase/btr.c:249: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:250: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:255: warning: unsigned int format, long unsigned int arg (arg 4) mx/BeeBase/mxBeeBase/btr.c:256: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c: In function `_validateTree': mx/BeeBase/mxBeeBase/btr.c:330: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:337: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:339: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:349: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:351: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 3) creating build/lib.linux-i686-2.3/mx/BeeBase creating build/lib.linux-i686-2.3/mx/BeeBase/mxBeeBase -------------- Would someone be kind enough to let me know whether these messages were expected, and if not, how I might resolve these? Thanks! DC __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 22:06:33 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Jan 25 08:02:21 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> References: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Message-ID: <4277CBB9.8020302@egenix.com> Dianne Chen wrote: > Hi all- > > I am trying to build the mx-base package, v.2.0.6. > This will be used with postgresql 7.3.9, psycopg > 1.1.18, and Roundup 0.8.2. > > RHEL 3.0 > Python 2.3 > egenix-mx-base-2.0.6.tar.gz > > I performed a: > > /usr/local/bin/python2.3 setup.py install > > Everything looks proper with the exeception of this > series of warning statements: > > ----------------- > ... > -------------- > > Would someone be kind enough to let me know whether > these messages were expected, and if not, how I might > resolve these? These warning can safely be ignored. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 13:41:14 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Wed Jan 25 08:02:21 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: 6667 Message-ID: <20050503194114.72091.qmail@web31414.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Dianne Chen wrote: > > Hi all- > > > > I am trying to build the mx-base package, v.2.0.6. > > This will be used with postgresql 7.3.9, psycopg > > 1.1.18, and Roundup 0.8.2. > > > > RHEL 3.0 > > Python 2.3 > > egenix-mx-base-2.0.6.tar.gz > > > > I performed a: > > > > /usr/local/bin/python2.3 setup.py install > > > > Everything looks proper with the exeception of > this > > series of warning statements: > > > > ----------------- > > ... > > -------------- > > > > Would someone be kind enough to let me know > whether > > these messages were expected, and if not, how I > might > > resolve these? > > These warning can safely be ignored. > > -- > Marc-Andre Lemburg > eGenix.com > Marc- Thank you very much for the reply. It helps greatly. With kind regards, DC __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From davidrushby at yahoo.com Tue May 3 17:18:46 2005 From: davidrushby at yahoo.com (David Rushby) Date: Wed Jan 25 08:02:21 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050503231846.35012.qmail@web30009.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > I'm not sure whether your analysis of the problem is correct... Indeed, my original analysis wasn't correct; I think this one is. The fatal error I'm complaining about only arises if the arguments to DateTime.DateTime are invalid, so that the object is deallocated in the onError block of mxDateTime_FromDateAndTime. If the object is created successfully, and later deallocated by Python's garbage collector, the fatal error doesn't arise. Here's my analysis of the problem: --- If the debugging directive Py_TRACE_REFS is enabled, as it is in my case, the Python interpreter maintains a doubly linked list of all Python objects (named refchain) via the _ob_next and _ob_prev pointers added to PyObject via _PyObject_HEAD_EXTRA. Each object is inserted into refchain by the _Py_AddToAllObjects call in _Py_NewReference, and removed from refchain by the _Py_ForgetReference call in _Py_Dealloc. _Py_ForgetReference performs an integrity check on the object being deallocated (op) to make sure that its neighbors in refchain recognize it. Specifically, _Py_ForgetReference verifies that the _ob_next pointer of the previous object in refchain (op->_ob_prev->_ob_next) points to op, and that the _ob_prev pointer of the next object in refchain (op->_ob_next->_ob_prev) points to op. If either of those conditions is false, the interpreter raises the fatal error I'm seeing. After mxDateTime_New pulls an mxDateTimeObject out of the free list, it calls _Py_NewReference on that object to transform it from a "conceptually deallocated" object to a "conceptually allocated" one. _Py_NewReference inserts the object into refchain. Later, when the object is being "conceptually deallocated", it should be removed from refchain with _Py_ForgetReference. The version of _Py_Dealloc that's active when Py_TRACE_REFS is enabled does this (_Py_Dealloc is the element of Py_DECREF that performs the actual destruction). _Py_Dealloc first calls _Py_ForgetReference to remove the object from refchain, then calls the object's destructor (op->ob_type->tp_dealloc). If WANT_SUBCLASSABLE_TYPES is not defined (it is not in my case), the destructor for mxDateTime_Type is mxDateTime_Free. So, if a DateTime object is deallocated normally, as a result of its reference count falling to zero, _Py_Dealloc is called on the object, which first removes it from refchain, then passes it to mxDateTime_Free. If a DateTime object is destroyed prematurely, as a result of invalid arguments to its destructor, the onError handler calls mxDateTime_Free, so the object is "conceptually deallocated" (placed in the free list), *but* the object is not removed from refchain. So if a refchain-membership-integrity-check is performed on the object in question or one of its immediate neighbors in refchain, that integrity check fails, leading to the fatal error. --- The solution is to 'Py_DECREF(...)' the object in the onError handler of its constructor, instead of passing the object directly to mxDateTime_Free. That change solves two problems: 1) It causes _Py_Dealloc to execute, which in turn executes _Py_ForgetReference, so the object is removed from refchain, as it should be. 2) At present, objects that are created successfully and later deallocated by normal reference count mechanics have a reference count of 0 when they enter the free list, whereas objects whose constructors abort their creation due to invalid arguments have a reference count of 1 when they enter the free list. Although AFAIK this doesn't cause an actual execution problem (because the object's reference count is *explicitly set to 1* rather than *incremented by 1* when the object is later "conceptually allocated" by _Py_NewReference), it is likely to confuse future maintainers and thereby lead to the introduction of an actual execution problem. I assume that if you agree that this is a reasonable solution, you'll want to apply the change not only to mxDateTime_FromDateAndTime, but to all similar constructors in mxDateTime.c. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From rj at maxxian.com Thu May 5 01:57:40 2005 From: rj at maxxian.com (RJ Juneau) Date: Wed Jan 25 08:02:21 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c5512e$f72798c0$6505a8c0@rjlaptop> I'm on the 30 day evaluation for mxodbc_zope_da. I'm getting the following error when I submit some queries: Error Type: KeyError Error Value: 'query' I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 with UCS4. The error seems to be caused by multiple rows being returned. I did see an earlier posting with the same error message. The response suggested a template error, but this is clearly not the case here. The additional evidence I've gathered so far: - I'm running the test directly from the ZSQL method, so there's no template involved. - If I use the same query with an additional "where" clause to ensure that only one row is returned, it works - If I use a value in the 'where' clause with no rows returned, it works - The same ZSQL query is being used on a Windows machine running Zope and the free ZODBC module without a problem - The query has been verified directly in mysql-client-browser Other info: - The database is MySQL 4.1.10A-0 - iODBC is the DB driver RJ Juneau -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050505/68d278bf/attachment-0049.htm From mal at egenix.com Thu May 5 12:37:43 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Jan 25 08:02:21 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c5512e$f72798c0$6505a8c0@rjlaptop> References: <000301c5512e$f72798c0$6505a8c0@rjlaptop> Message-ID: <4279E967.6010904@egenix.com> RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 > with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 09:37:42 2005 From: rj at maxxian.com (RJ Juneau) Date: Wed Jan 25 08:02:21 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000101c5516f$3b96de90$6505a8c0@rjlaptop> More interesting info on the problem: If I execute the query directly in the "test" window of the base eGenix mxODBC Database Connection window, it works fine and returns the 20 lines expected. That could point to a problem in the rendering, which seems to be where the traceback ends. Note that within the same Zope system I also have an ODBC connection to a Sybase database, and I have successfully tested multi-line ZSQL queries there. This is the traceback: Time 2005/05/05 07:55:15.294 GMT-4 Exception Type KeyError Exception Value 'query' Traceback (innermost last): Module ZPublisher.Publish, line 101, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 39, in call_object Module Shared.DC.ZRDB.DA, line 337, in manage_test Module DocumentTemplate.DT_String, line 474, in __call__ Module DocumentTemplate.DT_In, line 602, in renderwb Module DocumentTemplate.DT_Var, line 219, in render KeyError: 'query' I don't think the following is an issue, but I'll include it for completeness.I am also getting the following iODBC warnings and errors in the Zope console log, which are related to the ODBC parameters being passed by iODBC. Note that these errors also appear for all of the successful queries. [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (Setup). [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (UsageCount). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Timeout). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Reuse). As for the ZSQL snippet from the template... Since there's no template involved yet (I'm still testing directly from the ZSQL method), I assume you mean the SQL code? select h.host_name, s.system_name, s.system_handle, count(*) from terminal t, system_map s, host h where t.system_index = s.system_index and s.host_index = h.host_index group by s.system_name order by h.host_name Nothing complicated here. There are no parameters passed to the query. RJ -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: May 5, 2005 5:38 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: Re: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is > 2.3.4 with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ---------------------------------------------------------------------- > -- > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 16:00:32 2005 From: charlie at egenix.com (Charlie Clark) Date: Wed Jan 25 08:02:21 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000101c5516f$3b96de90$6505a8c0@rjlaptop> References: <000101c5516f$3b96de90$6505a8c0@rjlaptop> Message-ID: <20050505150032.644.1@bepc.1115296715.fake> On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base eGenix > mxODBC Database Connection window, it works fine and returns the 20 > lines expected. That could point to a problem in the rendering, which > seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection to > a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 10:22:17 2005 From: rj at maxxian.com (RJ Juneau) Date: Wed Jan 25 08:02:21 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505150032.644.1@bepc.1115296715.fake> Message-ID: <000201c55175$75bcad10$6505a8c0@rjlaptop> At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 11:47:14 2005 From: rj at maxxian.com (RJ Juneau) Date: Wed Jan 25 08:02:22 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c55181$549be0e0$6505a8c0@rjlaptop> Charlie, I found a fix. Here it is in case anyone else runs into this. You were correct - the problem is in another part of Zope. Based on your feedback, I did a bit more searching and found something here: http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. html The problem appears to be in Zope versions after 2.7.0. I'm running 2.7.6, and the post indicates that it also happens in 2.7.4. The solution: Edit file /lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. There are two lines in the file that start with . Edit them as follows: Change first line to: Change second line to: Just to be after, I shut down Zope before I made the changes and restarted it after. Thanks for the help! RJ -----Original Message----- From: RJ Juneau [mailto:rj@maxxian.com] Sent: May 5, 2005 9:22 AM To: 'Charlie Clark' Cc: 'egenix-users@lists.egenix.com' Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 17:57:25 2005 From: charlie at egenix.com (Charlie Clark) Date: Wed Jan 25 08:02:22 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <20050505165725.3380.2@bepc.1115296715.fake> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Thu May 5 09:15:21 2005 From: charlie at egenix.com (Charlie Clark) Date: Wed Jan 25 08:02:22 2006 Subject: [Zope-DB] RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <000001c55185$41477730$6b00a8c0@fonacier.local> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________ Zope-DB mailing list Zope-DB@zope.org http://mail.zope.org/mailman/listinfo/zope-db From rj at maxxian.com Thu May 5 12:38:00 2005 From: rj at maxxian.com (RJ Juneau) Date: Wed Jan 25 08:02:22 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000001c55188$6b841eb0$6505a8c0@rjlaptop> I just double-checked. Zope-2.7.6-final. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 12:49:16 2005 From: rj at maxxian.com (RJ Juneau) Date: Wed Jan 25 08:02:22 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000501c55189$fe149ba0$6505a8c0@rjlaptop> Charlie, The fix has only been applied for 2.7.7, 2.8b2. The info is in the original bug report which is closed and can be found here: http://www.zope.org/Collectors/Zope/1745 RJ -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Fri May 6 11:50:09 2005 From: rj at maxxian.com (RJ Juneau) Date: Wed Jan 25 08:02:23 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC Message-ID: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Still on eval for the product. I cannot get a stable connection to Sybase via the iODBC drivers. - The Sybase ODBC connection - including a query - have been verified at the iODBC level. - The setup is already working well for ODBC connection to MySQL. Symptoms include: - If I click on "Open Connection", it still comes back with "Connection Closed" when I go to a ZSQL method - Using 'Connect on Demand' is not working either. - Clicking "Open Connection" gives me the following error: Connection string: DSN=lixbox_sybase; UID=sa; PWD=XXXXXXX Connection pool entry: 0 Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection rejected by data source', 7952) The odbc.ini definition for DSN "lixbox_sybase" is as follows: [lixbox_sybase] JetFix = No NoRowSetSizeLimit = No Description = Test connection to listbox Options = LIXBOX DSQUERY = SQLSERVER TDSHOST = lixbox TDSPORT = 5000 TDSVER = 5.0 SQLSERVER_CATALOG = N CURSOR_SENSITIVITY = LOW UserName = sa Password = XXXXXXXX ServerType = Sybase 10/11/12 Driver = /opt/openlink/lib/sql_mt_lt.so Database = pubs2 ReadOnly = no NoAutoCommit = No NoLoginBox = No FetchBufferSize = 60 Other relevant data: - Connecting via OpenLink's iODBC - Zope 2.7.6-final - Python 2.3.4 - Connection to Sybase has been successfully tested with iODBC, including issuing a query - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC connection RJ Juneau Chief Technology Officer Maxxian Integration Inc. 155 Westhampton Drive Thornhill, Ontario Canada L4J 7X2 E-mail: rj@maxxian.com Phone: +1 905 482 9429 Cell: +1 416 897 6682 Toll free: +1 866 758 9161 Fax: +1 647 722 2038 -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050506/aef33361/attachment-0049.htm From mal at egenix.com Fri May 6 18:27:37 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Jan 25 08:02:23 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC In-Reply-To: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> References: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Message-ID: <427B8CE9.1010601@egenix.com> RJ Juneau wrote: > Still on eval for the product. > > I cannot get a stable connection to Sybase via the iODBC drivers. > > - The Sybase ODBC connection - including a query - have been verified at > the iODBC level. > - The setup is already working well for ODBC connection to MySQL. > > Symptoms include: > > - If I click on "Open Connection", it still comes back with "Connection > Closed" when I go to a ZSQL method > - Using 'Connect on Demand' is not working either. > - Clicking "Open Connection" gives me the following error: > > Connection string: DSN=lixbox_sybase; > UID=sa; > PWD=XXXXXXX Try writing the connection string on one line and without whitespace. ODBC drivers sometimes have problems with this. > Connection pool entry: 0 > Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection > rejected by data source', 7952) This is a generic error that relates to authentication or firewall problems. It is possible that turning on ODBC tracing the ODBC manager will give more clues as to the real cause of the problem. > The odbc.ini definition for DSN "lixbox_sybase" is as follows: > > [lixbox_sybase] > JetFix = No > NoRowSetSizeLimit = No > Description = Test connection to listbox > Options = LIXBOX > DSQUERY = SQLSERVER > TDSHOST = lixbox > TDSPORT = 5000 > TDSVER = 5.0 > SQLSERVER_CATALOG = N > CURSOR_SENSITIVITY = LOW > UserName = sa > Password = XXXXXXXX > ServerType = Sybase 10/11/12 > Driver = /opt/openlink/lib/sql_mt_lt.so > Database = pubs2 > ReadOnly = no > NoAutoCommit = No > NoLoginBox = No > FetchBufferSize = 60 > > > Other relevant data: > - Connecting via OpenLink's iODBC > - Zope 2.7.6-final > - Python 2.3.4 > - Connection to Sybase has been successfully tested with iODBC, > including issuing a query > - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC > connection > > > > RJ Juneau > Chief Technology Officer > Maxxian Integration Inc. > 155 Westhampton Drive > Thornhill, Ontario > Canada L4J 7X2 > E-mail: rj@maxxian.com > Phone: +1 905 482 9429 > Cell: +1 416 897 6682 > Toll free: +1 866 758 9161 > Fax: +1 647 722 2038 > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 06 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From calisp at gmail.com Sun May 15 23:49:03 2005 From: calisp at gmail.com (calisp@gmail.com) Date: Wed Jan 25 08:02:23 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK Message-ID: Hi, I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the following error... 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the last phase of a two-phase commit. This shouldn't happen. Traceback (most recent call last): File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one jar.tpc_finish(self) File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish try: self._finish() File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could not perform COMMIT or ROLLBACK', 1023) What could be causing this? Can I get the mxODBCZopeDA source from somewhere? It would make debugging this much easier. Thanks, Calisp. From mal at egenix.com Mon May 16 13:52:12 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Jan 25 08:02:23 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK In-Reply-To: References: Message-ID: <42887B5C.4010109@egenix.com> calisp@gmail.com wrote: > Hi, > > I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with > unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the > following error... > > 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the > last phase of a two-phase commit. This shouldn't happen. > Traceback (most recent call last): > File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one > jar.tpc_finish(self) > File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish > try: self._finish() > File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish > File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler > ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could > not perform COMMIT or ROLLBACK', 1023) You should have a look at the database logs to see what prevented the commit from being completed. > What could be causing this? Hard to say: mxODBCZopeDA is trying to commit the transaction, but the driver or database failed to complete the request. The above error was generated by the ODBC driver. This could be network or DNS problems, or be related to a bug in FreeTDS (which is getting more stable with every new release, but should still be considered beta quality software at the moment). > Can I get the mxODBCZopeDA source from > somewhere? It would make debugging this much easier. Getting the source is not an option and won't help much either since the source of the problem is not mxODBCZopeDA. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 16 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Sun May 1 21:29:25 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Jan 25 12:01:16 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <427259F3.4090806@egenix.com> References: <20050427130906.52878.qmail@web30008.mail.mud.yahoo.com> <427259F3.4090806@egenix.com> Message-ID: <42752005.7080904@egenix.com> M.-A. Lemburg wrote: > David Rushby wrote: > >> --- "M.-A. Lemburg" wrote: >> >>> Are you using the standard mxDateTime build or one >>> with WANT_SUBCLASSABLE_TYPES defined... >> >> >> >> Presumably "the standard", since I just built with 'py24d setup.py >> build', making no attempt to enable special directives. >> >> >>> ... (mxDateTime_Deallocate is only used by the latter)? >> >> >> >> That's true in 2.1.0-2005-04-15, but not in 2.1.0b5. >> >> >>> In any case, please try our latest snapshot: >>> >>> >> >> http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-04-15.zip >> >>> to see if that makes any difference. >> >> >> >> I can't build it out of the box: > > > Hmm, looks like distutils' sdist command doesn't like our new > repository layout which uses symlinks (after we've switched to > subversion). > > We'll have to debug distutils first, I guess :-( Ok, we've found the problem and fixed it. Here's the new release (which does build out of the box at least on our boxes ;-): http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 01 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From davidrushby at yahoo.com Mon May 2 15:49:53 2005 From: davidrushby at yahoo.com (David Rushby) Date: Wed Jan 25 12:01:16 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Ok, we've found the problem and fixed it. Here's the new > release (which does build out of the box at least on our > boxes ;-): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip It does build now, but: py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" still behaves as it did when I submitted my original message: Fatal Python error: UNREF invalid object Aborted This is the same debug build of Python 2.4.1 that I was previously using, running the same configuration (CentOS Linux 4.0/i386, everything compiled with GCC 3.4.3). Have you examined my original claim as to the cause of the bug? __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 10:21:55 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Jan 25 12:01:16 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> References: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> Message-ID: <42772693.8050306@egenix.com> David Rushby wrote: > --- "M.-A. Lemburg" wrote: > >>Ok, we've found the problem and fixed it. Here's the new >>release (which does build out of the box at least on our >>boxes ;-): >> >> > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip > > It does build now, but: > py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" > still behaves as it did when I submitted my original message: > Fatal Python error: UNREF invalid object > Aborted > > This is the same debug build of Python 2.4.1 that I was previously > using, running the same configuration (CentOS Linux 4.0/i386, > everything compiled with GCC 3.4.3). > > Have you examined my original claim as to the cause of the bug? No. We haven't had time for looking into it. I'm not sure whether your analysis of the problem is correct: if you don't define WANT_SUBCLASSABLE_TYPES, the API mxDateTime_Deallocate() is neither defined nor used. Furthermore, PyObject_Del() is only called by mxDateTime_Free() if you have explicitely edited mxDateTime.c to disabled the free list #defines. In a standard build, PyObject_Del() is only called at module finalization time. Note that the reason we call mxDateTime_Free() in the constructor is that we don't want the destructor of the object to be called. Py_DECREF() would call the destructor (mxDateTime_Deallocate). It is possible that the debug code in Python complains about the refcount in the object not being 0 at the time the object is finalized (module finalization time), but I don't see any such checks in PyObject_Free() (which is what PyObject_Del() maps to). Again, all of this does not happen in regular non-debug Python builds. Please be aware that we don't support debug builds, so fixing the problem (if there is one - gcc has some serious optimization problems on some combinations of platform and version) will take a while. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 09:27:37 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Wed Jan 25 12:01:16 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 Message-ID: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Hi all- I am trying to build the mx-base package, v.2.0.6. This will be used with postgresql 7.3.9, psycopg 1.1.18, and Roundup 0.8.2. RHEL 3.0 Python 2.3 egenix-mx-base-2.0.6.tar.gz I performed a: /usr/local/bin/python2.3 setup.py install Everything looks proper with the exeception of this series of warning statements: ----------------- gcc -pthread -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fno-strict-aliasing -fPIC -Imx/BeeBase/mxBeeBase -I/usr/local/incl ude/python2.3 -I/usr/local/include -c mx/BeeBase/mxBeeBase/btr.c -o build/temp.linux-i686-2.3/mx/BeeBase/mxBeeBase/mxBeeBa se/mx/BeeBase/mxBeeBase/btr.o mx/BeeBase/mxBeeBase/btr.c: In function `dumpBuf': mx/BeeBase/mxBeeBase/btr.c:249: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:250: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:255: warning: unsigned int format, long unsigned int arg (arg 4) mx/BeeBase/mxBeeBase/btr.c:256: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c: In function `_validateTree': mx/BeeBase/mxBeeBase/btr.c:330: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:337: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:339: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:349: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:351: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 3) creating build/lib.linux-i686-2.3/mx/BeeBase creating build/lib.linux-i686-2.3/mx/BeeBase/mxBeeBase -------------- Would someone be kind enough to let me know whether these messages were expected, and if not, how I might resolve these? Thanks! DC __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 22:06:33 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Jan 25 12:01:16 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> References: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Message-ID: <4277CBB9.8020302@egenix.com> Dianne Chen wrote: > Hi all- > > I am trying to build the mx-base package, v.2.0.6. > This will be used with postgresql 7.3.9, psycopg > 1.1.18, and Roundup 0.8.2. > > RHEL 3.0 > Python 2.3 > egenix-mx-base-2.0.6.tar.gz > > I performed a: > > /usr/local/bin/python2.3 setup.py install > > Everything looks proper with the exeception of this > series of warning statements: > > ----------------- > ... > -------------- > > Would someone be kind enough to let me know whether > these messages were expected, and if not, how I might > resolve these? These warning can safely be ignored. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 13:41:14 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Wed Jan 25 12:01:16 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: 6667 Message-ID: <20050503194114.72091.qmail@web31414.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Dianne Chen wrote: > > Hi all- > > > > I am trying to build the mx-base package, v.2.0.6. > > This will be used with postgresql 7.3.9, psycopg > > 1.1.18, and Roundup 0.8.2. > > > > RHEL 3.0 > > Python 2.3 > > egenix-mx-base-2.0.6.tar.gz > > > > I performed a: > > > > /usr/local/bin/python2.3 setup.py install > > > > Everything looks proper with the exeception of > this > > series of warning statements: > > > > ----------------- > > ... > > -------------- > > > > Would someone be kind enough to let me know > whether > > these messages were expected, and if not, how I > might > > resolve these? > > These warning can safely be ignored. > > -- > Marc-Andre Lemburg > eGenix.com > Marc- Thank you very much for the reply. It helps greatly. With kind regards, DC __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From davidrushby at yahoo.com Tue May 3 17:18:46 2005 From: davidrushby at yahoo.com (David Rushby) Date: Wed Jan 25 12:01:16 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050503231846.35012.qmail@web30009.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > I'm not sure whether your analysis of the problem is correct... Indeed, my original analysis wasn't correct; I think this one is. The fatal error I'm complaining about only arises if the arguments to DateTime.DateTime are invalid, so that the object is deallocated in the onError block of mxDateTime_FromDateAndTime. If the object is created successfully, and later deallocated by Python's garbage collector, the fatal error doesn't arise. Here's my analysis of the problem: --- If the debugging directive Py_TRACE_REFS is enabled, as it is in my case, the Python interpreter maintains a doubly linked list of all Python objects (named refchain) via the _ob_next and _ob_prev pointers added to PyObject via _PyObject_HEAD_EXTRA. Each object is inserted into refchain by the _Py_AddToAllObjects call in _Py_NewReference, and removed from refchain by the _Py_ForgetReference call in _Py_Dealloc. _Py_ForgetReference performs an integrity check on the object being deallocated (op) to make sure that its neighbors in refchain recognize it. Specifically, _Py_ForgetReference verifies that the _ob_next pointer of the previous object in refchain (op->_ob_prev->_ob_next) points to op, and that the _ob_prev pointer of the next object in refchain (op->_ob_next->_ob_prev) points to op. If either of those conditions is false, the interpreter raises the fatal error I'm seeing. After mxDateTime_New pulls an mxDateTimeObject out of the free list, it calls _Py_NewReference on that object to transform it from a "conceptually deallocated" object to a "conceptually allocated" one. _Py_NewReference inserts the object into refchain. Later, when the object is being "conceptually deallocated", it should be removed from refchain with _Py_ForgetReference. The version of _Py_Dealloc that's active when Py_TRACE_REFS is enabled does this (_Py_Dealloc is the element of Py_DECREF that performs the actual destruction). _Py_Dealloc first calls _Py_ForgetReference to remove the object from refchain, then calls the object's destructor (op->ob_type->tp_dealloc). If WANT_SUBCLASSABLE_TYPES is not defined (it is not in my case), the destructor for mxDateTime_Type is mxDateTime_Free. So, if a DateTime object is deallocated normally, as a result of its reference count falling to zero, _Py_Dealloc is called on the object, which first removes it from refchain, then passes it to mxDateTime_Free. If a DateTime object is destroyed prematurely, as a result of invalid arguments to its destructor, the onError handler calls mxDateTime_Free, so the object is "conceptually deallocated" (placed in the free list), *but* the object is not removed from refchain. So if a refchain-membership-integrity-check is performed on the object in question or one of its immediate neighbors in refchain, that integrity check fails, leading to the fatal error. --- The solution is to 'Py_DECREF(...)' the object in the onError handler of its constructor, instead of passing the object directly to mxDateTime_Free. That change solves two problems: 1) It causes _Py_Dealloc to execute, which in turn executes _Py_ForgetReference, so the object is removed from refchain, as it should be. 2) At present, objects that are created successfully and later deallocated by normal reference count mechanics have a reference count of 0 when they enter the free list, whereas objects whose constructors abort their creation due to invalid arguments have a reference count of 1 when they enter the free list. Although AFAIK this doesn't cause an actual execution problem (because the object's reference count is *explicitly set to 1* rather than *incremented by 1* when the object is later "conceptually allocated" by _Py_NewReference), it is likely to confuse future maintainers and thereby lead to the introduction of an actual execution problem. I assume that if you agree that this is a reasonable solution, you'll want to apply the change not only to mxDateTime_FromDateAndTime, but to all similar constructors in mxDateTime.c. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From rj at maxxian.com Thu May 5 01:57:40 2005 From: rj at maxxian.com (RJ Juneau) Date: Wed Jan 25 12:01:16 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c5512e$f72798c0$6505a8c0@rjlaptop> I'm on the 30 day evaluation for mxodbc_zope_da. I'm getting the following error when I submit some queries: Error Type: KeyError Error Value: 'query' I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 with UCS4. The error seems to be caused by multiple rows being returned. I did see an earlier posting with the same error message. The response suggested a template error, but this is clearly not the case here. The additional evidence I've gathered so far: - I'm running the test directly from the ZSQL method, so there's no template involved. - If I use the same query with an additional "where" clause to ensure that only one row is returned, it works - If I use a value in the 'where' clause with no rows returned, it works - The same ZSQL query is being used on a Windows machine running Zope and the free ZODBC module without a problem - The query has been verified directly in mysql-client-browser Other info: - The database is MySQL 4.1.10A-0 - iODBC is the DB driver RJ Juneau -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050505/68d278bf/attachment-0050.htm From mal at egenix.com Thu May 5 12:37:43 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Jan 25 12:01:16 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c5512e$f72798c0$6505a8c0@rjlaptop> References: <000301c5512e$f72798c0$6505a8c0@rjlaptop> Message-ID: <4279E967.6010904@egenix.com> RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 > with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 09:37:42 2005 From: rj at maxxian.com (RJ Juneau) Date: Wed Jan 25 12:01:16 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000101c5516f$3b96de90$6505a8c0@rjlaptop> More interesting info on the problem: If I execute the query directly in the "test" window of the base eGenix mxODBC Database Connection window, it works fine and returns the 20 lines expected. That could point to a problem in the rendering, which seems to be where the traceback ends. Note that within the same Zope system I also have an ODBC connection to a Sybase database, and I have successfully tested multi-line ZSQL queries there. This is the traceback: Time 2005/05/05 07:55:15.294 GMT-4 Exception Type KeyError Exception Value 'query' Traceback (innermost last): Module ZPublisher.Publish, line 101, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 39, in call_object Module Shared.DC.ZRDB.DA, line 337, in manage_test Module DocumentTemplate.DT_String, line 474, in __call__ Module DocumentTemplate.DT_In, line 602, in renderwb Module DocumentTemplate.DT_Var, line 219, in render KeyError: 'query' I don't think the following is an issue, but I'll include it for completeness.I am also getting the following iODBC warnings and errors in the Zope console log, which are related to the ODBC parameters being passed by iODBC. Note that these errors also appear for all of the successful queries. [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (Setup). [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (UsageCount). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Timeout). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Reuse). As for the ZSQL snippet from the template... Since there's no template involved yet (I'm still testing directly from the ZSQL method), I assume you mean the SQL code? select h.host_name, s.system_name, s.system_handle, count(*) from terminal t, system_map s, host h where t.system_index = s.system_index and s.host_index = h.host_index group by s.system_name order by h.host_name Nothing complicated here. There are no parameters passed to the query. RJ -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: May 5, 2005 5:38 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: Re: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is > 2.3.4 with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ---------------------------------------------------------------------- > -- > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 16:00:32 2005 From: charlie at egenix.com (Charlie Clark) Date: Wed Jan 25 12:01:16 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000101c5516f$3b96de90$6505a8c0@rjlaptop> References: <000101c5516f$3b96de90$6505a8c0@rjlaptop> Message-ID: <20050505150032.644.1@bepc.1115296715.fake> On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base eGenix > mxODBC Database Connection window, it works fine and returns the 20 > lines expected. That could point to a problem in the rendering, which > seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection to > a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 10:22:17 2005 From: rj at maxxian.com (RJ Juneau) Date: Wed Jan 25 12:01:16 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505150032.644.1@bepc.1115296715.fake> Message-ID: <000201c55175$75bcad10$6505a8c0@rjlaptop> At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 11:47:14 2005 From: rj at maxxian.com (RJ Juneau) Date: Wed Jan 25 12:01:16 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c55181$549be0e0$6505a8c0@rjlaptop> Charlie, I found a fix. Here it is in case anyone else runs into this. You were correct - the problem is in another part of Zope. Based on your feedback, I did a bit more searching and found something here: http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. html The problem appears to be in Zope versions after 2.7.0. I'm running 2.7.6, and the post indicates that it also happens in 2.7.4. The solution: Edit file /lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. There are two lines in the file that start with . Edit them as follows: Change first line to: Change second line to: Just to be after, I shut down Zope before I made the changes and restarted it after. Thanks for the help! RJ -----Original Message----- From: RJ Juneau [mailto:rj@maxxian.com] Sent: May 5, 2005 9:22 AM To: 'Charlie Clark' Cc: 'egenix-users@lists.egenix.com' Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 17:57:25 2005 From: charlie at egenix.com (Charlie Clark) Date: Wed Jan 25 12:01:16 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <20050505165725.3380.2@bepc.1115296715.fake> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Thu May 5 09:15:21 2005 From: charlie at egenix.com (Charlie Clark) Date: Wed Jan 25 12:01:16 2006 Subject: [Zope-DB] RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <000001c55185$41477730$6b00a8c0@fonacier.local> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________ Zope-DB mailing list Zope-DB@zope.org http://mail.zope.org/mailman/listinfo/zope-db From rj at maxxian.com Thu May 5 12:38:00 2005 From: rj at maxxian.com (RJ Juneau) Date: Wed Jan 25 12:01:16 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000001c55188$6b841eb0$6505a8c0@rjlaptop> I just double-checked. Zope-2.7.6-final. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 12:49:16 2005 From: rj at maxxian.com (RJ Juneau) Date: Wed Jan 25 12:01:16 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000501c55189$fe149ba0$6505a8c0@rjlaptop> Charlie, The fix has only been applied for 2.7.7, 2.8b2. The info is in the original bug report which is closed and can be found here: http://www.zope.org/Collectors/Zope/1745 RJ -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Fri May 6 11:50:09 2005 From: rj at maxxian.com (RJ Juneau) Date: Wed Jan 25 12:01:16 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC Message-ID: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Still on eval for the product. I cannot get a stable connection to Sybase via the iODBC drivers. - The Sybase ODBC connection - including a query - have been verified at the iODBC level. - The setup is already working well for ODBC connection to MySQL. Symptoms include: - If I click on "Open Connection", it still comes back with "Connection Closed" when I go to a ZSQL method - Using 'Connect on Demand' is not working either. - Clicking "Open Connection" gives me the following error: Connection string: DSN=lixbox_sybase; UID=sa; PWD=XXXXXXX Connection pool entry: 0 Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection rejected by data source', 7952) The odbc.ini definition for DSN "lixbox_sybase" is as follows: [lixbox_sybase] JetFix = No NoRowSetSizeLimit = No Description = Test connection to listbox Options = LIXBOX DSQUERY = SQLSERVER TDSHOST = lixbox TDSPORT = 5000 TDSVER = 5.0 SQLSERVER_CATALOG = N CURSOR_SENSITIVITY = LOW UserName = sa Password = XXXXXXXX ServerType = Sybase 10/11/12 Driver = /opt/openlink/lib/sql_mt_lt.so Database = pubs2 ReadOnly = no NoAutoCommit = No NoLoginBox = No FetchBufferSize = 60 Other relevant data: - Connecting via OpenLink's iODBC - Zope 2.7.6-final - Python 2.3.4 - Connection to Sybase has been successfully tested with iODBC, including issuing a query - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC connection RJ Juneau Chief Technology Officer Maxxian Integration Inc. 155 Westhampton Drive Thornhill, Ontario Canada L4J 7X2 E-mail: rj@maxxian.com Phone: +1 905 482 9429 Cell: +1 416 897 6682 Toll free: +1 866 758 9161 Fax: +1 647 722 2038 -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050506/aef33361/attachment-0050.htm From mal at egenix.com Fri May 6 18:27:37 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Jan 25 12:01:16 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC In-Reply-To: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> References: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Message-ID: <427B8CE9.1010601@egenix.com> RJ Juneau wrote: > Still on eval for the product. > > I cannot get a stable connection to Sybase via the iODBC drivers. > > - The Sybase ODBC connection - including a query - have been verified at > the iODBC level. > - The setup is already working well for ODBC connection to MySQL. > > Symptoms include: > > - If I click on "Open Connection", it still comes back with "Connection > Closed" when I go to a ZSQL method > - Using 'Connect on Demand' is not working either. > - Clicking "Open Connection" gives me the following error: > > Connection string: DSN=lixbox_sybase; > UID=sa; > PWD=XXXXXXX Try writing the connection string on one line and without whitespace. ODBC drivers sometimes have problems with this. > Connection pool entry: 0 > Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection > rejected by data source', 7952) This is a generic error that relates to authentication or firewall problems. It is possible that turning on ODBC tracing the ODBC manager will give more clues as to the real cause of the problem. > The odbc.ini definition for DSN "lixbox_sybase" is as follows: > > [lixbox_sybase] > JetFix = No > NoRowSetSizeLimit = No > Description = Test connection to listbox > Options = LIXBOX > DSQUERY = SQLSERVER > TDSHOST = lixbox > TDSPORT = 5000 > TDSVER = 5.0 > SQLSERVER_CATALOG = N > CURSOR_SENSITIVITY = LOW > UserName = sa > Password = XXXXXXXX > ServerType = Sybase 10/11/12 > Driver = /opt/openlink/lib/sql_mt_lt.so > Database = pubs2 > ReadOnly = no > NoAutoCommit = No > NoLoginBox = No > FetchBufferSize = 60 > > > Other relevant data: > - Connecting via OpenLink's iODBC > - Zope 2.7.6-final > - Python 2.3.4 > - Connection to Sybase has been successfully tested with iODBC, > including issuing a query > - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC > connection > > > > RJ Juneau > Chief Technology Officer > Maxxian Integration Inc. > 155 Westhampton Drive > Thornhill, Ontario > Canada L4J 7X2 > E-mail: rj@maxxian.com > Phone: +1 905 482 9429 > Cell: +1 416 897 6682 > Toll free: +1 866 758 9161 > Fax: +1 647 722 2038 > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 06 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From calisp at gmail.com Sun May 15 23:49:03 2005 From: calisp at gmail.com (calisp@gmail.com) Date: Wed Jan 25 12:01:16 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK Message-ID: Hi, I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the following error... 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the last phase of a two-phase commit. This shouldn't happen. Traceback (most recent call last): File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one jar.tpc_finish(self) File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish try: self._finish() File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could not perform COMMIT or ROLLBACK', 1023) What could be causing this? Can I get the mxODBCZopeDA source from somewhere? It would make debugging this much easier. Thanks, Calisp. From mal at egenix.com Mon May 16 13:52:12 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Jan 25 12:01:16 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK In-Reply-To: References: Message-ID: <42887B5C.4010109@egenix.com> calisp@gmail.com wrote: > Hi, > > I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with > unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the > following error... > > 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the > last phase of a two-phase commit. This shouldn't happen. > Traceback (most recent call last): > File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one > jar.tpc_finish(self) > File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish > try: self._finish() > File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish > File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler > ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could > not perform COMMIT or ROLLBACK', 1023) You should have a look at the database logs to see what prevented the commit from being completed. > What could be causing this? Hard to say: mxODBCZopeDA is trying to commit the transaction, but the driver or database failed to complete the request. The above error was generated by the ODBC driver. This could be network or DNS problems, or be related to a bug in FreeTDS (which is getting more stable with every new release, but should still be considered beta quality software at the moment). > Can I get the mxODBCZopeDA source from > somewhere? It would make debugging this much easier. Getting the source is not an option and won't help much either since the source of the problem is not mxODBCZopeDA. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 16 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Sun May 1 21:29:25 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Jan 25 16:01:14 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <427259F3.4090806@egenix.com> References: <20050427130906.52878.qmail@web30008.mail.mud.yahoo.com> <427259F3.4090806@egenix.com> Message-ID: <42752005.7080904@egenix.com> M.-A. Lemburg wrote: > David Rushby wrote: > >> --- "M.-A. Lemburg" wrote: >> >>> Are you using the standard mxDateTime build or one >>> with WANT_SUBCLASSABLE_TYPES defined... >> >> >> >> Presumably "the standard", since I just built with 'py24d setup.py >> build', making no attempt to enable special directives. >> >> >>> ... (mxDateTime_Deallocate is only used by the latter)? >> >> >> >> That's true in 2.1.0-2005-04-15, but not in 2.1.0b5. >> >> >>> In any case, please try our latest snapshot: >>> >>> >> >> http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-04-15.zip >> >>> to see if that makes any difference. >> >> >> >> I can't build it out of the box: > > > Hmm, looks like distutils' sdist command doesn't like our new > repository layout which uses symlinks (after we've switched to > subversion). > > We'll have to debug distutils first, I guess :-( Ok, we've found the problem and fixed it. Here's the new release (which does build out of the box at least on our boxes ;-): http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 01 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From davidrushby at yahoo.com Mon May 2 15:49:53 2005 From: davidrushby at yahoo.com (David Rushby) Date: Wed Jan 25 16:01:14 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Ok, we've found the problem and fixed it. Here's the new > release (which does build out of the box at least on our > boxes ;-): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip It does build now, but: py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" still behaves as it did when I submitted my original message: Fatal Python error: UNREF invalid object Aborted This is the same debug build of Python 2.4.1 that I was previously using, running the same configuration (CentOS Linux 4.0/i386, everything compiled with GCC 3.4.3). Have you examined my original claim as to the cause of the bug? __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 10:21:55 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Jan 25 16:01:14 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> References: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> Message-ID: <42772693.8050306@egenix.com> David Rushby wrote: > --- "M.-A. Lemburg" wrote: > >>Ok, we've found the problem and fixed it. Here's the new >>release (which does build out of the box at least on our >>boxes ;-): >> >> > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip > > It does build now, but: > py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" > still behaves as it did when I submitted my original message: > Fatal Python error: UNREF invalid object > Aborted > > This is the same debug build of Python 2.4.1 that I was previously > using, running the same configuration (CentOS Linux 4.0/i386, > everything compiled with GCC 3.4.3). > > Have you examined my original claim as to the cause of the bug? No. We haven't had time for looking into it. I'm not sure whether your analysis of the problem is correct: if you don't define WANT_SUBCLASSABLE_TYPES, the API mxDateTime_Deallocate() is neither defined nor used. Furthermore, PyObject_Del() is only called by mxDateTime_Free() if you have explicitely edited mxDateTime.c to disabled the free list #defines. In a standard build, PyObject_Del() is only called at module finalization time. Note that the reason we call mxDateTime_Free() in the constructor is that we don't want the destructor of the object to be called. Py_DECREF() would call the destructor (mxDateTime_Deallocate). It is possible that the debug code in Python complains about the refcount in the object not being 0 at the time the object is finalized (module finalization time), but I don't see any such checks in PyObject_Free() (which is what PyObject_Del() maps to). Again, all of this does not happen in regular non-debug Python builds. Please be aware that we don't support debug builds, so fixing the problem (if there is one - gcc has some serious optimization problems on some combinations of platform and version) will take a while. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 09:27:37 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Wed Jan 25 16:01:14 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 Message-ID: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Hi all- I am trying to build the mx-base package, v.2.0.6. This will be used with postgresql 7.3.9, psycopg 1.1.18, and Roundup 0.8.2. RHEL 3.0 Python 2.3 egenix-mx-base-2.0.6.tar.gz I performed a: /usr/local/bin/python2.3 setup.py install Everything looks proper with the exeception of this series of warning statements: ----------------- gcc -pthread -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fno-strict-aliasing -fPIC -Imx/BeeBase/mxBeeBase -I/usr/local/incl ude/python2.3 -I/usr/local/include -c mx/BeeBase/mxBeeBase/btr.c -o build/temp.linux-i686-2.3/mx/BeeBase/mxBeeBase/mxBeeBa se/mx/BeeBase/mxBeeBase/btr.o mx/BeeBase/mxBeeBase/btr.c: In function `dumpBuf': mx/BeeBase/mxBeeBase/btr.c:249: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:250: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:255: warning: unsigned int format, long unsigned int arg (arg 4) mx/BeeBase/mxBeeBase/btr.c:256: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c: In function `_validateTree': mx/BeeBase/mxBeeBase/btr.c:330: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:337: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:339: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:349: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:351: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 3) creating build/lib.linux-i686-2.3/mx/BeeBase creating build/lib.linux-i686-2.3/mx/BeeBase/mxBeeBase -------------- Would someone be kind enough to let me know whether these messages were expected, and if not, how I might resolve these? Thanks! DC __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 22:06:33 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Jan 25 16:01:14 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> References: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Message-ID: <4277CBB9.8020302@egenix.com> Dianne Chen wrote: > Hi all- > > I am trying to build the mx-base package, v.2.0.6. > This will be used with postgresql 7.3.9, psycopg > 1.1.18, and Roundup 0.8.2. > > RHEL 3.0 > Python 2.3 > egenix-mx-base-2.0.6.tar.gz > > I performed a: > > /usr/local/bin/python2.3 setup.py install > > Everything looks proper with the exeception of this > series of warning statements: > > ----------------- > ... > -------------- > > Would someone be kind enough to let me know whether > these messages were expected, and if not, how I might > resolve these? These warning can safely be ignored. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 13:41:14 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Wed Jan 25 16:01:14 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: 6667 Message-ID: <20050503194114.72091.qmail@web31414.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Dianne Chen wrote: > > Hi all- > > > > I am trying to build the mx-base package, v.2.0.6. > > This will be used with postgresql 7.3.9, psycopg > > 1.1.18, and Roundup 0.8.2. > > > > RHEL 3.0 > > Python 2.3 > > egenix-mx-base-2.0.6.tar.gz > > > > I performed a: > > > > /usr/local/bin/python2.3 setup.py install > > > > Everything looks proper with the exeception of > this > > series of warning statements: > > > > ----------------- > > ... > > -------------- > > > > Would someone be kind enough to let me know > whether > > these messages were expected, and if not, how I > might > > resolve these? > > These warning can safely be ignored. > > -- > Marc-Andre Lemburg > eGenix.com > Marc- Thank you very much for the reply. It helps greatly. With kind regards, DC __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From davidrushby at yahoo.com Tue May 3 17:18:46 2005 From: davidrushby at yahoo.com (David Rushby) Date: Wed Jan 25 16:01:14 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050503231846.35012.qmail@web30009.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > I'm not sure whether your analysis of the problem is correct... Indeed, my original analysis wasn't correct; I think this one is. The fatal error I'm complaining about only arises if the arguments to DateTime.DateTime are invalid, so that the object is deallocated in the onError block of mxDateTime_FromDateAndTime. If the object is created successfully, and later deallocated by Python's garbage collector, the fatal error doesn't arise. Here's my analysis of the problem: --- If the debugging directive Py_TRACE_REFS is enabled, as it is in my case, the Python interpreter maintains a doubly linked list of all Python objects (named refchain) via the _ob_next and _ob_prev pointers added to PyObject via _PyObject_HEAD_EXTRA. Each object is inserted into refchain by the _Py_AddToAllObjects call in _Py_NewReference, and removed from refchain by the _Py_ForgetReference call in _Py_Dealloc. _Py_ForgetReference performs an integrity check on the object being deallocated (op) to make sure that its neighbors in refchain recognize it. Specifically, _Py_ForgetReference verifies that the _ob_next pointer of the previous object in refchain (op->_ob_prev->_ob_next) points to op, and that the _ob_prev pointer of the next object in refchain (op->_ob_next->_ob_prev) points to op. If either of those conditions is false, the interpreter raises the fatal error I'm seeing. After mxDateTime_New pulls an mxDateTimeObject out of the free list, it calls _Py_NewReference on that object to transform it from a "conceptually deallocated" object to a "conceptually allocated" one. _Py_NewReference inserts the object into refchain. Later, when the object is being "conceptually deallocated", it should be removed from refchain with _Py_ForgetReference. The version of _Py_Dealloc that's active when Py_TRACE_REFS is enabled does this (_Py_Dealloc is the element of Py_DECREF that performs the actual destruction). _Py_Dealloc first calls _Py_ForgetReference to remove the object from refchain, then calls the object's destructor (op->ob_type->tp_dealloc). If WANT_SUBCLASSABLE_TYPES is not defined (it is not in my case), the destructor for mxDateTime_Type is mxDateTime_Free. So, if a DateTime object is deallocated normally, as a result of its reference count falling to zero, _Py_Dealloc is called on the object, which first removes it from refchain, then passes it to mxDateTime_Free. If a DateTime object is destroyed prematurely, as a result of invalid arguments to its destructor, the onError handler calls mxDateTime_Free, so the object is "conceptually deallocated" (placed in the free list), *but* the object is not removed from refchain. So if a refchain-membership-integrity-check is performed on the object in question or one of its immediate neighbors in refchain, that integrity check fails, leading to the fatal error. --- The solution is to 'Py_DECREF(...)' the object in the onError handler of its constructor, instead of passing the object directly to mxDateTime_Free. That change solves two problems: 1) It causes _Py_Dealloc to execute, which in turn executes _Py_ForgetReference, so the object is removed from refchain, as it should be. 2) At present, objects that are created successfully and later deallocated by normal reference count mechanics have a reference count of 0 when they enter the free list, whereas objects whose constructors abort their creation due to invalid arguments have a reference count of 1 when they enter the free list. Although AFAIK this doesn't cause an actual execution problem (because the object's reference count is *explicitly set to 1* rather than *incremented by 1* when the object is later "conceptually allocated" by _Py_NewReference), it is likely to confuse future maintainers and thereby lead to the introduction of an actual execution problem. I assume that if you agree that this is a reasonable solution, you'll want to apply the change not only to mxDateTime_FromDateAndTime, but to all similar constructors in mxDateTime.c. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From rj at maxxian.com Thu May 5 01:57:40 2005 From: rj at maxxian.com (RJ Juneau) Date: Wed Jan 25 16:01:14 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c5512e$f72798c0$6505a8c0@rjlaptop> I'm on the 30 day evaluation for mxodbc_zope_da. I'm getting the following error when I submit some queries: Error Type: KeyError Error Value: 'query' I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 with UCS4. The error seems to be caused by multiple rows being returned. I did see an earlier posting with the same error message. The response suggested a template error, but this is clearly not the case here. The additional evidence I've gathered so far: - I'm running the test directly from the ZSQL method, so there's no template involved. - If I use the same query with an additional "where" clause to ensure that only one row is returned, it works - If I use a value in the 'where' clause with no rows returned, it works - The same ZSQL query is being used on a Windows machine running Zope and the free ZODBC module without a problem - The query has been verified directly in mysql-client-browser Other info: - The database is MySQL 4.1.10A-0 - iODBC is the DB driver RJ Juneau -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050505/68d278bf/attachment-0051.htm From mal at egenix.com Thu May 5 12:37:43 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Jan 25 16:01:14 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c5512e$f72798c0$6505a8c0@rjlaptop> References: <000301c5512e$f72798c0$6505a8c0@rjlaptop> Message-ID: <4279E967.6010904@egenix.com> RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 > with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 09:37:42 2005 From: rj at maxxian.com (RJ Juneau) Date: Wed Jan 25 16:01:14 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000101c5516f$3b96de90$6505a8c0@rjlaptop> More interesting info on the problem: If I execute the query directly in the "test" window of the base eGenix mxODBC Database Connection window, it works fine and returns the 20 lines expected. That could point to a problem in the rendering, which seems to be where the traceback ends. Note that within the same Zope system I also have an ODBC connection to a Sybase database, and I have successfully tested multi-line ZSQL queries there. This is the traceback: Time 2005/05/05 07:55:15.294 GMT-4 Exception Type KeyError Exception Value 'query' Traceback (innermost last): Module ZPublisher.Publish, line 101, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 39, in call_object Module Shared.DC.ZRDB.DA, line 337, in manage_test Module DocumentTemplate.DT_String, line 474, in __call__ Module DocumentTemplate.DT_In, line 602, in renderwb Module DocumentTemplate.DT_Var, line 219, in render KeyError: 'query' I don't think the following is an issue, but I'll include it for completeness.I am also getting the following iODBC warnings and errors in the Zope console log, which are related to the ODBC parameters being passed by iODBC. Note that these errors also appear for all of the successful queries. [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (Setup). [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (UsageCount). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Timeout). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Reuse). As for the ZSQL snippet from the template... Since there's no template involved yet (I'm still testing directly from the ZSQL method), I assume you mean the SQL code? select h.host_name, s.system_name, s.system_handle, count(*) from terminal t, system_map s, host h where t.system_index = s.system_index and s.host_index = h.host_index group by s.system_name order by h.host_name Nothing complicated here. There are no parameters passed to the query. RJ -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: May 5, 2005 5:38 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: Re: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is > 2.3.4 with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ---------------------------------------------------------------------- > -- > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 16:00:32 2005 From: charlie at egenix.com (Charlie Clark) Date: Wed Jan 25 16:01:14 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000101c5516f$3b96de90$6505a8c0@rjlaptop> References: <000101c5516f$3b96de90$6505a8c0@rjlaptop> Message-ID: <20050505150032.644.1@bepc.1115296715.fake> On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base eGenix > mxODBC Database Connection window, it works fine and returns the 20 > lines expected. That could point to a problem in the rendering, which > seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection to > a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 10:22:17 2005 From: rj at maxxian.com (RJ Juneau) Date: Wed Jan 25 16:01:14 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505150032.644.1@bepc.1115296715.fake> Message-ID: <000201c55175$75bcad10$6505a8c0@rjlaptop> At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 11:47:14 2005 From: rj at maxxian.com (RJ Juneau) Date: Wed Jan 25 16:01:14 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c55181$549be0e0$6505a8c0@rjlaptop> Charlie, I found a fix. Here it is in case anyone else runs into this. You were correct - the problem is in another part of Zope. Based on your feedback, I did a bit more searching and found something here: http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. html The problem appears to be in Zope versions after 2.7.0. I'm running 2.7.6, and the post indicates that it also happens in 2.7.4. The solution: Edit file /lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. There are two lines in the file that start with . Edit them as follows: Change first line to: Change second line to: Just to be after, I shut down Zope before I made the changes and restarted it after. Thanks for the help! RJ -----Original Message----- From: RJ Juneau [mailto:rj@maxxian.com] Sent: May 5, 2005 9:22 AM To: 'Charlie Clark' Cc: 'egenix-users@lists.egenix.com' Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 17:57:25 2005 From: charlie at egenix.com (Charlie Clark) Date: Wed Jan 25 16:01:14 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <20050505165725.3380.2@bepc.1115296715.fake> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Thu May 5 09:15:21 2005 From: charlie at egenix.com (Charlie Clark) Date: Wed Jan 25 16:01:14 2006 Subject: [Zope-DB] RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <000001c55185$41477730$6b00a8c0@fonacier.local> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________ Zope-DB mailing list Zope-DB@zope.org http://mail.zope.org/mailman/listinfo/zope-db From rj at maxxian.com Thu May 5 12:38:00 2005 From: rj at maxxian.com (RJ Juneau) Date: Wed Jan 25 16:01:14 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000001c55188$6b841eb0$6505a8c0@rjlaptop> I just double-checked. Zope-2.7.6-final. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 12:49:16 2005 From: rj at maxxian.com (RJ Juneau) Date: Wed Jan 25 16:01:14 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000501c55189$fe149ba0$6505a8c0@rjlaptop> Charlie, The fix has only been applied for 2.7.7, 2.8b2. The info is in the original bug report which is closed and can be found here: http://www.zope.org/Collectors/Zope/1745 RJ -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Fri May 6 11:50:09 2005 From: rj at maxxian.com (RJ Juneau) Date: Wed Jan 25 16:01:14 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC Message-ID: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Still on eval for the product. I cannot get a stable connection to Sybase via the iODBC drivers. - The Sybase ODBC connection - including a query - have been verified at the iODBC level. - The setup is already working well for ODBC connection to MySQL. Symptoms include: - If I click on "Open Connection", it still comes back with "Connection Closed" when I go to a ZSQL method - Using 'Connect on Demand' is not working either. - Clicking "Open Connection" gives me the following error: Connection string: DSN=lixbox_sybase; UID=sa; PWD=XXXXXXX Connection pool entry: 0 Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection rejected by data source', 7952) The odbc.ini definition for DSN "lixbox_sybase" is as follows: [lixbox_sybase] JetFix = No NoRowSetSizeLimit = No Description = Test connection to listbox Options = LIXBOX DSQUERY = SQLSERVER TDSHOST = lixbox TDSPORT = 5000 TDSVER = 5.0 SQLSERVER_CATALOG = N CURSOR_SENSITIVITY = LOW UserName = sa Password = XXXXXXXX ServerType = Sybase 10/11/12 Driver = /opt/openlink/lib/sql_mt_lt.so Database = pubs2 ReadOnly = no NoAutoCommit = No NoLoginBox = No FetchBufferSize = 60 Other relevant data: - Connecting via OpenLink's iODBC - Zope 2.7.6-final - Python 2.3.4 - Connection to Sybase has been successfully tested with iODBC, including issuing a query - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC connection RJ Juneau Chief Technology Officer Maxxian Integration Inc. 155 Westhampton Drive Thornhill, Ontario Canada L4J 7X2 E-mail: rj@maxxian.com Phone: +1 905 482 9429 Cell: +1 416 897 6682 Toll free: +1 866 758 9161 Fax: +1 647 722 2038 -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050506/aef33361/attachment-0051.htm From mal at egenix.com Fri May 6 18:27:37 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Jan 25 16:01:14 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC In-Reply-To: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> References: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Message-ID: <427B8CE9.1010601@egenix.com> RJ Juneau wrote: > Still on eval for the product. > > I cannot get a stable connection to Sybase via the iODBC drivers. > > - The Sybase ODBC connection - including a query - have been verified at > the iODBC level. > - The setup is already working well for ODBC connection to MySQL. > > Symptoms include: > > - If I click on "Open Connection", it still comes back with "Connection > Closed" when I go to a ZSQL method > - Using 'Connect on Demand' is not working either. > - Clicking "Open Connection" gives me the following error: > > Connection string: DSN=lixbox_sybase; > UID=sa; > PWD=XXXXXXX Try writing the connection string on one line and without whitespace. ODBC drivers sometimes have problems with this. > Connection pool entry: 0 > Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection > rejected by data source', 7952) This is a generic error that relates to authentication or firewall problems. It is possible that turning on ODBC tracing the ODBC manager will give more clues as to the real cause of the problem. > The odbc.ini definition for DSN "lixbox_sybase" is as follows: > > [lixbox_sybase] > JetFix = No > NoRowSetSizeLimit = No > Description = Test connection to listbox > Options = LIXBOX > DSQUERY = SQLSERVER > TDSHOST = lixbox > TDSPORT = 5000 > TDSVER = 5.0 > SQLSERVER_CATALOG = N > CURSOR_SENSITIVITY = LOW > UserName = sa > Password = XXXXXXXX > ServerType = Sybase 10/11/12 > Driver = /opt/openlink/lib/sql_mt_lt.so > Database = pubs2 > ReadOnly = no > NoAutoCommit = No > NoLoginBox = No > FetchBufferSize = 60 > > > Other relevant data: > - Connecting via OpenLink's iODBC > - Zope 2.7.6-final > - Python 2.3.4 > - Connection to Sybase has been successfully tested with iODBC, > including issuing a query > - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC > connection > > > > RJ Juneau > Chief Technology Officer > Maxxian Integration Inc. > 155 Westhampton Drive > Thornhill, Ontario > Canada L4J 7X2 > E-mail: rj@maxxian.com > Phone: +1 905 482 9429 > Cell: +1 416 897 6682 > Toll free: +1 866 758 9161 > Fax: +1 647 722 2038 > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 06 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From calisp at gmail.com Sun May 15 23:49:03 2005 From: calisp at gmail.com (calisp@gmail.com) Date: Wed Jan 25 16:01:14 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK Message-ID: Hi, I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the following error... 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the last phase of a two-phase commit. This shouldn't happen. Traceback (most recent call last): File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one jar.tpc_finish(self) File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish try: self._finish() File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could not perform COMMIT or ROLLBACK', 1023) What could be causing this? Can I get the mxODBCZopeDA source from somewhere? It would make debugging this much easier. Thanks, Calisp. From mal at egenix.com Mon May 16 13:52:12 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Jan 25 16:01:15 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK In-Reply-To: References: Message-ID: <42887B5C.4010109@egenix.com> calisp@gmail.com wrote: > Hi, > > I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with > unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the > following error... > > 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the > last phase of a two-phase commit. This shouldn't happen. > Traceback (most recent call last): > File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one > jar.tpc_finish(self) > File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish > try: self._finish() > File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish > File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler > ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could > not perform COMMIT or ROLLBACK', 1023) You should have a look at the database logs to see what prevented the commit from being completed. > What could be causing this? Hard to say: mxODBCZopeDA is trying to commit the transaction, but the driver or database failed to complete the request. The above error was generated by the ODBC driver. This could be network or DNS problems, or be related to a bug in FreeTDS (which is getting more stable with every new release, but should still be considered beta quality software at the moment). > Can I get the mxODBCZopeDA source from > somewhere? It would make debugging this much easier. Getting the source is not an option and won't help much either since the source of the problem is not mxODBCZopeDA. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 16 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Sun May 1 21:29:25 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Jan 25 20:01:06 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <427259F3.4090806@egenix.com> References: <20050427130906.52878.qmail@web30008.mail.mud.yahoo.com> <427259F3.4090806@egenix.com> Message-ID: <42752005.7080904@egenix.com> M.-A. Lemburg wrote: > David Rushby wrote: > >> --- "M.-A. Lemburg" wrote: >> >>> Are you using the standard mxDateTime build or one >>> with WANT_SUBCLASSABLE_TYPES defined... >> >> >> >> Presumably "the standard", since I just built with 'py24d setup.py >> build', making no attempt to enable special directives. >> >> >>> ... (mxDateTime_Deallocate is only used by the latter)? >> >> >> >> That's true in 2.1.0-2005-04-15, but not in 2.1.0b5. >> >> >>> In any case, please try our latest snapshot: >>> >>> >> >> http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-04-15.zip >> >>> to see if that makes any difference. >> >> >> >> I can't build it out of the box: > > > Hmm, looks like distutils' sdist command doesn't like our new > repository layout which uses symlinks (after we've switched to > subversion). > > We'll have to debug distutils first, I guess :-( Ok, we've found the problem and fixed it. Here's the new release (which does build out of the box at least on our boxes ;-): http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 01 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From davidrushby at yahoo.com Mon May 2 15:49:53 2005 From: davidrushby at yahoo.com (David Rushby) Date: Wed Jan 25 20:01:07 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Ok, we've found the problem and fixed it. Here's the new > release (which does build out of the box at least on our > boxes ;-): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip It does build now, but: py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" still behaves as it did when I submitted my original message: Fatal Python error: UNREF invalid object Aborted This is the same debug build of Python 2.4.1 that I was previously using, running the same configuration (CentOS Linux 4.0/i386, everything compiled with GCC 3.4.3). Have you examined my original claim as to the cause of the bug? __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 10:21:55 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Jan 25 20:01:07 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> References: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> Message-ID: <42772693.8050306@egenix.com> David Rushby wrote: > --- "M.-A. Lemburg" wrote: > >>Ok, we've found the problem and fixed it. Here's the new >>release (which does build out of the box at least on our >>boxes ;-): >> >> > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip > > It does build now, but: > py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" > still behaves as it did when I submitted my original message: > Fatal Python error: UNREF invalid object > Aborted > > This is the same debug build of Python 2.4.1 that I was previously > using, running the same configuration (CentOS Linux 4.0/i386, > everything compiled with GCC 3.4.3). > > Have you examined my original claim as to the cause of the bug? No. We haven't had time for looking into it. I'm not sure whether your analysis of the problem is correct: if you don't define WANT_SUBCLASSABLE_TYPES, the API mxDateTime_Deallocate() is neither defined nor used. Furthermore, PyObject_Del() is only called by mxDateTime_Free() if you have explicitely edited mxDateTime.c to disabled the free list #defines. In a standard build, PyObject_Del() is only called at module finalization time. Note that the reason we call mxDateTime_Free() in the constructor is that we don't want the destructor of the object to be called. Py_DECREF() would call the destructor (mxDateTime_Deallocate). It is possible that the debug code in Python complains about the refcount in the object not being 0 at the time the object is finalized (module finalization time), but I don't see any such checks in PyObject_Free() (which is what PyObject_Del() maps to). Again, all of this does not happen in regular non-debug Python builds. Please be aware that we don't support debug builds, so fixing the problem (if there is one - gcc has some serious optimization problems on some combinations of platform and version) will take a while. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 09:27:37 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Wed Jan 25 20:01:07 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 Message-ID: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Hi all- I am trying to build the mx-base package, v.2.0.6. This will be used with postgresql 7.3.9, psycopg 1.1.18, and Roundup 0.8.2. RHEL 3.0 Python 2.3 egenix-mx-base-2.0.6.tar.gz I performed a: /usr/local/bin/python2.3 setup.py install Everything looks proper with the exeception of this series of warning statements: ----------------- gcc -pthread -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fno-strict-aliasing -fPIC -Imx/BeeBase/mxBeeBase -I/usr/local/incl ude/python2.3 -I/usr/local/include -c mx/BeeBase/mxBeeBase/btr.c -o build/temp.linux-i686-2.3/mx/BeeBase/mxBeeBase/mxBeeBa se/mx/BeeBase/mxBeeBase/btr.o mx/BeeBase/mxBeeBase/btr.c: In function `dumpBuf': mx/BeeBase/mxBeeBase/btr.c:249: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:250: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:255: warning: unsigned int format, long unsigned int arg (arg 4) mx/BeeBase/mxBeeBase/btr.c:256: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c: In function `_validateTree': mx/BeeBase/mxBeeBase/btr.c:330: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:337: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:339: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:349: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:351: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 3) creating build/lib.linux-i686-2.3/mx/BeeBase creating build/lib.linux-i686-2.3/mx/BeeBase/mxBeeBase -------------- Would someone be kind enough to let me know whether these messages were expected, and if not, how I might resolve these? Thanks! DC __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 22:06:33 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Jan 25 20:01:07 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> References: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Message-ID: <4277CBB9.8020302@egenix.com> Dianne Chen wrote: > Hi all- > > I am trying to build the mx-base package, v.2.0.6. > This will be used with postgresql 7.3.9, psycopg > 1.1.18, and Roundup 0.8.2. > > RHEL 3.0 > Python 2.3 > egenix-mx-base-2.0.6.tar.gz > > I performed a: > > /usr/local/bin/python2.3 setup.py install > > Everything looks proper with the exeception of this > series of warning statements: > > ----------------- > ... > -------------- > > Would someone be kind enough to let me know whether > these messages were expected, and if not, how I might > resolve these? These warning can safely be ignored. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 13:41:14 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Wed Jan 25 20:01:07 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: 6667 Message-ID: <20050503194114.72091.qmail@web31414.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Dianne Chen wrote: > > Hi all- > > > > I am trying to build the mx-base package, v.2.0.6. > > This will be used with postgresql 7.3.9, psycopg > > 1.1.18, and Roundup 0.8.2. > > > > RHEL 3.0 > > Python 2.3 > > egenix-mx-base-2.0.6.tar.gz > > > > I performed a: > > > > /usr/local/bin/python2.3 setup.py install > > > > Everything looks proper with the exeception of > this > > series of warning statements: > > > > ----------------- > > ... > > -------------- > > > > Would someone be kind enough to let me know > whether > > these messages were expected, and if not, how I > might > > resolve these? > > These warning can safely be ignored. > > -- > Marc-Andre Lemburg > eGenix.com > Marc- Thank you very much for the reply. It helps greatly. With kind regards, DC __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From davidrushby at yahoo.com Tue May 3 17:18:46 2005 From: davidrushby at yahoo.com (David Rushby) Date: Wed Jan 25 20:01:07 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050503231846.35012.qmail@web30009.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > I'm not sure whether your analysis of the problem is correct... Indeed, my original analysis wasn't correct; I think this one is. The fatal error I'm complaining about only arises if the arguments to DateTime.DateTime are invalid, so that the object is deallocated in the onError block of mxDateTime_FromDateAndTime. If the object is created successfully, and later deallocated by Python's garbage collector, the fatal error doesn't arise. Here's my analysis of the problem: --- If the debugging directive Py_TRACE_REFS is enabled, as it is in my case, the Python interpreter maintains a doubly linked list of all Python objects (named refchain) via the _ob_next and _ob_prev pointers added to PyObject via _PyObject_HEAD_EXTRA. Each object is inserted into refchain by the _Py_AddToAllObjects call in _Py_NewReference, and removed from refchain by the _Py_ForgetReference call in _Py_Dealloc. _Py_ForgetReference performs an integrity check on the object being deallocated (op) to make sure that its neighbors in refchain recognize it. Specifically, _Py_ForgetReference verifies that the _ob_next pointer of the previous object in refchain (op->_ob_prev->_ob_next) points to op, and that the _ob_prev pointer of the next object in refchain (op->_ob_next->_ob_prev) points to op. If either of those conditions is false, the interpreter raises the fatal error I'm seeing. After mxDateTime_New pulls an mxDateTimeObject out of the free list, it calls _Py_NewReference on that object to transform it from a "conceptually deallocated" object to a "conceptually allocated" one. _Py_NewReference inserts the object into refchain. Later, when the object is being "conceptually deallocated", it should be removed from refchain with _Py_ForgetReference. The version of _Py_Dealloc that's active when Py_TRACE_REFS is enabled does this (_Py_Dealloc is the element of Py_DECREF that performs the actual destruction). _Py_Dealloc first calls _Py_ForgetReference to remove the object from refchain, then calls the object's destructor (op->ob_type->tp_dealloc). If WANT_SUBCLASSABLE_TYPES is not defined (it is not in my case), the destructor for mxDateTime_Type is mxDateTime_Free. So, if a DateTime object is deallocated normally, as a result of its reference count falling to zero, _Py_Dealloc is called on the object, which first removes it from refchain, then passes it to mxDateTime_Free. If a DateTime object is destroyed prematurely, as a result of invalid arguments to its destructor, the onError handler calls mxDateTime_Free, so the object is "conceptually deallocated" (placed in the free list), *but* the object is not removed from refchain. So if a refchain-membership-integrity-check is performed on the object in question or one of its immediate neighbors in refchain, that integrity check fails, leading to the fatal error. --- The solution is to 'Py_DECREF(...)' the object in the onError handler of its constructor, instead of passing the object directly to mxDateTime_Free. That change solves two problems: 1) It causes _Py_Dealloc to execute, which in turn executes _Py_ForgetReference, so the object is removed from refchain, as it should be. 2) At present, objects that are created successfully and later deallocated by normal reference count mechanics have a reference count of 0 when they enter the free list, whereas objects whose constructors abort their creation due to invalid arguments have a reference count of 1 when they enter the free list. Although AFAIK this doesn't cause an actual execution problem (because the object's reference count is *explicitly set to 1* rather than *incremented by 1* when the object is later "conceptually allocated" by _Py_NewReference), it is likely to confuse future maintainers and thereby lead to the introduction of an actual execution problem. I assume that if you agree that this is a reasonable solution, you'll want to apply the change not only to mxDateTime_FromDateAndTime, but to all similar constructors in mxDateTime.c. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From rj at maxxian.com Thu May 5 01:57:40 2005 From: rj at maxxian.com (RJ Juneau) Date: Wed Jan 25 20:01:07 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c5512e$f72798c0$6505a8c0@rjlaptop> I'm on the 30 day evaluation for mxodbc_zope_da. I'm getting the following error when I submit some queries: Error Type: KeyError Error Value: 'query' I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 with UCS4. The error seems to be caused by multiple rows being returned. I did see an earlier posting with the same error message. The response suggested a template error, but this is clearly not the case here. The additional evidence I've gathered so far: - I'm running the test directly from the ZSQL method, so there's no template involved. - If I use the same query with an additional "where" clause to ensure that only one row is returned, it works - If I use a value in the 'where' clause with no rows returned, it works - The same ZSQL query is being used on a Windows machine running Zope and the free ZODBC module without a problem - The query has been verified directly in mysql-client-browser Other info: - The database is MySQL 4.1.10A-0 - iODBC is the DB driver RJ Juneau -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050505/68d278bf/attachment-0052.htm From mal at egenix.com Thu May 5 12:37:43 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Jan 25 20:01:07 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c5512e$f72798c0$6505a8c0@rjlaptop> References: <000301c5512e$f72798c0$6505a8c0@rjlaptop> Message-ID: <4279E967.6010904@egenix.com> RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 > with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 09:37:42 2005 From: rj at maxxian.com (RJ Juneau) Date: Wed Jan 25 20:01:07 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000101c5516f$3b96de90$6505a8c0@rjlaptop> More interesting info on the problem: If I execute the query directly in the "test" window of the base eGenix mxODBC Database Connection window, it works fine and returns the 20 lines expected. That could point to a problem in the rendering, which seems to be where the traceback ends. Note that within the same Zope system I also have an ODBC connection to a Sybase database, and I have successfully tested multi-line ZSQL queries there. This is the traceback: Time 2005/05/05 07:55:15.294 GMT-4 Exception Type KeyError Exception Value 'query' Traceback (innermost last): Module ZPublisher.Publish, line 101, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 39, in call_object Module Shared.DC.ZRDB.DA, line 337, in manage_test Module DocumentTemplate.DT_String, line 474, in __call__ Module DocumentTemplate.DT_In, line 602, in renderwb Module DocumentTemplate.DT_Var, line 219, in render KeyError: 'query' I don't think the following is an issue, but I'll include it for completeness.I am also getting the following iODBC warnings and errors in the Zope console log, which are related to the ODBC parameters being passed by iODBC. Note that these errors also appear for all of the successful queries. [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (Setup). [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (UsageCount). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Timeout). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Reuse). As for the ZSQL snippet from the template... Since there's no template involved yet (I'm still testing directly from the ZSQL method), I assume you mean the SQL code? select h.host_name, s.system_name, s.system_handle, count(*) from terminal t, system_map s, host h where t.system_index = s.system_index and s.host_index = h.host_index group by s.system_name order by h.host_name Nothing complicated here. There are no parameters passed to the query. RJ -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: May 5, 2005 5:38 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: Re: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is > 2.3.4 with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ---------------------------------------------------------------------- > -- > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 16:00:32 2005 From: charlie at egenix.com (Charlie Clark) Date: Wed Jan 25 20:01:07 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000101c5516f$3b96de90$6505a8c0@rjlaptop> References: <000101c5516f$3b96de90$6505a8c0@rjlaptop> Message-ID: <20050505150032.644.1@bepc.1115296715.fake> On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base eGenix > mxODBC Database Connection window, it works fine and returns the 20 > lines expected. That could point to a problem in the rendering, which > seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection to > a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 10:22:17 2005 From: rj at maxxian.com (RJ Juneau) Date: Wed Jan 25 20:01:07 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505150032.644.1@bepc.1115296715.fake> Message-ID: <000201c55175$75bcad10$6505a8c0@rjlaptop> At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 11:47:14 2005 From: rj at maxxian.com (RJ Juneau) Date: Wed Jan 25 20:01:07 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c55181$549be0e0$6505a8c0@rjlaptop> Charlie, I found a fix. Here it is in case anyone else runs into this. You were correct - the problem is in another part of Zope. Based on your feedback, I did a bit more searching and found something here: http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. html The problem appears to be in Zope versions after 2.7.0. I'm running 2.7.6, and the post indicates that it also happens in 2.7.4. The solution: Edit file /lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. There are two lines in the file that start with . Edit them as follows: Change first line to: Change second line to: Just to be after, I shut down Zope before I made the changes and restarted it after. Thanks for the help! RJ -----Original Message----- From: RJ Juneau [mailto:rj@maxxian.com] Sent: May 5, 2005 9:22 AM To: 'Charlie Clark' Cc: 'egenix-users@lists.egenix.com' Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 17:57:25 2005 From: charlie at egenix.com (Charlie Clark) Date: Wed Jan 25 20:01:07 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <20050505165725.3380.2@bepc.1115296715.fake> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Thu May 5 09:15:21 2005 From: charlie at egenix.com (Charlie Clark) Date: Wed Jan 25 20:01:07 2006 Subject: [Zope-DB] RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <000001c55185$41477730$6b00a8c0@fonacier.local> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________ Zope-DB mailing list Zope-DB@zope.org http://mail.zope.org/mailman/listinfo/zope-db From rj at maxxian.com Thu May 5 12:38:00 2005 From: rj at maxxian.com (RJ Juneau) Date: Wed Jan 25 20:01:07 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000001c55188$6b841eb0$6505a8c0@rjlaptop> I just double-checked. Zope-2.7.6-final. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 12:49:16 2005 From: rj at maxxian.com (RJ Juneau) Date: Wed Jan 25 20:01:07 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000501c55189$fe149ba0$6505a8c0@rjlaptop> Charlie, The fix has only been applied for 2.7.7, 2.8b2. The info is in the original bug report which is closed and can be found here: http://www.zope.org/Collectors/Zope/1745 RJ -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Fri May 6 11:50:09 2005 From: rj at maxxian.com (RJ Juneau) Date: Wed Jan 25 20:01:07 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC Message-ID: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Still on eval for the product. I cannot get a stable connection to Sybase via the iODBC drivers. - The Sybase ODBC connection - including a query - have been verified at the iODBC level. - The setup is already working well for ODBC connection to MySQL. Symptoms include: - If I click on "Open Connection", it still comes back with "Connection Closed" when I go to a ZSQL method - Using 'Connect on Demand' is not working either. - Clicking "Open Connection" gives me the following error: Connection string: DSN=lixbox_sybase; UID=sa; PWD=XXXXXXX Connection pool entry: 0 Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection rejected by data source', 7952) The odbc.ini definition for DSN "lixbox_sybase" is as follows: [lixbox_sybase] JetFix = No NoRowSetSizeLimit = No Description = Test connection to listbox Options = LIXBOX DSQUERY = SQLSERVER TDSHOST = lixbox TDSPORT = 5000 TDSVER = 5.0 SQLSERVER_CATALOG = N CURSOR_SENSITIVITY = LOW UserName = sa Password = XXXXXXXX ServerType = Sybase 10/11/12 Driver = /opt/openlink/lib/sql_mt_lt.so Database = pubs2 ReadOnly = no NoAutoCommit = No NoLoginBox = No FetchBufferSize = 60 Other relevant data: - Connecting via OpenLink's iODBC - Zope 2.7.6-final - Python 2.3.4 - Connection to Sybase has been successfully tested with iODBC, including issuing a query - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC connection RJ Juneau Chief Technology Officer Maxxian Integration Inc. 155 Westhampton Drive Thornhill, Ontario Canada L4J 7X2 E-mail: rj@maxxian.com Phone: +1 905 482 9429 Cell: +1 416 897 6682 Toll free: +1 866 758 9161 Fax: +1 647 722 2038 -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050506/aef33361/attachment-0052.htm From mal at egenix.com Fri May 6 18:27:37 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Jan 25 20:01:07 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC In-Reply-To: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> References: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Message-ID: <427B8CE9.1010601@egenix.com> RJ Juneau wrote: > Still on eval for the product. > > I cannot get a stable connection to Sybase via the iODBC drivers. > > - The Sybase ODBC connection - including a query - have been verified at > the iODBC level. > - The setup is already working well for ODBC connection to MySQL. > > Symptoms include: > > - If I click on "Open Connection", it still comes back with "Connection > Closed" when I go to a ZSQL method > - Using 'Connect on Demand' is not working either. > - Clicking "Open Connection" gives me the following error: > > Connection string: DSN=lixbox_sybase; > UID=sa; > PWD=XXXXXXX Try writing the connection string on one line and without whitespace. ODBC drivers sometimes have problems with this. > Connection pool entry: 0 > Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection > rejected by data source', 7952) This is a generic error that relates to authentication or firewall problems. It is possible that turning on ODBC tracing the ODBC manager will give more clues as to the real cause of the problem. > The odbc.ini definition for DSN "lixbox_sybase" is as follows: > > [lixbox_sybase] > JetFix = No > NoRowSetSizeLimit = No > Description = Test connection to listbox > Options = LIXBOX > DSQUERY = SQLSERVER > TDSHOST = lixbox > TDSPORT = 5000 > TDSVER = 5.0 > SQLSERVER_CATALOG = N > CURSOR_SENSITIVITY = LOW > UserName = sa > Password = XXXXXXXX > ServerType = Sybase 10/11/12 > Driver = /opt/openlink/lib/sql_mt_lt.so > Database = pubs2 > ReadOnly = no > NoAutoCommit = No > NoLoginBox = No > FetchBufferSize = 60 > > > Other relevant data: > - Connecting via OpenLink's iODBC > - Zope 2.7.6-final > - Python 2.3.4 > - Connection to Sybase has been successfully tested with iODBC, > including issuing a query > - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC > connection > > > > RJ Juneau > Chief Technology Officer > Maxxian Integration Inc. > 155 Westhampton Drive > Thornhill, Ontario > Canada L4J 7X2 > E-mail: rj@maxxian.com > Phone: +1 905 482 9429 > Cell: +1 416 897 6682 > Toll free: +1 866 758 9161 > Fax: +1 647 722 2038 > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 06 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From calisp at gmail.com Sun May 15 23:49:03 2005 From: calisp at gmail.com (calisp@gmail.com) Date: Wed Jan 25 20:01:07 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK Message-ID: Hi, I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the following error... 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the last phase of a two-phase commit. This shouldn't happen. Traceback (most recent call last): File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one jar.tpc_finish(self) File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish try: self._finish() File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could not perform COMMIT or ROLLBACK', 1023) What could be causing this? Can I get the mxODBCZopeDA source from somewhere? It would make debugging this much easier. Thanks, Calisp. From mal at egenix.com Mon May 16 13:52:12 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Jan 25 20:01:07 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK In-Reply-To: References: Message-ID: <42887B5C.4010109@egenix.com> calisp@gmail.com wrote: > Hi, > > I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with > unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the > following error... > > 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the > last phase of a two-phase commit. This shouldn't happen. > Traceback (most recent call last): > File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one > jar.tpc_finish(self) > File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish > try: self._finish() > File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish > File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler > ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could > not perform COMMIT or ROLLBACK', 1023) You should have a look at the database logs to see what prevented the commit from being completed. > What could be causing this? Hard to say: mxODBCZopeDA is trying to commit the transaction, but the driver or database failed to complete the request. The above error was generated by the ODBC driver. This could be network or DNS problems, or be related to a bug in FreeTDS (which is getting more stable with every new release, but should still be considered beta quality software at the moment). > Can I get the mxODBCZopeDA source from > somewhere? It would make debugging this much easier. Getting the source is not an option and won't help much either since the source of the problem is not mxODBCZopeDA. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 16 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Sun May 1 21:29:25 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Jan 26 08:06:44 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <427259F3.4090806@egenix.com> References: <20050427130906.52878.qmail@web30008.mail.mud.yahoo.com> <427259F3.4090806@egenix.com> Message-ID: <42752005.7080904@egenix.com> M.-A. Lemburg wrote: > David Rushby wrote: > >> --- "M.-A. Lemburg" wrote: >> >>> Are you using the standard mxDateTime build or one >>> with WANT_SUBCLASSABLE_TYPES defined... >> >> >> >> Presumably "the standard", since I just built with 'py24d setup.py >> build', making no attempt to enable special directives. >> >> >>> ... (mxDateTime_Deallocate is only used by the latter)? >> >> >> >> That's true in 2.1.0-2005-04-15, but not in 2.1.0b5. >> >> >>> In any case, please try our latest snapshot: >>> >>> >> >> http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-04-15.zip >> >>> to see if that makes any difference. >> >> >> >> I can't build it out of the box: > > > Hmm, looks like distutils' sdist command doesn't like our new > repository layout which uses symlinks (after we've switched to > subversion). > > We'll have to debug distutils first, I guess :-( Ok, we've found the problem and fixed it. Here's the new release (which does build out of the box at least on our boxes ;-): http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 01 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From davidrushby at yahoo.com Mon May 2 15:49:53 2005 From: davidrushby at yahoo.com (David Rushby) Date: Thu Jan 26 08:06:45 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Ok, we've found the problem and fixed it. Here's the new > release (which does build out of the box at least on our > boxes ;-): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip It does build now, but: py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" still behaves as it did when I submitted my original message: Fatal Python error: UNREF invalid object Aborted This is the same debug build of Python 2.4.1 that I was previously using, running the same configuration (CentOS Linux 4.0/i386, everything compiled with GCC 3.4.3). Have you examined my original claim as to the cause of the bug? __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 10:21:55 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Jan 26 08:06:45 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> References: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> Message-ID: <42772693.8050306@egenix.com> David Rushby wrote: > --- "M.-A. Lemburg" wrote: > >>Ok, we've found the problem and fixed it. Here's the new >>release (which does build out of the box at least on our >>boxes ;-): >> >> > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip > > It does build now, but: > py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" > still behaves as it did when I submitted my original message: > Fatal Python error: UNREF invalid object > Aborted > > This is the same debug build of Python 2.4.1 that I was previously > using, running the same configuration (CentOS Linux 4.0/i386, > everything compiled with GCC 3.4.3). > > Have you examined my original claim as to the cause of the bug? No. We haven't had time for looking into it. I'm not sure whether your analysis of the problem is correct: if you don't define WANT_SUBCLASSABLE_TYPES, the API mxDateTime_Deallocate() is neither defined nor used. Furthermore, PyObject_Del() is only called by mxDateTime_Free() if you have explicitely edited mxDateTime.c to disabled the free list #defines. In a standard build, PyObject_Del() is only called at module finalization time. Note that the reason we call mxDateTime_Free() in the constructor is that we don't want the destructor of the object to be called. Py_DECREF() would call the destructor (mxDateTime_Deallocate). It is possible that the debug code in Python complains about the refcount in the object not being 0 at the time the object is finalized (module finalization time), but I don't see any such checks in PyObject_Free() (which is what PyObject_Del() maps to). Again, all of this does not happen in regular non-debug Python builds. Please be aware that we don't support debug builds, so fixing the problem (if there is one - gcc has some serious optimization problems on some combinations of platform and version) will take a while. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 09:27:37 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Thu Jan 26 08:06:45 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 Message-ID: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Hi all- I am trying to build the mx-base package, v.2.0.6. This will be used with postgresql 7.3.9, psycopg 1.1.18, and Roundup 0.8.2. RHEL 3.0 Python 2.3 egenix-mx-base-2.0.6.tar.gz I performed a: /usr/local/bin/python2.3 setup.py install Everything looks proper with the exeception of this series of warning statements: ----------------- gcc -pthread -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fno-strict-aliasing -fPIC -Imx/BeeBase/mxBeeBase -I/usr/local/incl ude/python2.3 -I/usr/local/include -c mx/BeeBase/mxBeeBase/btr.c -o build/temp.linux-i686-2.3/mx/BeeBase/mxBeeBase/mxBeeBa se/mx/BeeBase/mxBeeBase/btr.o mx/BeeBase/mxBeeBase/btr.c: In function `dumpBuf': mx/BeeBase/mxBeeBase/btr.c:249: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:250: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:255: warning: unsigned int format, long unsigned int arg (arg 4) mx/BeeBase/mxBeeBase/btr.c:256: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c: In function `_validateTree': mx/BeeBase/mxBeeBase/btr.c:330: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:337: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:339: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:349: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:351: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 3) creating build/lib.linux-i686-2.3/mx/BeeBase creating build/lib.linux-i686-2.3/mx/BeeBase/mxBeeBase -------------- Would someone be kind enough to let me know whether these messages were expected, and if not, how I might resolve these? Thanks! DC __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 22:06:33 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Jan 26 08:06:46 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> References: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Message-ID: <4277CBB9.8020302@egenix.com> Dianne Chen wrote: > Hi all- > > I am trying to build the mx-base package, v.2.0.6. > This will be used with postgresql 7.3.9, psycopg > 1.1.18, and Roundup 0.8.2. > > RHEL 3.0 > Python 2.3 > egenix-mx-base-2.0.6.tar.gz > > I performed a: > > /usr/local/bin/python2.3 setup.py install > > Everything looks proper with the exeception of this > series of warning statements: > > ----------------- > ... > -------------- > > Would someone be kind enough to let me know whether > these messages were expected, and if not, how I might > resolve these? These warning can safely be ignored. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 13:41:14 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Thu Jan 26 08:06:46 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: 6667 Message-ID: <20050503194114.72091.qmail@web31414.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Dianne Chen wrote: > > Hi all- > > > > I am trying to build the mx-base package, v.2.0.6. > > This will be used with postgresql 7.3.9, psycopg > > 1.1.18, and Roundup 0.8.2. > > > > RHEL 3.0 > > Python 2.3 > > egenix-mx-base-2.0.6.tar.gz > > > > I performed a: > > > > /usr/local/bin/python2.3 setup.py install > > > > Everything looks proper with the exeception of > this > > series of warning statements: > > > > ----------------- > > ... > > -------------- > > > > Would someone be kind enough to let me know > whether > > these messages were expected, and if not, how I > might > > resolve these? > > These warning can safely be ignored. > > -- > Marc-Andre Lemburg > eGenix.com > Marc- Thank you very much for the reply. It helps greatly. With kind regards, DC __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From davidrushby at yahoo.com Tue May 3 17:18:46 2005 From: davidrushby at yahoo.com (David Rushby) Date: Thu Jan 26 08:06:46 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050503231846.35012.qmail@web30009.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > I'm not sure whether your analysis of the problem is correct... Indeed, my original analysis wasn't correct; I think this one is. The fatal error I'm complaining about only arises if the arguments to DateTime.DateTime are invalid, so that the object is deallocated in the onError block of mxDateTime_FromDateAndTime. If the object is created successfully, and later deallocated by Python's garbage collector, the fatal error doesn't arise. Here's my analysis of the problem: --- If the debugging directive Py_TRACE_REFS is enabled, as it is in my case, the Python interpreter maintains a doubly linked list of all Python objects (named refchain) via the _ob_next and _ob_prev pointers added to PyObject via _PyObject_HEAD_EXTRA. Each object is inserted into refchain by the _Py_AddToAllObjects call in _Py_NewReference, and removed from refchain by the _Py_ForgetReference call in _Py_Dealloc. _Py_ForgetReference performs an integrity check on the object being deallocated (op) to make sure that its neighbors in refchain recognize it. Specifically, _Py_ForgetReference verifies that the _ob_next pointer of the previous object in refchain (op->_ob_prev->_ob_next) points to op, and that the _ob_prev pointer of the next object in refchain (op->_ob_next->_ob_prev) points to op. If either of those conditions is false, the interpreter raises the fatal error I'm seeing. After mxDateTime_New pulls an mxDateTimeObject out of the free list, it calls _Py_NewReference on that object to transform it from a "conceptually deallocated" object to a "conceptually allocated" one. _Py_NewReference inserts the object into refchain. Later, when the object is being "conceptually deallocated", it should be removed from refchain with _Py_ForgetReference. The version of _Py_Dealloc that's active when Py_TRACE_REFS is enabled does this (_Py_Dealloc is the element of Py_DECREF that performs the actual destruction). _Py_Dealloc first calls _Py_ForgetReference to remove the object from refchain, then calls the object's destructor (op->ob_type->tp_dealloc). If WANT_SUBCLASSABLE_TYPES is not defined (it is not in my case), the destructor for mxDateTime_Type is mxDateTime_Free. So, if a DateTime object is deallocated normally, as a result of its reference count falling to zero, _Py_Dealloc is called on the object, which first removes it from refchain, then passes it to mxDateTime_Free. If a DateTime object is destroyed prematurely, as a result of invalid arguments to its destructor, the onError handler calls mxDateTime_Free, so the object is "conceptually deallocated" (placed in the free list), *but* the object is not removed from refchain. So if a refchain-membership-integrity-check is performed on the object in question or one of its immediate neighbors in refchain, that integrity check fails, leading to the fatal error. --- The solution is to 'Py_DECREF(...)' the object in the onError handler of its constructor, instead of passing the object directly to mxDateTime_Free. That change solves two problems: 1) It causes _Py_Dealloc to execute, which in turn executes _Py_ForgetReference, so the object is removed from refchain, as it should be. 2) At present, objects that are created successfully and later deallocated by normal reference count mechanics have a reference count of 0 when they enter the free list, whereas objects whose constructors abort their creation due to invalid arguments have a reference count of 1 when they enter the free list. Although AFAIK this doesn't cause an actual execution problem (because the object's reference count is *explicitly set to 1* rather than *incremented by 1* when the object is later "conceptually allocated" by _Py_NewReference), it is likely to confuse future maintainers and thereby lead to the introduction of an actual execution problem. I assume that if you agree that this is a reasonable solution, you'll want to apply the change not only to mxDateTime_FromDateAndTime, but to all similar constructors in mxDateTime.c. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From rj at maxxian.com Thu May 5 01:57:40 2005 From: rj at maxxian.com (RJ Juneau) Date: Thu Jan 26 08:06:46 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c5512e$f72798c0$6505a8c0@rjlaptop> I'm on the 30 day evaluation for mxodbc_zope_da. I'm getting the following error when I submit some queries: Error Type: KeyError Error Value: 'query' I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 with UCS4. The error seems to be caused by multiple rows being returned. I did see an earlier posting with the same error message. The response suggested a template error, but this is clearly not the case here. The additional evidence I've gathered so far: - I'm running the test directly from the ZSQL method, so there's no template involved. - If I use the same query with an additional "where" clause to ensure that only one row is returned, it works - If I use a value in the 'where' clause with no rows returned, it works - The same ZSQL query is being used on a Windows machine running Zope and the free ZODBC module without a problem - The query has been verified directly in mysql-client-browser Other info: - The database is MySQL 4.1.10A-0 - iODBC is the DB driver RJ Juneau -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050505/68d278bf/attachment-0053.htm From mal at egenix.com Thu May 5 12:37:43 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Jan 26 08:06:46 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c5512e$f72798c0$6505a8c0@rjlaptop> References: <000301c5512e$f72798c0$6505a8c0@rjlaptop> Message-ID: <4279E967.6010904@egenix.com> RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 > with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 09:37:42 2005 From: rj at maxxian.com (RJ Juneau) Date: Thu Jan 26 08:06:47 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000101c5516f$3b96de90$6505a8c0@rjlaptop> More interesting info on the problem: If I execute the query directly in the "test" window of the base eGenix mxODBC Database Connection window, it works fine and returns the 20 lines expected. That could point to a problem in the rendering, which seems to be where the traceback ends. Note that within the same Zope system I also have an ODBC connection to a Sybase database, and I have successfully tested multi-line ZSQL queries there. This is the traceback: Time 2005/05/05 07:55:15.294 GMT-4 Exception Type KeyError Exception Value 'query' Traceback (innermost last): Module ZPublisher.Publish, line 101, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 39, in call_object Module Shared.DC.ZRDB.DA, line 337, in manage_test Module DocumentTemplate.DT_String, line 474, in __call__ Module DocumentTemplate.DT_In, line 602, in renderwb Module DocumentTemplate.DT_Var, line 219, in render KeyError: 'query' I don't think the following is an issue, but I'll include it for completeness.I am also getting the following iODBC warnings and errors in the Zope console log, which are related to the ODBC parameters being passed by iODBC. Note that these errors also appear for all of the successful queries. [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (Setup). [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (UsageCount). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Timeout). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Reuse). As for the ZSQL snippet from the template... Since there's no template involved yet (I'm still testing directly from the ZSQL method), I assume you mean the SQL code? select h.host_name, s.system_name, s.system_handle, count(*) from terminal t, system_map s, host h where t.system_index = s.system_index and s.host_index = h.host_index group by s.system_name order by h.host_name Nothing complicated here. There are no parameters passed to the query. RJ -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: May 5, 2005 5:38 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: Re: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is > 2.3.4 with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ---------------------------------------------------------------------- > -- > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 16:00:32 2005 From: charlie at egenix.com (Charlie Clark) Date: Thu Jan 26 08:06:47 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000101c5516f$3b96de90$6505a8c0@rjlaptop> References: <000101c5516f$3b96de90$6505a8c0@rjlaptop> Message-ID: <20050505150032.644.1@bepc.1115296715.fake> On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base eGenix > mxODBC Database Connection window, it works fine and returns the 20 > lines expected. That could point to a problem in the rendering, which > seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection to > a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 10:22:17 2005 From: rj at maxxian.com (RJ Juneau) Date: Thu Jan 26 08:06:47 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505150032.644.1@bepc.1115296715.fake> Message-ID: <000201c55175$75bcad10$6505a8c0@rjlaptop> At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 11:47:14 2005 From: rj at maxxian.com (RJ Juneau) Date: Thu Jan 26 08:06:47 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c55181$549be0e0$6505a8c0@rjlaptop> Charlie, I found a fix. Here it is in case anyone else runs into this. You were correct - the problem is in another part of Zope. Based on your feedback, I did a bit more searching and found something here: http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. html The problem appears to be in Zope versions after 2.7.0. I'm running 2.7.6, and the post indicates that it also happens in 2.7.4. The solution: Edit file /lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. There are two lines in the file that start with . Edit them as follows: Change first line to: Change second line to: Just to be after, I shut down Zope before I made the changes and restarted it after. Thanks for the help! RJ -----Original Message----- From: RJ Juneau [mailto:rj@maxxian.com] Sent: May 5, 2005 9:22 AM To: 'Charlie Clark' Cc: 'egenix-users@lists.egenix.com' Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 17:57:25 2005 From: charlie at egenix.com (Charlie Clark) Date: Thu Jan 26 08:06:47 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <20050505165725.3380.2@bepc.1115296715.fake> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Thu May 5 09:15:21 2005 From: charlie at egenix.com (Charlie Clark) Date: Thu Jan 26 08:06:48 2006 Subject: [Zope-DB] RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <000001c55185$41477730$6b00a8c0@fonacier.local> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________ Zope-DB mailing list Zope-DB@zope.org http://mail.zope.org/mailman/listinfo/zope-db From rj at maxxian.com Thu May 5 12:38:00 2005 From: rj at maxxian.com (RJ Juneau) Date: Thu Jan 26 08:06:48 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000001c55188$6b841eb0$6505a8c0@rjlaptop> I just double-checked. Zope-2.7.6-final. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 12:49:16 2005 From: rj at maxxian.com (RJ Juneau) Date: Thu Jan 26 08:06:48 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000501c55189$fe149ba0$6505a8c0@rjlaptop> Charlie, The fix has only been applied for 2.7.7, 2.8b2. The info is in the original bug report which is closed and can be found here: http://www.zope.org/Collectors/Zope/1745 RJ -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Fri May 6 11:50:09 2005 From: rj at maxxian.com (RJ Juneau) Date: Thu Jan 26 08:06:48 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC Message-ID: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Still on eval for the product. I cannot get a stable connection to Sybase via the iODBC drivers. - The Sybase ODBC connection - including a query - have been verified at the iODBC level. - The setup is already working well for ODBC connection to MySQL. Symptoms include: - If I click on "Open Connection", it still comes back with "Connection Closed" when I go to a ZSQL method - Using 'Connect on Demand' is not working either. - Clicking "Open Connection" gives me the following error: Connection string: DSN=lixbox_sybase; UID=sa; PWD=XXXXXXX Connection pool entry: 0 Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection rejected by data source', 7952) The odbc.ini definition for DSN "lixbox_sybase" is as follows: [lixbox_sybase] JetFix = No NoRowSetSizeLimit = No Description = Test connection to listbox Options = LIXBOX DSQUERY = SQLSERVER TDSHOST = lixbox TDSPORT = 5000 TDSVER = 5.0 SQLSERVER_CATALOG = N CURSOR_SENSITIVITY = LOW UserName = sa Password = XXXXXXXX ServerType = Sybase 10/11/12 Driver = /opt/openlink/lib/sql_mt_lt.so Database = pubs2 ReadOnly = no NoAutoCommit = No NoLoginBox = No FetchBufferSize = 60 Other relevant data: - Connecting via OpenLink's iODBC - Zope 2.7.6-final - Python 2.3.4 - Connection to Sybase has been successfully tested with iODBC, including issuing a query - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC connection RJ Juneau Chief Technology Officer Maxxian Integration Inc. 155 Westhampton Drive Thornhill, Ontario Canada L4J 7X2 E-mail: rj@maxxian.com Phone: +1 905 482 9429 Cell: +1 416 897 6682 Toll free: +1 866 758 9161 Fax: +1 647 722 2038 -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050506/aef33361/attachment-0053.htm From mal at egenix.com Fri May 6 18:27:37 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Jan 26 08:06:48 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC In-Reply-To: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> References: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Message-ID: <427B8CE9.1010601@egenix.com> RJ Juneau wrote: > Still on eval for the product. > > I cannot get a stable connection to Sybase via the iODBC drivers. > > - The Sybase ODBC connection - including a query - have been verified at > the iODBC level. > - The setup is already working well for ODBC connection to MySQL. > > Symptoms include: > > - If I click on "Open Connection", it still comes back with "Connection > Closed" when I go to a ZSQL method > - Using 'Connect on Demand' is not working either. > - Clicking "Open Connection" gives me the following error: > > Connection string: DSN=lixbox_sybase; > UID=sa; > PWD=XXXXXXX Try writing the connection string on one line and without whitespace. ODBC drivers sometimes have problems with this. > Connection pool entry: 0 > Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection > rejected by data source', 7952) This is a generic error that relates to authentication or firewall problems. It is possible that turning on ODBC tracing the ODBC manager will give more clues as to the real cause of the problem. > The odbc.ini definition for DSN "lixbox_sybase" is as follows: > > [lixbox_sybase] > JetFix = No > NoRowSetSizeLimit = No > Description = Test connection to listbox > Options = LIXBOX > DSQUERY = SQLSERVER > TDSHOST = lixbox > TDSPORT = 5000 > TDSVER = 5.0 > SQLSERVER_CATALOG = N > CURSOR_SENSITIVITY = LOW > UserName = sa > Password = XXXXXXXX > ServerType = Sybase 10/11/12 > Driver = /opt/openlink/lib/sql_mt_lt.so > Database = pubs2 > ReadOnly = no > NoAutoCommit = No > NoLoginBox = No > FetchBufferSize = 60 > > > Other relevant data: > - Connecting via OpenLink's iODBC > - Zope 2.7.6-final > - Python 2.3.4 > - Connection to Sybase has been successfully tested with iODBC, > including issuing a query > - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC > connection > > > > RJ Juneau > Chief Technology Officer > Maxxian Integration Inc. > 155 Westhampton Drive > Thornhill, Ontario > Canada L4J 7X2 > E-mail: rj@maxxian.com > Phone: +1 905 482 9429 > Cell: +1 416 897 6682 > Toll free: +1 866 758 9161 > Fax: +1 647 722 2038 > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 06 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From calisp at gmail.com Sun May 15 23:49:03 2005 From: calisp at gmail.com (calisp@gmail.com) Date: Thu Jan 26 08:06:48 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK Message-ID: Hi, I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the following error... 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the last phase of a two-phase commit. This shouldn't happen. Traceback (most recent call last): File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one jar.tpc_finish(self) File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish try: self._finish() File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could not perform COMMIT or ROLLBACK', 1023) What could be causing this? Can I get the mxODBCZopeDA source from somewhere? It would make debugging this much easier. Thanks, Calisp. From mal at egenix.com Mon May 16 13:52:12 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Jan 26 08:06:48 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK In-Reply-To: References: Message-ID: <42887B5C.4010109@egenix.com> calisp@gmail.com wrote: > Hi, > > I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with > unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the > following error... > > 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the > last phase of a two-phase commit. This shouldn't happen. > Traceback (most recent call last): > File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one > jar.tpc_finish(self) > File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish > try: self._finish() > File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish > File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler > ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could > not perform COMMIT or ROLLBACK', 1023) You should have a look at the database logs to see what prevented the commit from being completed. > What could be causing this? Hard to say: mxODBCZopeDA is trying to commit the transaction, but the driver or database failed to complete the request. The above error was generated by the ODBC driver. This could be network or DNS problems, or be related to a bug in FreeTDS (which is getting more stable with every new release, but should still be considered beta quality software at the moment). > Can I get the mxODBCZopeDA source from > somewhere? It would make debugging this much easier. Getting the source is not an option and won't help much either since the source of the problem is not mxODBCZopeDA. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 16 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Sun May 1 21:29:25 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Jan 26 12:01:20 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <427259F3.4090806@egenix.com> References: <20050427130906.52878.qmail@web30008.mail.mud.yahoo.com> <427259F3.4090806@egenix.com> Message-ID: <42752005.7080904@egenix.com> M.-A. Lemburg wrote: > David Rushby wrote: > >> --- "M.-A. Lemburg" wrote: >> >>> Are you using the standard mxDateTime build or one >>> with WANT_SUBCLASSABLE_TYPES defined... >> >> >> >> Presumably "the standard", since I just built with 'py24d setup.py >> build', making no attempt to enable special directives. >> >> >>> ... (mxDateTime_Deallocate is only used by the latter)? >> >> >> >> That's true in 2.1.0-2005-04-15, but not in 2.1.0b5. >> >> >>> In any case, please try our latest snapshot: >>> >>> >> >> http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-04-15.zip >> >>> to see if that makes any difference. >> >> >> >> I can't build it out of the box: > > > Hmm, looks like distutils' sdist command doesn't like our new > repository layout which uses symlinks (after we've switched to > subversion). > > We'll have to debug distutils first, I guess :-( Ok, we've found the problem and fixed it. Here's the new release (which does build out of the box at least on our boxes ;-): http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 01 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From davidrushby at yahoo.com Mon May 2 15:49:53 2005 From: davidrushby at yahoo.com (David Rushby) Date: Thu Jan 26 12:01:20 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Ok, we've found the problem and fixed it. Here's the new > release (which does build out of the box at least on our > boxes ;-): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip It does build now, but: py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" still behaves as it did when I submitted my original message: Fatal Python error: UNREF invalid object Aborted This is the same debug build of Python 2.4.1 that I was previously using, running the same configuration (CentOS Linux 4.0/i386, everything compiled with GCC 3.4.3). Have you examined my original claim as to the cause of the bug? __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 10:21:55 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Jan 26 12:01:20 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> References: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> Message-ID: <42772693.8050306@egenix.com> David Rushby wrote: > --- "M.-A. Lemburg" wrote: > >>Ok, we've found the problem and fixed it. Here's the new >>release (which does build out of the box at least on our >>boxes ;-): >> >> > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip > > It does build now, but: > py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" > still behaves as it did when I submitted my original message: > Fatal Python error: UNREF invalid object > Aborted > > This is the same debug build of Python 2.4.1 that I was previously > using, running the same configuration (CentOS Linux 4.0/i386, > everything compiled with GCC 3.4.3). > > Have you examined my original claim as to the cause of the bug? No. We haven't had time for looking into it. I'm not sure whether your analysis of the problem is correct: if you don't define WANT_SUBCLASSABLE_TYPES, the API mxDateTime_Deallocate() is neither defined nor used. Furthermore, PyObject_Del() is only called by mxDateTime_Free() if you have explicitely edited mxDateTime.c to disabled the free list #defines. In a standard build, PyObject_Del() is only called at module finalization time. Note that the reason we call mxDateTime_Free() in the constructor is that we don't want the destructor of the object to be called. Py_DECREF() would call the destructor (mxDateTime_Deallocate). It is possible that the debug code in Python complains about the refcount in the object not being 0 at the time the object is finalized (module finalization time), but I don't see any such checks in PyObject_Free() (which is what PyObject_Del() maps to). Again, all of this does not happen in regular non-debug Python builds. Please be aware that we don't support debug builds, so fixing the problem (if there is one - gcc has some serious optimization problems on some combinations of platform and version) will take a while. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 09:27:37 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Thu Jan 26 12:01:20 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 Message-ID: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Hi all- I am trying to build the mx-base package, v.2.0.6. This will be used with postgresql 7.3.9, psycopg 1.1.18, and Roundup 0.8.2. RHEL 3.0 Python 2.3 egenix-mx-base-2.0.6.tar.gz I performed a: /usr/local/bin/python2.3 setup.py install Everything looks proper with the exeception of this series of warning statements: ----------------- gcc -pthread -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fno-strict-aliasing -fPIC -Imx/BeeBase/mxBeeBase -I/usr/local/incl ude/python2.3 -I/usr/local/include -c mx/BeeBase/mxBeeBase/btr.c -o build/temp.linux-i686-2.3/mx/BeeBase/mxBeeBase/mxBeeBa se/mx/BeeBase/mxBeeBase/btr.o mx/BeeBase/mxBeeBase/btr.c: In function `dumpBuf': mx/BeeBase/mxBeeBase/btr.c:249: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:250: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:255: warning: unsigned int format, long unsigned int arg (arg 4) mx/BeeBase/mxBeeBase/btr.c:256: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c: In function `_validateTree': mx/BeeBase/mxBeeBase/btr.c:330: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:337: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:339: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:349: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:351: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 3) creating build/lib.linux-i686-2.3/mx/BeeBase creating build/lib.linux-i686-2.3/mx/BeeBase/mxBeeBase -------------- Would someone be kind enough to let me know whether these messages were expected, and if not, how I might resolve these? Thanks! DC __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 22:06:33 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Jan 26 12:01:20 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> References: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Message-ID: <4277CBB9.8020302@egenix.com> Dianne Chen wrote: > Hi all- > > I am trying to build the mx-base package, v.2.0.6. > This will be used with postgresql 7.3.9, psycopg > 1.1.18, and Roundup 0.8.2. > > RHEL 3.0 > Python 2.3 > egenix-mx-base-2.0.6.tar.gz > > I performed a: > > /usr/local/bin/python2.3 setup.py install > > Everything looks proper with the exeception of this > series of warning statements: > > ----------------- > ... > -------------- > > Would someone be kind enough to let me know whether > these messages were expected, and if not, how I might > resolve these? These warning can safely be ignored. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 13:41:14 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Thu Jan 26 12:01:20 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: 6667 Message-ID: <20050503194114.72091.qmail@web31414.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Dianne Chen wrote: > > Hi all- > > > > I am trying to build the mx-base package, v.2.0.6. > > This will be used with postgresql 7.3.9, psycopg > > 1.1.18, and Roundup 0.8.2. > > > > RHEL 3.0 > > Python 2.3 > > egenix-mx-base-2.0.6.tar.gz > > > > I performed a: > > > > /usr/local/bin/python2.3 setup.py install > > > > Everything looks proper with the exeception of > this > > series of warning statements: > > > > ----------------- > > ... > > -------------- > > > > Would someone be kind enough to let me know > whether > > these messages were expected, and if not, how I > might > > resolve these? > > These warning can safely be ignored. > > -- > Marc-Andre Lemburg > eGenix.com > Marc- Thank you very much for the reply. It helps greatly. With kind regards, DC __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From davidrushby at yahoo.com Tue May 3 17:18:46 2005 From: davidrushby at yahoo.com (David Rushby) Date: Thu Jan 26 12:01:20 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050503231846.35012.qmail@web30009.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > I'm not sure whether your analysis of the problem is correct... Indeed, my original analysis wasn't correct; I think this one is. The fatal error I'm complaining about only arises if the arguments to DateTime.DateTime are invalid, so that the object is deallocated in the onError block of mxDateTime_FromDateAndTime. If the object is created successfully, and later deallocated by Python's garbage collector, the fatal error doesn't arise. Here's my analysis of the problem: --- If the debugging directive Py_TRACE_REFS is enabled, as it is in my case, the Python interpreter maintains a doubly linked list of all Python objects (named refchain) via the _ob_next and _ob_prev pointers added to PyObject via _PyObject_HEAD_EXTRA. Each object is inserted into refchain by the _Py_AddToAllObjects call in _Py_NewReference, and removed from refchain by the _Py_ForgetReference call in _Py_Dealloc. _Py_ForgetReference performs an integrity check on the object being deallocated (op) to make sure that its neighbors in refchain recognize it. Specifically, _Py_ForgetReference verifies that the _ob_next pointer of the previous object in refchain (op->_ob_prev->_ob_next) points to op, and that the _ob_prev pointer of the next object in refchain (op->_ob_next->_ob_prev) points to op. If either of those conditions is false, the interpreter raises the fatal error I'm seeing. After mxDateTime_New pulls an mxDateTimeObject out of the free list, it calls _Py_NewReference on that object to transform it from a "conceptually deallocated" object to a "conceptually allocated" one. _Py_NewReference inserts the object into refchain. Later, when the object is being "conceptually deallocated", it should be removed from refchain with _Py_ForgetReference. The version of _Py_Dealloc that's active when Py_TRACE_REFS is enabled does this (_Py_Dealloc is the element of Py_DECREF that performs the actual destruction). _Py_Dealloc first calls _Py_ForgetReference to remove the object from refchain, then calls the object's destructor (op->ob_type->tp_dealloc). If WANT_SUBCLASSABLE_TYPES is not defined (it is not in my case), the destructor for mxDateTime_Type is mxDateTime_Free. So, if a DateTime object is deallocated normally, as a result of its reference count falling to zero, _Py_Dealloc is called on the object, which first removes it from refchain, then passes it to mxDateTime_Free. If a DateTime object is destroyed prematurely, as a result of invalid arguments to its destructor, the onError handler calls mxDateTime_Free, so the object is "conceptually deallocated" (placed in the free list), *but* the object is not removed from refchain. So if a refchain-membership-integrity-check is performed on the object in question or one of its immediate neighbors in refchain, that integrity check fails, leading to the fatal error. --- The solution is to 'Py_DECREF(...)' the object in the onError handler of its constructor, instead of passing the object directly to mxDateTime_Free. That change solves two problems: 1) It causes _Py_Dealloc to execute, which in turn executes _Py_ForgetReference, so the object is removed from refchain, as it should be. 2) At present, objects that are created successfully and later deallocated by normal reference count mechanics have a reference count of 0 when they enter the free list, whereas objects whose constructors abort their creation due to invalid arguments have a reference count of 1 when they enter the free list. Although AFAIK this doesn't cause an actual execution problem (because the object's reference count is *explicitly set to 1* rather than *incremented by 1* when the object is later "conceptually allocated" by _Py_NewReference), it is likely to confuse future maintainers and thereby lead to the introduction of an actual execution problem. I assume that if you agree that this is a reasonable solution, you'll want to apply the change not only to mxDateTime_FromDateAndTime, but to all similar constructors in mxDateTime.c. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From rj at maxxian.com Thu May 5 01:57:40 2005 From: rj at maxxian.com (RJ Juneau) Date: Thu Jan 26 12:01:20 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c5512e$f72798c0$6505a8c0@rjlaptop> I'm on the 30 day evaluation for mxodbc_zope_da. I'm getting the following error when I submit some queries: Error Type: KeyError Error Value: 'query' I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 with UCS4. The error seems to be caused by multiple rows being returned. I did see an earlier posting with the same error message. The response suggested a template error, but this is clearly not the case here. The additional evidence I've gathered so far: - I'm running the test directly from the ZSQL method, so there's no template involved. - If I use the same query with an additional "where" clause to ensure that only one row is returned, it works - If I use a value in the 'where' clause with no rows returned, it works - The same ZSQL query is being used on a Windows machine running Zope and the free ZODBC module without a problem - The query has been verified directly in mysql-client-browser Other info: - The database is MySQL 4.1.10A-0 - iODBC is the DB driver RJ Juneau -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050505/68d278bf/attachment-0054.htm From mal at egenix.com Thu May 5 12:37:43 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Jan 26 12:01:20 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c5512e$f72798c0$6505a8c0@rjlaptop> References: <000301c5512e$f72798c0$6505a8c0@rjlaptop> Message-ID: <4279E967.6010904@egenix.com> RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 > with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 09:37:42 2005 From: rj at maxxian.com (RJ Juneau) Date: Thu Jan 26 12:01:20 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000101c5516f$3b96de90$6505a8c0@rjlaptop> More interesting info on the problem: If I execute the query directly in the "test" window of the base eGenix mxODBC Database Connection window, it works fine and returns the 20 lines expected. That could point to a problem in the rendering, which seems to be where the traceback ends. Note that within the same Zope system I also have an ODBC connection to a Sybase database, and I have successfully tested multi-line ZSQL queries there. This is the traceback: Time 2005/05/05 07:55:15.294 GMT-4 Exception Type KeyError Exception Value 'query' Traceback (innermost last): Module ZPublisher.Publish, line 101, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 39, in call_object Module Shared.DC.ZRDB.DA, line 337, in manage_test Module DocumentTemplate.DT_String, line 474, in __call__ Module DocumentTemplate.DT_In, line 602, in renderwb Module DocumentTemplate.DT_Var, line 219, in render KeyError: 'query' I don't think the following is an issue, but I'll include it for completeness.I am also getting the following iODBC warnings and errors in the Zope console log, which are related to the ODBC parameters being passed by iODBC. Note that these errors also appear for all of the successful queries. [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (Setup). [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (UsageCount). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Timeout). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Reuse). As for the ZSQL snippet from the template... Since there's no template involved yet (I'm still testing directly from the ZSQL method), I assume you mean the SQL code? select h.host_name, s.system_name, s.system_handle, count(*) from terminal t, system_map s, host h where t.system_index = s.system_index and s.host_index = h.host_index group by s.system_name order by h.host_name Nothing complicated here. There are no parameters passed to the query. RJ -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: May 5, 2005 5:38 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: Re: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is > 2.3.4 with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ---------------------------------------------------------------------- > -- > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 16:00:32 2005 From: charlie at egenix.com (Charlie Clark) Date: Thu Jan 26 12:01:20 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000101c5516f$3b96de90$6505a8c0@rjlaptop> References: <000101c5516f$3b96de90$6505a8c0@rjlaptop> Message-ID: <20050505150032.644.1@bepc.1115296715.fake> On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base eGenix > mxODBC Database Connection window, it works fine and returns the 20 > lines expected. That could point to a problem in the rendering, which > seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection to > a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 10:22:17 2005 From: rj at maxxian.com (RJ Juneau) Date: Thu Jan 26 12:01:20 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505150032.644.1@bepc.1115296715.fake> Message-ID: <000201c55175$75bcad10$6505a8c0@rjlaptop> At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 11:47:14 2005 From: rj at maxxian.com (RJ Juneau) Date: Thu Jan 26 12:01:20 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c55181$549be0e0$6505a8c0@rjlaptop> Charlie, I found a fix. Here it is in case anyone else runs into this. You were correct - the problem is in another part of Zope. Based on your feedback, I did a bit more searching and found something here: http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. html The problem appears to be in Zope versions after 2.7.0. I'm running 2.7.6, and the post indicates that it also happens in 2.7.4. The solution: Edit file /lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. There are two lines in the file that start with . Edit them as follows: Change first line to: Change second line to: Just to be after, I shut down Zope before I made the changes and restarted it after. Thanks for the help! RJ -----Original Message----- From: RJ Juneau [mailto:rj@maxxian.com] Sent: May 5, 2005 9:22 AM To: 'Charlie Clark' Cc: 'egenix-users@lists.egenix.com' Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 17:57:25 2005 From: charlie at egenix.com (Charlie Clark) Date: Thu Jan 26 12:01:20 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <20050505165725.3380.2@bepc.1115296715.fake> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Thu May 5 09:15:21 2005 From: charlie at egenix.com (Charlie Clark) Date: Thu Jan 26 12:01:20 2006 Subject: [Zope-DB] RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <000001c55185$41477730$6b00a8c0@fonacier.local> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________ Zope-DB mailing list Zope-DB@zope.org http://mail.zope.org/mailman/listinfo/zope-db From rj at maxxian.com Thu May 5 12:38:00 2005 From: rj at maxxian.com (RJ Juneau) Date: Thu Jan 26 12:01:20 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000001c55188$6b841eb0$6505a8c0@rjlaptop> I just double-checked. Zope-2.7.6-final. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 12:49:16 2005 From: rj at maxxian.com (RJ Juneau) Date: Thu Jan 26 12:01:20 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000501c55189$fe149ba0$6505a8c0@rjlaptop> Charlie, The fix has only been applied for 2.7.7, 2.8b2. The info is in the original bug report which is closed and can be found here: http://www.zope.org/Collectors/Zope/1745 RJ -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Fri May 6 11:50:09 2005 From: rj at maxxian.com (RJ Juneau) Date: Thu Jan 26 12:01:20 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC Message-ID: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Still on eval for the product. I cannot get a stable connection to Sybase via the iODBC drivers. - The Sybase ODBC connection - including a query - have been verified at the iODBC level. - The setup is already working well for ODBC connection to MySQL. Symptoms include: - If I click on "Open Connection", it still comes back with "Connection Closed" when I go to a ZSQL method - Using 'Connect on Demand' is not working either. - Clicking "Open Connection" gives me the following error: Connection string: DSN=lixbox_sybase; UID=sa; PWD=XXXXXXX Connection pool entry: 0 Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection rejected by data source', 7952) The odbc.ini definition for DSN "lixbox_sybase" is as follows: [lixbox_sybase] JetFix = No NoRowSetSizeLimit = No Description = Test connection to listbox Options = LIXBOX DSQUERY = SQLSERVER TDSHOST = lixbox TDSPORT = 5000 TDSVER = 5.0 SQLSERVER_CATALOG = N CURSOR_SENSITIVITY = LOW UserName = sa Password = XXXXXXXX ServerType = Sybase 10/11/12 Driver = /opt/openlink/lib/sql_mt_lt.so Database = pubs2 ReadOnly = no NoAutoCommit = No NoLoginBox = No FetchBufferSize = 60 Other relevant data: - Connecting via OpenLink's iODBC - Zope 2.7.6-final - Python 2.3.4 - Connection to Sybase has been successfully tested with iODBC, including issuing a query - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC connection RJ Juneau Chief Technology Officer Maxxian Integration Inc. 155 Westhampton Drive Thornhill, Ontario Canada L4J 7X2 E-mail: rj@maxxian.com Phone: +1 905 482 9429 Cell: +1 416 897 6682 Toll free: +1 866 758 9161 Fax: +1 647 722 2038 -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050506/aef33361/attachment-0054.htm From mal at egenix.com Fri May 6 18:27:37 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Jan 26 12:01:20 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC In-Reply-To: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> References: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Message-ID: <427B8CE9.1010601@egenix.com> RJ Juneau wrote: > Still on eval for the product. > > I cannot get a stable connection to Sybase via the iODBC drivers. > > - The Sybase ODBC connection - including a query - have been verified at > the iODBC level. > - The setup is already working well for ODBC connection to MySQL. > > Symptoms include: > > - If I click on "Open Connection", it still comes back with "Connection > Closed" when I go to a ZSQL method > - Using 'Connect on Demand' is not working either. > - Clicking "Open Connection" gives me the following error: > > Connection string: DSN=lixbox_sybase; > UID=sa; > PWD=XXXXXXX Try writing the connection string on one line and without whitespace. ODBC drivers sometimes have problems with this. > Connection pool entry: 0 > Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection > rejected by data source', 7952) This is a generic error that relates to authentication or firewall problems. It is possible that turning on ODBC tracing the ODBC manager will give more clues as to the real cause of the problem. > The odbc.ini definition for DSN "lixbox_sybase" is as follows: > > [lixbox_sybase] > JetFix = No > NoRowSetSizeLimit = No > Description = Test connection to listbox > Options = LIXBOX > DSQUERY = SQLSERVER > TDSHOST = lixbox > TDSPORT = 5000 > TDSVER = 5.0 > SQLSERVER_CATALOG = N > CURSOR_SENSITIVITY = LOW > UserName = sa > Password = XXXXXXXX > ServerType = Sybase 10/11/12 > Driver = /opt/openlink/lib/sql_mt_lt.so > Database = pubs2 > ReadOnly = no > NoAutoCommit = No > NoLoginBox = No > FetchBufferSize = 60 > > > Other relevant data: > - Connecting via OpenLink's iODBC > - Zope 2.7.6-final > - Python 2.3.4 > - Connection to Sybase has been successfully tested with iODBC, > including issuing a query > - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC > connection > > > > RJ Juneau > Chief Technology Officer > Maxxian Integration Inc. > 155 Westhampton Drive > Thornhill, Ontario > Canada L4J 7X2 > E-mail: rj@maxxian.com > Phone: +1 905 482 9429 > Cell: +1 416 897 6682 > Toll free: +1 866 758 9161 > Fax: +1 647 722 2038 > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 06 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From calisp at gmail.com Sun May 15 23:49:03 2005 From: calisp at gmail.com (calisp@gmail.com) Date: Thu Jan 26 12:01:20 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK Message-ID: Hi, I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the following error... 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the last phase of a two-phase commit. This shouldn't happen. Traceback (most recent call last): File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one jar.tpc_finish(self) File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish try: self._finish() File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could not perform COMMIT or ROLLBACK', 1023) What could be causing this? Can I get the mxODBCZopeDA source from somewhere? It would make debugging this much easier. Thanks, Calisp. From mal at egenix.com Mon May 16 13:52:12 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Jan 26 12:01:20 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK In-Reply-To: References: Message-ID: <42887B5C.4010109@egenix.com> calisp@gmail.com wrote: > Hi, > > I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with > unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the > following error... > > 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the > last phase of a two-phase commit. This shouldn't happen. > Traceback (most recent call last): > File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one > jar.tpc_finish(self) > File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish > try: self._finish() > File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish > File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler > ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could > not perform COMMIT or ROLLBACK', 1023) You should have a look at the database logs to see what prevented the commit from being completed. > What could be causing this? Hard to say: mxODBCZopeDA is trying to commit the transaction, but the driver or database failed to complete the request. The above error was generated by the ODBC driver. This could be network or DNS problems, or be related to a bug in FreeTDS (which is getting more stable with every new release, but should still be considered beta quality software at the moment). > Can I get the mxODBCZopeDA source from > somewhere? It would make debugging this much easier. Getting the source is not an option and won't help much either since the source of the problem is not mxODBCZopeDA. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 16 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Sun May 1 21:29:25 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Jan 26 16:01:03 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <427259F3.4090806@egenix.com> References: <20050427130906.52878.qmail@web30008.mail.mud.yahoo.com> <427259F3.4090806@egenix.com> Message-ID: <42752005.7080904@egenix.com> M.-A. Lemburg wrote: > David Rushby wrote: > >> --- "M.-A. Lemburg" wrote: >> >>> Are you using the standard mxDateTime build or one >>> with WANT_SUBCLASSABLE_TYPES defined... >> >> >> >> Presumably "the standard", since I just built with 'py24d setup.py >> build', making no attempt to enable special directives. >> >> >>> ... (mxDateTime_Deallocate is only used by the latter)? >> >> >> >> That's true in 2.1.0-2005-04-15, but not in 2.1.0b5. >> >> >>> In any case, please try our latest snapshot: >>> >>> >> >> http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-04-15.zip >> >>> to see if that makes any difference. >> >> >> >> I can't build it out of the box: > > > Hmm, looks like distutils' sdist command doesn't like our new > repository layout which uses symlinks (after we've switched to > subversion). > > We'll have to debug distutils first, I guess :-( Ok, we've found the problem and fixed it. Here's the new release (which does build out of the box at least on our boxes ;-): http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 01 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From davidrushby at yahoo.com Mon May 2 15:49:53 2005 From: davidrushby at yahoo.com (David Rushby) Date: Thu Jan 26 16:01:03 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Ok, we've found the problem and fixed it. Here's the new > release (which does build out of the box at least on our > boxes ;-): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip It does build now, but: py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" still behaves as it did when I submitted my original message: Fatal Python error: UNREF invalid object Aborted This is the same debug build of Python 2.4.1 that I was previously using, running the same configuration (CentOS Linux 4.0/i386, everything compiled with GCC 3.4.3). Have you examined my original claim as to the cause of the bug? __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 10:21:55 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Jan 26 16:01:03 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> References: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> Message-ID: <42772693.8050306@egenix.com> David Rushby wrote: > --- "M.-A. Lemburg" wrote: > >>Ok, we've found the problem and fixed it. Here's the new >>release (which does build out of the box at least on our >>boxes ;-): >> >> > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip > > It does build now, but: > py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" > still behaves as it did when I submitted my original message: > Fatal Python error: UNREF invalid object > Aborted > > This is the same debug build of Python 2.4.1 that I was previously > using, running the same configuration (CentOS Linux 4.0/i386, > everything compiled with GCC 3.4.3). > > Have you examined my original claim as to the cause of the bug? No. We haven't had time for looking into it. I'm not sure whether your analysis of the problem is correct: if you don't define WANT_SUBCLASSABLE_TYPES, the API mxDateTime_Deallocate() is neither defined nor used. Furthermore, PyObject_Del() is only called by mxDateTime_Free() if you have explicitely edited mxDateTime.c to disabled the free list #defines. In a standard build, PyObject_Del() is only called at module finalization time. Note that the reason we call mxDateTime_Free() in the constructor is that we don't want the destructor of the object to be called. Py_DECREF() would call the destructor (mxDateTime_Deallocate). It is possible that the debug code in Python complains about the refcount in the object not being 0 at the time the object is finalized (module finalization time), but I don't see any such checks in PyObject_Free() (which is what PyObject_Del() maps to). Again, all of this does not happen in regular non-debug Python builds. Please be aware that we don't support debug builds, so fixing the problem (if there is one - gcc has some serious optimization problems on some combinations of platform and version) will take a while. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 09:27:37 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Thu Jan 26 16:01:03 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 Message-ID: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Hi all- I am trying to build the mx-base package, v.2.0.6. This will be used with postgresql 7.3.9, psycopg 1.1.18, and Roundup 0.8.2. RHEL 3.0 Python 2.3 egenix-mx-base-2.0.6.tar.gz I performed a: /usr/local/bin/python2.3 setup.py install Everything looks proper with the exeception of this series of warning statements: ----------------- gcc -pthread -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fno-strict-aliasing -fPIC -Imx/BeeBase/mxBeeBase -I/usr/local/incl ude/python2.3 -I/usr/local/include -c mx/BeeBase/mxBeeBase/btr.c -o build/temp.linux-i686-2.3/mx/BeeBase/mxBeeBase/mxBeeBa se/mx/BeeBase/mxBeeBase/btr.o mx/BeeBase/mxBeeBase/btr.c: In function `dumpBuf': mx/BeeBase/mxBeeBase/btr.c:249: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:250: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:255: warning: unsigned int format, long unsigned int arg (arg 4) mx/BeeBase/mxBeeBase/btr.c:256: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c: In function `_validateTree': mx/BeeBase/mxBeeBase/btr.c:330: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:337: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:339: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:349: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:351: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 3) creating build/lib.linux-i686-2.3/mx/BeeBase creating build/lib.linux-i686-2.3/mx/BeeBase/mxBeeBase -------------- Would someone be kind enough to let me know whether these messages were expected, and if not, how I might resolve these? Thanks! DC __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 22:06:33 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Jan 26 16:01:03 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> References: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Message-ID: <4277CBB9.8020302@egenix.com> Dianne Chen wrote: > Hi all- > > I am trying to build the mx-base package, v.2.0.6. > This will be used with postgresql 7.3.9, psycopg > 1.1.18, and Roundup 0.8.2. > > RHEL 3.0 > Python 2.3 > egenix-mx-base-2.0.6.tar.gz > > I performed a: > > /usr/local/bin/python2.3 setup.py install > > Everything looks proper with the exeception of this > series of warning statements: > > ----------------- > ... > -------------- > > Would someone be kind enough to let me know whether > these messages were expected, and if not, how I might > resolve these? These warning can safely be ignored. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 13:41:14 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Thu Jan 26 16:01:03 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: 6667 Message-ID: <20050503194114.72091.qmail@web31414.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Dianne Chen wrote: > > Hi all- > > > > I am trying to build the mx-base package, v.2.0.6. > > This will be used with postgresql 7.3.9, psycopg > > 1.1.18, and Roundup 0.8.2. > > > > RHEL 3.0 > > Python 2.3 > > egenix-mx-base-2.0.6.tar.gz > > > > I performed a: > > > > /usr/local/bin/python2.3 setup.py install > > > > Everything looks proper with the exeception of > this > > series of warning statements: > > > > ----------------- > > ... > > -------------- > > > > Would someone be kind enough to let me know > whether > > these messages were expected, and if not, how I > might > > resolve these? > > These warning can safely be ignored. > > -- > Marc-Andre Lemburg > eGenix.com > Marc- Thank you very much for the reply. It helps greatly. With kind regards, DC __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From davidrushby at yahoo.com Tue May 3 17:18:46 2005 From: davidrushby at yahoo.com (David Rushby) Date: Thu Jan 26 16:01:03 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050503231846.35012.qmail@web30009.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > I'm not sure whether your analysis of the problem is correct... Indeed, my original analysis wasn't correct; I think this one is. The fatal error I'm complaining about only arises if the arguments to DateTime.DateTime are invalid, so that the object is deallocated in the onError block of mxDateTime_FromDateAndTime. If the object is created successfully, and later deallocated by Python's garbage collector, the fatal error doesn't arise. Here's my analysis of the problem: --- If the debugging directive Py_TRACE_REFS is enabled, as it is in my case, the Python interpreter maintains a doubly linked list of all Python objects (named refchain) via the _ob_next and _ob_prev pointers added to PyObject via _PyObject_HEAD_EXTRA. Each object is inserted into refchain by the _Py_AddToAllObjects call in _Py_NewReference, and removed from refchain by the _Py_ForgetReference call in _Py_Dealloc. _Py_ForgetReference performs an integrity check on the object being deallocated (op) to make sure that its neighbors in refchain recognize it. Specifically, _Py_ForgetReference verifies that the _ob_next pointer of the previous object in refchain (op->_ob_prev->_ob_next) points to op, and that the _ob_prev pointer of the next object in refchain (op->_ob_next->_ob_prev) points to op. If either of those conditions is false, the interpreter raises the fatal error I'm seeing. After mxDateTime_New pulls an mxDateTimeObject out of the free list, it calls _Py_NewReference on that object to transform it from a "conceptually deallocated" object to a "conceptually allocated" one. _Py_NewReference inserts the object into refchain. Later, when the object is being "conceptually deallocated", it should be removed from refchain with _Py_ForgetReference. The version of _Py_Dealloc that's active when Py_TRACE_REFS is enabled does this (_Py_Dealloc is the element of Py_DECREF that performs the actual destruction). _Py_Dealloc first calls _Py_ForgetReference to remove the object from refchain, then calls the object's destructor (op->ob_type->tp_dealloc). If WANT_SUBCLASSABLE_TYPES is not defined (it is not in my case), the destructor for mxDateTime_Type is mxDateTime_Free. So, if a DateTime object is deallocated normally, as a result of its reference count falling to zero, _Py_Dealloc is called on the object, which first removes it from refchain, then passes it to mxDateTime_Free. If a DateTime object is destroyed prematurely, as a result of invalid arguments to its destructor, the onError handler calls mxDateTime_Free, so the object is "conceptually deallocated" (placed in the free list), *but* the object is not removed from refchain. So if a refchain-membership-integrity-check is performed on the object in question or one of its immediate neighbors in refchain, that integrity check fails, leading to the fatal error. --- The solution is to 'Py_DECREF(...)' the object in the onError handler of its constructor, instead of passing the object directly to mxDateTime_Free. That change solves two problems: 1) It causes _Py_Dealloc to execute, which in turn executes _Py_ForgetReference, so the object is removed from refchain, as it should be. 2) At present, objects that are created successfully and later deallocated by normal reference count mechanics have a reference count of 0 when they enter the free list, whereas objects whose constructors abort their creation due to invalid arguments have a reference count of 1 when they enter the free list. Although AFAIK this doesn't cause an actual execution problem (because the object's reference count is *explicitly set to 1* rather than *incremented by 1* when the object is later "conceptually allocated" by _Py_NewReference), it is likely to confuse future maintainers and thereby lead to the introduction of an actual execution problem. I assume that if you agree that this is a reasonable solution, you'll want to apply the change not only to mxDateTime_FromDateAndTime, but to all similar constructors in mxDateTime.c. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From rj at maxxian.com Thu May 5 01:57:40 2005 From: rj at maxxian.com (RJ Juneau) Date: Thu Jan 26 16:01:03 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c5512e$f72798c0$6505a8c0@rjlaptop> I'm on the 30 day evaluation for mxodbc_zope_da. I'm getting the following error when I submit some queries: Error Type: KeyError Error Value: 'query' I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 with UCS4. The error seems to be caused by multiple rows being returned. I did see an earlier posting with the same error message. The response suggested a template error, but this is clearly not the case here. The additional evidence I've gathered so far: - I'm running the test directly from the ZSQL method, so there's no template involved. - If I use the same query with an additional "where" clause to ensure that only one row is returned, it works - If I use a value in the 'where' clause with no rows returned, it works - The same ZSQL query is being used on a Windows machine running Zope and the free ZODBC module without a problem - The query has been verified directly in mysql-client-browser Other info: - The database is MySQL 4.1.10A-0 - iODBC is the DB driver RJ Juneau -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050505/68d278bf/attachment-0055.htm From mal at egenix.com Thu May 5 12:37:43 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Jan 26 16:01:03 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c5512e$f72798c0$6505a8c0@rjlaptop> References: <000301c5512e$f72798c0$6505a8c0@rjlaptop> Message-ID: <4279E967.6010904@egenix.com> RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 > with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 09:37:42 2005 From: rj at maxxian.com (RJ Juneau) Date: Thu Jan 26 16:01:03 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000101c5516f$3b96de90$6505a8c0@rjlaptop> More interesting info on the problem: If I execute the query directly in the "test" window of the base eGenix mxODBC Database Connection window, it works fine and returns the 20 lines expected. That could point to a problem in the rendering, which seems to be where the traceback ends. Note that within the same Zope system I also have an ODBC connection to a Sybase database, and I have successfully tested multi-line ZSQL queries there. This is the traceback: Time 2005/05/05 07:55:15.294 GMT-4 Exception Type KeyError Exception Value 'query' Traceback (innermost last): Module ZPublisher.Publish, line 101, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 39, in call_object Module Shared.DC.ZRDB.DA, line 337, in manage_test Module DocumentTemplate.DT_String, line 474, in __call__ Module DocumentTemplate.DT_In, line 602, in renderwb Module DocumentTemplate.DT_Var, line 219, in render KeyError: 'query' I don't think the following is an issue, but I'll include it for completeness.I am also getting the following iODBC warnings and errors in the Zope console log, which are related to the ODBC parameters being passed by iODBC. Note that these errors also appear for all of the successful queries. [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (Setup). [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (UsageCount). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Timeout). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Reuse). As for the ZSQL snippet from the template... Since there's no template involved yet (I'm still testing directly from the ZSQL method), I assume you mean the SQL code? select h.host_name, s.system_name, s.system_handle, count(*) from terminal t, system_map s, host h where t.system_index = s.system_index and s.host_index = h.host_index group by s.system_name order by h.host_name Nothing complicated here. There are no parameters passed to the query. RJ -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: May 5, 2005 5:38 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: Re: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is > 2.3.4 with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ---------------------------------------------------------------------- > -- > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 16:00:32 2005 From: charlie at egenix.com (Charlie Clark) Date: Thu Jan 26 16:01:03 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000101c5516f$3b96de90$6505a8c0@rjlaptop> References: <000101c5516f$3b96de90$6505a8c0@rjlaptop> Message-ID: <20050505150032.644.1@bepc.1115296715.fake> On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base eGenix > mxODBC Database Connection window, it works fine and returns the 20 > lines expected. That could point to a problem in the rendering, which > seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection to > a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 10:22:17 2005 From: rj at maxxian.com (RJ Juneau) Date: Thu Jan 26 16:01:03 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505150032.644.1@bepc.1115296715.fake> Message-ID: <000201c55175$75bcad10$6505a8c0@rjlaptop> At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 11:47:14 2005 From: rj at maxxian.com (RJ Juneau) Date: Thu Jan 26 16:01:03 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c55181$549be0e0$6505a8c0@rjlaptop> Charlie, I found a fix. Here it is in case anyone else runs into this. You were correct - the problem is in another part of Zope. Based on your feedback, I did a bit more searching and found something here: http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. html The problem appears to be in Zope versions after 2.7.0. I'm running 2.7.6, and the post indicates that it also happens in 2.7.4. The solution: Edit file /lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. There are two lines in the file that start with . Edit them as follows: Change first line to: Change second line to: Just to be after, I shut down Zope before I made the changes and restarted it after. Thanks for the help! RJ -----Original Message----- From: RJ Juneau [mailto:rj@maxxian.com] Sent: May 5, 2005 9:22 AM To: 'Charlie Clark' Cc: 'egenix-users@lists.egenix.com' Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 17:57:25 2005 From: charlie at egenix.com (Charlie Clark) Date: Thu Jan 26 16:01:03 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <20050505165725.3380.2@bepc.1115296715.fake> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Thu May 5 09:15:21 2005 From: charlie at egenix.com (Charlie Clark) Date: Thu Jan 26 16:01:03 2006 Subject: [Zope-DB] RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <000001c55185$41477730$6b00a8c0@fonacier.local> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________ Zope-DB mailing list Zope-DB@zope.org http://mail.zope.org/mailman/listinfo/zope-db From rj at maxxian.com Thu May 5 12:38:00 2005 From: rj at maxxian.com (RJ Juneau) Date: Thu Jan 26 16:01:04 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000001c55188$6b841eb0$6505a8c0@rjlaptop> I just double-checked. Zope-2.7.6-final. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 12:49:16 2005 From: rj at maxxian.com (RJ Juneau) Date: Thu Jan 26 16:01:04 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000501c55189$fe149ba0$6505a8c0@rjlaptop> Charlie, The fix has only been applied for 2.7.7, 2.8b2. The info is in the original bug report which is closed and can be found here: http://www.zope.org/Collectors/Zope/1745 RJ -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Fri May 6 11:50:09 2005 From: rj at maxxian.com (RJ Juneau) Date: Thu Jan 26 16:01:04 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC Message-ID: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Still on eval for the product. I cannot get a stable connection to Sybase via the iODBC drivers. - The Sybase ODBC connection - including a query - have been verified at the iODBC level. - The setup is already working well for ODBC connection to MySQL. Symptoms include: - If I click on "Open Connection", it still comes back with "Connection Closed" when I go to a ZSQL method - Using 'Connect on Demand' is not working either. - Clicking "Open Connection" gives me the following error: Connection string: DSN=lixbox_sybase; UID=sa; PWD=XXXXXXX Connection pool entry: 0 Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection rejected by data source', 7952) The odbc.ini definition for DSN "lixbox_sybase" is as follows: [lixbox_sybase] JetFix = No NoRowSetSizeLimit = No Description = Test connection to listbox Options = LIXBOX DSQUERY = SQLSERVER TDSHOST = lixbox TDSPORT = 5000 TDSVER = 5.0 SQLSERVER_CATALOG = N CURSOR_SENSITIVITY = LOW UserName = sa Password = XXXXXXXX ServerType = Sybase 10/11/12 Driver = /opt/openlink/lib/sql_mt_lt.so Database = pubs2 ReadOnly = no NoAutoCommit = No NoLoginBox = No FetchBufferSize = 60 Other relevant data: - Connecting via OpenLink's iODBC - Zope 2.7.6-final - Python 2.3.4 - Connection to Sybase has been successfully tested with iODBC, including issuing a query - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC connection RJ Juneau Chief Technology Officer Maxxian Integration Inc. 155 Westhampton Drive Thornhill, Ontario Canada L4J 7X2 E-mail: rj@maxxian.com Phone: +1 905 482 9429 Cell: +1 416 897 6682 Toll free: +1 866 758 9161 Fax: +1 647 722 2038 -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050506/aef33361/attachment-0055.htm From mal at egenix.com Fri May 6 18:27:37 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Jan 26 16:01:04 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC In-Reply-To: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> References: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Message-ID: <427B8CE9.1010601@egenix.com> RJ Juneau wrote: > Still on eval for the product. > > I cannot get a stable connection to Sybase via the iODBC drivers. > > - The Sybase ODBC connection - including a query - have been verified at > the iODBC level. > - The setup is already working well for ODBC connection to MySQL. > > Symptoms include: > > - If I click on "Open Connection", it still comes back with "Connection > Closed" when I go to a ZSQL method > - Using 'Connect on Demand' is not working either. > - Clicking "Open Connection" gives me the following error: > > Connection string: DSN=lixbox_sybase; > UID=sa; > PWD=XXXXXXX Try writing the connection string on one line and without whitespace. ODBC drivers sometimes have problems with this. > Connection pool entry: 0 > Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection > rejected by data source', 7952) This is a generic error that relates to authentication or firewall problems. It is possible that turning on ODBC tracing the ODBC manager will give more clues as to the real cause of the problem. > The odbc.ini definition for DSN "lixbox_sybase" is as follows: > > [lixbox_sybase] > JetFix = No > NoRowSetSizeLimit = No > Description = Test connection to listbox > Options = LIXBOX > DSQUERY = SQLSERVER > TDSHOST = lixbox > TDSPORT = 5000 > TDSVER = 5.0 > SQLSERVER_CATALOG = N > CURSOR_SENSITIVITY = LOW > UserName = sa > Password = XXXXXXXX > ServerType = Sybase 10/11/12 > Driver = /opt/openlink/lib/sql_mt_lt.so > Database = pubs2 > ReadOnly = no > NoAutoCommit = No > NoLoginBox = No > FetchBufferSize = 60 > > > Other relevant data: > - Connecting via OpenLink's iODBC > - Zope 2.7.6-final > - Python 2.3.4 > - Connection to Sybase has been successfully tested with iODBC, > including issuing a query > - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC > connection > > > > RJ Juneau > Chief Technology Officer > Maxxian Integration Inc. > 155 Westhampton Drive > Thornhill, Ontario > Canada L4J 7X2 > E-mail: rj@maxxian.com > Phone: +1 905 482 9429 > Cell: +1 416 897 6682 > Toll free: +1 866 758 9161 > Fax: +1 647 722 2038 > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 06 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From calisp at gmail.com Sun May 15 23:49:03 2005 From: calisp at gmail.com (calisp@gmail.com) Date: Thu Jan 26 16:01:04 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK Message-ID: Hi, I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the following error... 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the last phase of a two-phase commit. This shouldn't happen. Traceback (most recent call last): File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one jar.tpc_finish(self) File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish try: self._finish() File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could not perform COMMIT or ROLLBACK', 1023) What could be causing this? Can I get the mxODBCZopeDA source from somewhere? It would make debugging this much easier. Thanks, Calisp. From mal at egenix.com Mon May 16 13:52:12 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Jan 26 16:01:04 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK In-Reply-To: References: Message-ID: <42887B5C.4010109@egenix.com> calisp@gmail.com wrote: > Hi, > > I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with > unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the > following error... > > 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the > last phase of a two-phase commit. This shouldn't happen. > Traceback (most recent call last): > File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one > jar.tpc_finish(self) > File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish > try: self._finish() > File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish > File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler > ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could > not perform COMMIT or ROLLBACK', 1023) You should have a look at the database logs to see what prevented the commit from being completed. > What could be causing this? Hard to say: mxODBCZopeDA is trying to commit the transaction, but the driver or database failed to complete the request. The above error was generated by the ODBC driver. This could be network or DNS problems, or be related to a bug in FreeTDS (which is getting more stable with every new release, but should still be considered beta quality software at the moment). > Can I get the mxODBCZopeDA source from > somewhere? It would make debugging this much easier. Getting the source is not an option and won't help much either since the source of the problem is not mxODBCZopeDA. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 16 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Sun May 1 21:29:25 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Jan 26 20:00:55 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <427259F3.4090806@egenix.com> References: <20050427130906.52878.qmail@web30008.mail.mud.yahoo.com> <427259F3.4090806@egenix.com> Message-ID: <42752005.7080904@egenix.com> M.-A. Lemburg wrote: > David Rushby wrote: > >> --- "M.-A. Lemburg" wrote: >> >>> Are you using the standard mxDateTime build or one >>> with WANT_SUBCLASSABLE_TYPES defined... >> >> >> >> Presumably "the standard", since I just built with 'py24d setup.py >> build', making no attempt to enable special directives. >> >> >>> ... (mxDateTime_Deallocate is only used by the latter)? >> >> >> >> That's true in 2.1.0-2005-04-15, but not in 2.1.0b5. >> >> >>> In any case, please try our latest snapshot: >>> >>> >> >> http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-04-15.zip >> >>> to see if that makes any difference. >> >> >> >> I can't build it out of the box: > > > Hmm, looks like distutils' sdist command doesn't like our new > repository layout which uses symlinks (after we've switched to > subversion). > > We'll have to debug distutils first, I guess :-( Ok, we've found the problem and fixed it. Here's the new release (which does build out of the box at least on our boxes ;-): http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 01 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From davidrushby at yahoo.com Mon May 2 15:49:53 2005 From: davidrushby at yahoo.com (David Rushby) Date: Thu Jan 26 20:00:55 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Ok, we've found the problem and fixed it. Here's the new > release (which does build out of the box at least on our > boxes ;-): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip It does build now, but: py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" still behaves as it did when I submitted my original message: Fatal Python error: UNREF invalid object Aborted This is the same debug build of Python 2.4.1 that I was previously using, running the same configuration (CentOS Linux 4.0/i386, everything compiled with GCC 3.4.3). Have you examined my original claim as to the cause of the bug? __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 10:21:55 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Jan 26 20:00:55 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> References: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> Message-ID: <42772693.8050306@egenix.com> David Rushby wrote: > --- "M.-A. Lemburg" wrote: > >>Ok, we've found the problem and fixed it. Here's the new >>release (which does build out of the box at least on our >>boxes ;-): >> >> > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip > > It does build now, but: > py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" > still behaves as it did when I submitted my original message: > Fatal Python error: UNREF invalid object > Aborted > > This is the same debug build of Python 2.4.1 that I was previously > using, running the same configuration (CentOS Linux 4.0/i386, > everything compiled with GCC 3.4.3). > > Have you examined my original claim as to the cause of the bug? No. We haven't had time for looking into it. I'm not sure whether your analysis of the problem is correct: if you don't define WANT_SUBCLASSABLE_TYPES, the API mxDateTime_Deallocate() is neither defined nor used. Furthermore, PyObject_Del() is only called by mxDateTime_Free() if you have explicitely edited mxDateTime.c to disabled the free list #defines. In a standard build, PyObject_Del() is only called at module finalization time. Note that the reason we call mxDateTime_Free() in the constructor is that we don't want the destructor of the object to be called. Py_DECREF() would call the destructor (mxDateTime_Deallocate). It is possible that the debug code in Python complains about the refcount in the object not being 0 at the time the object is finalized (module finalization time), but I don't see any such checks in PyObject_Free() (which is what PyObject_Del() maps to). Again, all of this does not happen in regular non-debug Python builds. Please be aware that we don't support debug builds, so fixing the problem (if there is one - gcc has some serious optimization problems on some combinations of platform and version) will take a while. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 09:27:37 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Thu Jan 26 20:00:55 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 Message-ID: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Hi all- I am trying to build the mx-base package, v.2.0.6. This will be used with postgresql 7.3.9, psycopg 1.1.18, and Roundup 0.8.2. RHEL 3.0 Python 2.3 egenix-mx-base-2.0.6.tar.gz I performed a: /usr/local/bin/python2.3 setup.py install Everything looks proper with the exeception of this series of warning statements: ----------------- gcc -pthread -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fno-strict-aliasing -fPIC -Imx/BeeBase/mxBeeBase -I/usr/local/incl ude/python2.3 -I/usr/local/include -c mx/BeeBase/mxBeeBase/btr.c -o build/temp.linux-i686-2.3/mx/BeeBase/mxBeeBase/mxBeeBa se/mx/BeeBase/mxBeeBase/btr.o mx/BeeBase/mxBeeBase/btr.c: In function `dumpBuf': mx/BeeBase/mxBeeBase/btr.c:249: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:250: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:255: warning: unsigned int format, long unsigned int arg (arg 4) mx/BeeBase/mxBeeBase/btr.c:256: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c: In function `_validateTree': mx/BeeBase/mxBeeBase/btr.c:330: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:337: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:339: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:349: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:351: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 3) creating build/lib.linux-i686-2.3/mx/BeeBase creating build/lib.linux-i686-2.3/mx/BeeBase/mxBeeBase -------------- Would someone be kind enough to let me know whether these messages were expected, and if not, how I might resolve these? Thanks! DC __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 22:06:33 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Jan 26 20:00:55 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> References: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Message-ID: <4277CBB9.8020302@egenix.com> Dianne Chen wrote: > Hi all- > > I am trying to build the mx-base package, v.2.0.6. > This will be used with postgresql 7.3.9, psycopg > 1.1.18, and Roundup 0.8.2. > > RHEL 3.0 > Python 2.3 > egenix-mx-base-2.0.6.tar.gz > > I performed a: > > /usr/local/bin/python2.3 setup.py install > > Everything looks proper with the exeception of this > series of warning statements: > > ----------------- > ... > -------------- > > Would someone be kind enough to let me know whether > these messages were expected, and if not, how I might > resolve these? These warning can safely be ignored. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 13:41:14 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Thu Jan 26 20:00:55 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: 6667 Message-ID: <20050503194114.72091.qmail@web31414.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Dianne Chen wrote: > > Hi all- > > > > I am trying to build the mx-base package, v.2.0.6. > > This will be used with postgresql 7.3.9, psycopg > > 1.1.18, and Roundup 0.8.2. > > > > RHEL 3.0 > > Python 2.3 > > egenix-mx-base-2.0.6.tar.gz > > > > I performed a: > > > > /usr/local/bin/python2.3 setup.py install > > > > Everything looks proper with the exeception of > this > > series of warning statements: > > > > ----------------- > > ... > > -------------- > > > > Would someone be kind enough to let me know > whether > > these messages were expected, and if not, how I > might > > resolve these? > > These warning can safely be ignored. > > -- > Marc-Andre Lemburg > eGenix.com > Marc- Thank you very much for the reply. It helps greatly. With kind regards, DC __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From davidrushby at yahoo.com Tue May 3 17:18:46 2005 From: davidrushby at yahoo.com (David Rushby) Date: Thu Jan 26 20:00:55 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050503231846.35012.qmail@web30009.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > I'm not sure whether your analysis of the problem is correct... Indeed, my original analysis wasn't correct; I think this one is. The fatal error I'm complaining about only arises if the arguments to DateTime.DateTime are invalid, so that the object is deallocated in the onError block of mxDateTime_FromDateAndTime. If the object is created successfully, and later deallocated by Python's garbage collector, the fatal error doesn't arise. Here's my analysis of the problem: --- If the debugging directive Py_TRACE_REFS is enabled, as it is in my case, the Python interpreter maintains a doubly linked list of all Python objects (named refchain) via the _ob_next and _ob_prev pointers added to PyObject via _PyObject_HEAD_EXTRA. Each object is inserted into refchain by the _Py_AddToAllObjects call in _Py_NewReference, and removed from refchain by the _Py_ForgetReference call in _Py_Dealloc. _Py_ForgetReference performs an integrity check on the object being deallocated (op) to make sure that its neighbors in refchain recognize it. Specifically, _Py_ForgetReference verifies that the _ob_next pointer of the previous object in refchain (op->_ob_prev->_ob_next) points to op, and that the _ob_prev pointer of the next object in refchain (op->_ob_next->_ob_prev) points to op. If either of those conditions is false, the interpreter raises the fatal error I'm seeing. After mxDateTime_New pulls an mxDateTimeObject out of the free list, it calls _Py_NewReference on that object to transform it from a "conceptually deallocated" object to a "conceptually allocated" one. _Py_NewReference inserts the object into refchain. Later, when the object is being "conceptually deallocated", it should be removed from refchain with _Py_ForgetReference. The version of _Py_Dealloc that's active when Py_TRACE_REFS is enabled does this (_Py_Dealloc is the element of Py_DECREF that performs the actual destruction). _Py_Dealloc first calls _Py_ForgetReference to remove the object from refchain, then calls the object's destructor (op->ob_type->tp_dealloc). If WANT_SUBCLASSABLE_TYPES is not defined (it is not in my case), the destructor for mxDateTime_Type is mxDateTime_Free. So, if a DateTime object is deallocated normally, as a result of its reference count falling to zero, _Py_Dealloc is called on the object, which first removes it from refchain, then passes it to mxDateTime_Free. If a DateTime object is destroyed prematurely, as a result of invalid arguments to its destructor, the onError handler calls mxDateTime_Free, so the object is "conceptually deallocated" (placed in the free list), *but* the object is not removed from refchain. So if a refchain-membership-integrity-check is performed on the object in question or one of its immediate neighbors in refchain, that integrity check fails, leading to the fatal error. --- The solution is to 'Py_DECREF(...)' the object in the onError handler of its constructor, instead of passing the object directly to mxDateTime_Free. That change solves two problems: 1) It causes _Py_Dealloc to execute, which in turn executes _Py_ForgetReference, so the object is removed from refchain, as it should be. 2) At present, objects that are created successfully and later deallocated by normal reference count mechanics have a reference count of 0 when they enter the free list, whereas objects whose constructors abort their creation due to invalid arguments have a reference count of 1 when they enter the free list. Although AFAIK this doesn't cause an actual execution problem (because the object's reference count is *explicitly set to 1* rather than *incremented by 1* when the object is later "conceptually allocated" by _Py_NewReference), it is likely to confuse future maintainers and thereby lead to the introduction of an actual execution problem. I assume that if you agree that this is a reasonable solution, you'll want to apply the change not only to mxDateTime_FromDateAndTime, but to all similar constructors in mxDateTime.c. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From rj at maxxian.com Thu May 5 01:57:40 2005 From: rj at maxxian.com (RJ Juneau) Date: Thu Jan 26 20:00:55 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c5512e$f72798c0$6505a8c0@rjlaptop> I'm on the 30 day evaluation for mxodbc_zope_da. I'm getting the following error when I submit some queries: Error Type: KeyError Error Value: 'query' I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 with UCS4. The error seems to be caused by multiple rows being returned. I did see an earlier posting with the same error message. The response suggested a template error, but this is clearly not the case here. The additional evidence I've gathered so far: - I'm running the test directly from the ZSQL method, so there's no template involved. - If I use the same query with an additional "where" clause to ensure that only one row is returned, it works - If I use a value in the 'where' clause with no rows returned, it works - The same ZSQL query is being used on a Windows machine running Zope and the free ZODBC module without a problem - The query has been verified directly in mysql-client-browser Other info: - The database is MySQL 4.1.10A-0 - iODBC is the DB driver RJ Juneau -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050505/68d278bf/attachment-0056.htm From mal at egenix.com Thu May 5 12:37:43 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Jan 26 20:00:55 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c5512e$f72798c0$6505a8c0@rjlaptop> References: <000301c5512e$f72798c0$6505a8c0@rjlaptop> Message-ID: <4279E967.6010904@egenix.com> RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 > with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 09:37:42 2005 From: rj at maxxian.com (RJ Juneau) Date: Thu Jan 26 20:00:55 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000101c5516f$3b96de90$6505a8c0@rjlaptop> More interesting info on the problem: If I execute the query directly in the "test" window of the base eGenix mxODBC Database Connection window, it works fine and returns the 20 lines expected. That could point to a problem in the rendering, which seems to be where the traceback ends. Note that within the same Zope system I also have an ODBC connection to a Sybase database, and I have successfully tested multi-line ZSQL queries there. This is the traceback: Time 2005/05/05 07:55:15.294 GMT-4 Exception Type KeyError Exception Value 'query' Traceback (innermost last): Module ZPublisher.Publish, line 101, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 39, in call_object Module Shared.DC.ZRDB.DA, line 337, in manage_test Module DocumentTemplate.DT_String, line 474, in __call__ Module DocumentTemplate.DT_In, line 602, in renderwb Module DocumentTemplate.DT_Var, line 219, in render KeyError: 'query' I don't think the following is an issue, but I'll include it for completeness.I am also getting the following iODBC warnings and errors in the Zope console log, which are related to the ODBC parameters being passed by iODBC. Note that these errors also appear for all of the successful queries. [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (Setup). [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (UsageCount). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Timeout). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Reuse). As for the ZSQL snippet from the template... Since there's no template involved yet (I'm still testing directly from the ZSQL method), I assume you mean the SQL code? select h.host_name, s.system_name, s.system_handle, count(*) from terminal t, system_map s, host h where t.system_index = s.system_index and s.host_index = h.host_index group by s.system_name order by h.host_name Nothing complicated here. There are no parameters passed to the query. RJ -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: May 5, 2005 5:38 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: Re: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is > 2.3.4 with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ---------------------------------------------------------------------- > -- > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 16:00:32 2005 From: charlie at egenix.com (Charlie Clark) Date: Thu Jan 26 20:00:55 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000101c5516f$3b96de90$6505a8c0@rjlaptop> References: <000101c5516f$3b96de90$6505a8c0@rjlaptop> Message-ID: <20050505150032.644.1@bepc.1115296715.fake> On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base eGenix > mxODBC Database Connection window, it works fine and returns the 20 > lines expected. That could point to a problem in the rendering, which > seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection to > a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 10:22:17 2005 From: rj at maxxian.com (RJ Juneau) Date: Thu Jan 26 20:00:55 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505150032.644.1@bepc.1115296715.fake> Message-ID: <000201c55175$75bcad10$6505a8c0@rjlaptop> At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 11:47:14 2005 From: rj at maxxian.com (RJ Juneau) Date: Thu Jan 26 20:00:55 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c55181$549be0e0$6505a8c0@rjlaptop> Charlie, I found a fix. Here it is in case anyone else runs into this. You were correct - the problem is in another part of Zope. Based on your feedback, I did a bit more searching and found something here: http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. html The problem appears to be in Zope versions after 2.7.0. I'm running 2.7.6, and the post indicates that it also happens in 2.7.4. The solution: Edit file /lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. There are two lines in the file that start with . Edit them as follows: Change first line to: Change second line to: Just to be after, I shut down Zope before I made the changes and restarted it after. Thanks for the help! RJ -----Original Message----- From: RJ Juneau [mailto:rj@maxxian.com] Sent: May 5, 2005 9:22 AM To: 'Charlie Clark' Cc: 'egenix-users@lists.egenix.com' Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 17:57:25 2005 From: charlie at egenix.com (Charlie Clark) Date: Thu Jan 26 20:00:55 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <20050505165725.3380.2@bepc.1115296715.fake> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Thu May 5 09:15:21 2005 From: charlie at egenix.com (Charlie Clark) Date: Thu Jan 26 20:00:55 2006 Subject: [Zope-DB] RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <000001c55185$41477730$6b00a8c0@fonacier.local> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________ Zope-DB mailing list Zope-DB@zope.org http://mail.zope.org/mailman/listinfo/zope-db From rj at maxxian.com Thu May 5 12:38:00 2005 From: rj at maxxian.com (RJ Juneau) Date: Thu Jan 26 20:00:55 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000001c55188$6b841eb0$6505a8c0@rjlaptop> I just double-checked. Zope-2.7.6-final. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 12:49:16 2005 From: rj at maxxian.com (RJ Juneau) Date: Thu Jan 26 20:00:55 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000501c55189$fe149ba0$6505a8c0@rjlaptop> Charlie, The fix has only been applied for 2.7.7, 2.8b2. The info is in the original bug report which is closed and can be found here: http://www.zope.org/Collectors/Zope/1745 RJ -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Fri May 6 11:50:09 2005 From: rj at maxxian.com (RJ Juneau) Date: Thu Jan 26 20:00:55 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC Message-ID: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Still on eval for the product. I cannot get a stable connection to Sybase via the iODBC drivers. - The Sybase ODBC connection - including a query - have been verified at the iODBC level. - The setup is already working well for ODBC connection to MySQL. Symptoms include: - If I click on "Open Connection", it still comes back with "Connection Closed" when I go to a ZSQL method - Using 'Connect on Demand' is not working either. - Clicking "Open Connection" gives me the following error: Connection string: DSN=lixbox_sybase; UID=sa; PWD=XXXXXXX Connection pool entry: 0 Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection rejected by data source', 7952) The odbc.ini definition for DSN "lixbox_sybase" is as follows: [lixbox_sybase] JetFix = No NoRowSetSizeLimit = No Description = Test connection to listbox Options = LIXBOX DSQUERY = SQLSERVER TDSHOST = lixbox TDSPORT = 5000 TDSVER = 5.0 SQLSERVER_CATALOG = N CURSOR_SENSITIVITY = LOW UserName = sa Password = XXXXXXXX ServerType = Sybase 10/11/12 Driver = /opt/openlink/lib/sql_mt_lt.so Database = pubs2 ReadOnly = no NoAutoCommit = No NoLoginBox = No FetchBufferSize = 60 Other relevant data: - Connecting via OpenLink's iODBC - Zope 2.7.6-final - Python 2.3.4 - Connection to Sybase has been successfully tested with iODBC, including issuing a query - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC connection RJ Juneau Chief Technology Officer Maxxian Integration Inc. 155 Westhampton Drive Thornhill, Ontario Canada L4J 7X2 E-mail: rj@maxxian.com Phone: +1 905 482 9429 Cell: +1 416 897 6682 Toll free: +1 866 758 9161 Fax: +1 647 722 2038 -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050506/aef33361/attachment-0056.htm From mal at egenix.com Fri May 6 18:27:37 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Jan 26 20:00:55 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC In-Reply-To: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> References: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Message-ID: <427B8CE9.1010601@egenix.com> RJ Juneau wrote: > Still on eval for the product. > > I cannot get a stable connection to Sybase via the iODBC drivers. > > - The Sybase ODBC connection - including a query - have been verified at > the iODBC level. > - The setup is already working well for ODBC connection to MySQL. > > Symptoms include: > > - If I click on "Open Connection", it still comes back with "Connection > Closed" when I go to a ZSQL method > - Using 'Connect on Demand' is not working either. > - Clicking "Open Connection" gives me the following error: > > Connection string: DSN=lixbox_sybase; > UID=sa; > PWD=XXXXXXX Try writing the connection string on one line and without whitespace. ODBC drivers sometimes have problems with this. > Connection pool entry: 0 > Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection > rejected by data source', 7952) This is a generic error that relates to authentication or firewall problems. It is possible that turning on ODBC tracing the ODBC manager will give more clues as to the real cause of the problem. > The odbc.ini definition for DSN "lixbox_sybase" is as follows: > > [lixbox_sybase] > JetFix = No > NoRowSetSizeLimit = No > Description = Test connection to listbox > Options = LIXBOX > DSQUERY = SQLSERVER > TDSHOST = lixbox > TDSPORT = 5000 > TDSVER = 5.0 > SQLSERVER_CATALOG = N > CURSOR_SENSITIVITY = LOW > UserName = sa > Password = XXXXXXXX > ServerType = Sybase 10/11/12 > Driver = /opt/openlink/lib/sql_mt_lt.so > Database = pubs2 > ReadOnly = no > NoAutoCommit = No > NoLoginBox = No > FetchBufferSize = 60 > > > Other relevant data: > - Connecting via OpenLink's iODBC > - Zope 2.7.6-final > - Python 2.3.4 > - Connection to Sybase has been successfully tested with iODBC, > including issuing a query > - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC > connection > > > > RJ Juneau > Chief Technology Officer > Maxxian Integration Inc. > 155 Westhampton Drive > Thornhill, Ontario > Canada L4J 7X2 > E-mail: rj@maxxian.com > Phone: +1 905 482 9429 > Cell: +1 416 897 6682 > Toll free: +1 866 758 9161 > Fax: +1 647 722 2038 > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 06 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From calisp at gmail.com Sun May 15 23:49:03 2005 From: calisp at gmail.com (calisp@gmail.com) Date: Thu Jan 26 20:00:55 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK Message-ID: Hi, I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the following error... 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the last phase of a two-phase commit. This shouldn't happen. Traceback (most recent call last): File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one jar.tpc_finish(self) File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish try: self._finish() File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could not perform COMMIT or ROLLBACK', 1023) What could be causing this? Can I get the mxODBCZopeDA source from somewhere? It would make debugging this much easier. Thanks, Calisp. From mal at egenix.com Mon May 16 13:52:12 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Jan 26 20:00:56 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK In-Reply-To: References: Message-ID: <42887B5C.4010109@egenix.com> calisp@gmail.com wrote: > Hi, > > I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with > unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the > following error... > > 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the > last phase of a two-phase commit. This shouldn't happen. > Traceback (most recent call last): > File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one > jar.tpc_finish(self) > File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish > try: self._finish() > File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish > File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler > ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could > not perform COMMIT or ROLLBACK', 1023) You should have a look at the database logs to see what prevented the commit from being completed. > What could be causing this? Hard to say: mxODBCZopeDA is trying to commit the transaction, but the driver or database failed to complete the request. The above error was generated by the ODBC driver. This could be network or DNS problems, or be related to a bug in FreeTDS (which is getting more stable with every new release, but should still be considered beta quality software at the moment). > Can I get the mxODBCZopeDA source from > somewhere? It would make debugging this much easier. Getting the source is not an option and won't help much either since the source of the problem is not mxODBCZopeDA. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 16 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Sun May 1 21:29:25 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 27 08:07:39 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <427259F3.4090806@egenix.com> References: <20050427130906.52878.qmail@web30008.mail.mud.yahoo.com> <427259F3.4090806@egenix.com> Message-ID: <42752005.7080904@egenix.com> M.-A. Lemburg wrote: > David Rushby wrote: > >> --- "M.-A. Lemburg" wrote: >> >>> Are you using the standard mxDateTime build or one >>> with WANT_SUBCLASSABLE_TYPES defined... >> >> >> >> Presumably "the standard", since I just built with 'py24d setup.py >> build', making no attempt to enable special directives. >> >> >>> ... (mxDateTime_Deallocate is only used by the latter)? >> >> >> >> That's true in 2.1.0-2005-04-15, but not in 2.1.0b5. >> >> >>> In any case, please try our latest snapshot: >>> >>> >> >> http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-04-15.zip >> >>> to see if that makes any difference. >> >> >> >> I can't build it out of the box: > > > Hmm, looks like distutils' sdist command doesn't like our new > repository layout which uses symlinks (after we've switched to > subversion). > > We'll have to debug distutils first, I guess :-( Ok, we've found the problem and fixed it. Here's the new release (which does build out of the box at least on our boxes ;-): http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 01 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From davidrushby at yahoo.com Mon May 2 15:49:53 2005 From: davidrushby at yahoo.com (David Rushby) Date: Fri Jan 27 08:07:40 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Ok, we've found the problem and fixed it. Here's the new > release (which does build out of the box at least on our > boxes ;-): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip It does build now, but: py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" still behaves as it did when I submitted my original message: Fatal Python error: UNREF invalid object Aborted This is the same debug build of Python 2.4.1 that I was previously using, running the same configuration (CentOS Linux 4.0/i386, everything compiled with GCC 3.4.3). Have you examined my original claim as to the cause of the bug? __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 10:21:55 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 27 08:07:40 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> References: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> Message-ID: <42772693.8050306@egenix.com> David Rushby wrote: > --- "M.-A. Lemburg" wrote: > >>Ok, we've found the problem and fixed it. Here's the new >>release (which does build out of the box at least on our >>boxes ;-): >> >> > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip > > It does build now, but: > py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" > still behaves as it did when I submitted my original message: > Fatal Python error: UNREF invalid object > Aborted > > This is the same debug build of Python 2.4.1 that I was previously > using, running the same configuration (CentOS Linux 4.0/i386, > everything compiled with GCC 3.4.3). > > Have you examined my original claim as to the cause of the bug? No. We haven't had time for looking into it. I'm not sure whether your analysis of the problem is correct: if you don't define WANT_SUBCLASSABLE_TYPES, the API mxDateTime_Deallocate() is neither defined nor used. Furthermore, PyObject_Del() is only called by mxDateTime_Free() if you have explicitely edited mxDateTime.c to disabled the free list #defines. In a standard build, PyObject_Del() is only called at module finalization time. Note that the reason we call mxDateTime_Free() in the constructor is that we don't want the destructor of the object to be called. Py_DECREF() would call the destructor (mxDateTime_Deallocate). It is possible that the debug code in Python complains about the refcount in the object not being 0 at the time the object is finalized (module finalization time), but I don't see any such checks in PyObject_Free() (which is what PyObject_Del() maps to). Again, all of this does not happen in regular non-debug Python builds. Please be aware that we don't support debug builds, so fixing the problem (if there is one - gcc has some serious optimization problems on some combinations of platform and version) will take a while. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 09:27:37 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Fri Jan 27 08:07:40 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 Message-ID: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Hi all- I am trying to build the mx-base package, v.2.0.6. This will be used with postgresql 7.3.9, psycopg 1.1.18, and Roundup 0.8.2. RHEL 3.0 Python 2.3 egenix-mx-base-2.0.6.tar.gz I performed a: /usr/local/bin/python2.3 setup.py install Everything looks proper with the exeception of this series of warning statements: ----------------- gcc -pthread -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fno-strict-aliasing -fPIC -Imx/BeeBase/mxBeeBase -I/usr/local/incl ude/python2.3 -I/usr/local/include -c mx/BeeBase/mxBeeBase/btr.c -o build/temp.linux-i686-2.3/mx/BeeBase/mxBeeBase/mxBeeBa se/mx/BeeBase/mxBeeBase/btr.o mx/BeeBase/mxBeeBase/btr.c: In function `dumpBuf': mx/BeeBase/mxBeeBase/btr.c:249: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:250: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:255: warning: unsigned int format, long unsigned int arg (arg 4) mx/BeeBase/mxBeeBase/btr.c:256: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c: In function `_validateTree': mx/BeeBase/mxBeeBase/btr.c:330: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:337: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:339: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:349: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:351: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 3) creating build/lib.linux-i686-2.3/mx/BeeBase creating build/lib.linux-i686-2.3/mx/BeeBase/mxBeeBase -------------- Would someone be kind enough to let me know whether these messages were expected, and if not, how I might resolve these? Thanks! DC __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 22:06:33 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 27 08:07:40 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> References: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Message-ID: <4277CBB9.8020302@egenix.com> Dianne Chen wrote: > Hi all- > > I am trying to build the mx-base package, v.2.0.6. > This will be used with postgresql 7.3.9, psycopg > 1.1.18, and Roundup 0.8.2. > > RHEL 3.0 > Python 2.3 > egenix-mx-base-2.0.6.tar.gz > > I performed a: > > /usr/local/bin/python2.3 setup.py install > > Everything looks proper with the exeception of this > series of warning statements: > > ----------------- > ... > -------------- > > Would someone be kind enough to let me know whether > these messages were expected, and if not, how I might > resolve these? These warning can safely be ignored. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 13:41:14 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Fri Jan 27 08:07:40 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: 6667 Message-ID: <20050503194114.72091.qmail@web31414.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Dianne Chen wrote: > > Hi all- > > > > I am trying to build the mx-base package, v.2.0.6. > > This will be used with postgresql 7.3.9, psycopg > > 1.1.18, and Roundup 0.8.2. > > > > RHEL 3.0 > > Python 2.3 > > egenix-mx-base-2.0.6.tar.gz > > > > I performed a: > > > > /usr/local/bin/python2.3 setup.py install > > > > Everything looks proper with the exeception of > this > > series of warning statements: > > > > ----------------- > > ... > > -------------- > > > > Would someone be kind enough to let me know > whether > > these messages were expected, and if not, how I > might > > resolve these? > > These warning can safely be ignored. > > -- > Marc-Andre Lemburg > eGenix.com > Marc- Thank you very much for the reply. It helps greatly. With kind regards, DC __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From davidrushby at yahoo.com Tue May 3 17:18:46 2005 From: davidrushby at yahoo.com (David Rushby) Date: Fri Jan 27 08:07:40 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050503231846.35012.qmail@web30009.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > I'm not sure whether your analysis of the problem is correct... Indeed, my original analysis wasn't correct; I think this one is. The fatal error I'm complaining about only arises if the arguments to DateTime.DateTime are invalid, so that the object is deallocated in the onError block of mxDateTime_FromDateAndTime. If the object is created successfully, and later deallocated by Python's garbage collector, the fatal error doesn't arise. Here's my analysis of the problem: --- If the debugging directive Py_TRACE_REFS is enabled, as it is in my case, the Python interpreter maintains a doubly linked list of all Python objects (named refchain) via the _ob_next and _ob_prev pointers added to PyObject via _PyObject_HEAD_EXTRA. Each object is inserted into refchain by the _Py_AddToAllObjects call in _Py_NewReference, and removed from refchain by the _Py_ForgetReference call in _Py_Dealloc. _Py_ForgetReference performs an integrity check on the object being deallocated (op) to make sure that its neighbors in refchain recognize it. Specifically, _Py_ForgetReference verifies that the _ob_next pointer of the previous object in refchain (op->_ob_prev->_ob_next) points to op, and that the _ob_prev pointer of the next object in refchain (op->_ob_next->_ob_prev) points to op. If either of those conditions is false, the interpreter raises the fatal error I'm seeing. After mxDateTime_New pulls an mxDateTimeObject out of the free list, it calls _Py_NewReference on that object to transform it from a "conceptually deallocated" object to a "conceptually allocated" one. _Py_NewReference inserts the object into refchain. Later, when the object is being "conceptually deallocated", it should be removed from refchain with _Py_ForgetReference. The version of _Py_Dealloc that's active when Py_TRACE_REFS is enabled does this (_Py_Dealloc is the element of Py_DECREF that performs the actual destruction). _Py_Dealloc first calls _Py_ForgetReference to remove the object from refchain, then calls the object's destructor (op->ob_type->tp_dealloc). If WANT_SUBCLASSABLE_TYPES is not defined (it is not in my case), the destructor for mxDateTime_Type is mxDateTime_Free. So, if a DateTime object is deallocated normally, as a result of its reference count falling to zero, _Py_Dealloc is called on the object, which first removes it from refchain, then passes it to mxDateTime_Free. If a DateTime object is destroyed prematurely, as a result of invalid arguments to its destructor, the onError handler calls mxDateTime_Free, so the object is "conceptually deallocated" (placed in the free list), *but* the object is not removed from refchain. So if a refchain-membership-integrity-check is performed on the object in question or one of its immediate neighbors in refchain, that integrity check fails, leading to the fatal error. --- The solution is to 'Py_DECREF(...)' the object in the onError handler of its constructor, instead of passing the object directly to mxDateTime_Free. That change solves two problems: 1) It causes _Py_Dealloc to execute, which in turn executes _Py_ForgetReference, so the object is removed from refchain, as it should be. 2) At present, objects that are created successfully and later deallocated by normal reference count mechanics have a reference count of 0 when they enter the free list, whereas objects whose constructors abort their creation due to invalid arguments have a reference count of 1 when they enter the free list. Although AFAIK this doesn't cause an actual execution problem (because the object's reference count is *explicitly set to 1* rather than *incremented by 1* when the object is later "conceptually allocated" by _Py_NewReference), it is likely to confuse future maintainers and thereby lead to the introduction of an actual execution problem. I assume that if you agree that this is a reasonable solution, you'll want to apply the change not only to mxDateTime_FromDateAndTime, but to all similar constructors in mxDateTime.c. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From rj at maxxian.com Thu May 5 01:57:40 2005 From: rj at maxxian.com (RJ Juneau) Date: Fri Jan 27 08:07:40 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c5512e$f72798c0$6505a8c0@rjlaptop> I'm on the 30 day evaluation for mxodbc_zope_da. I'm getting the following error when I submit some queries: Error Type: KeyError Error Value: 'query' I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 with UCS4. The error seems to be caused by multiple rows being returned. I did see an earlier posting with the same error message. The response suggested a template error, but this is clearly not the case here. The additional evidence I've gathered so far: - I'm running the test directly from the ZSQL method, so there's no template involved. - If I use the same query with an additional "where" clause to ensure that only one row is returned, it works - If I use a value in the 'where' clause with no rows returned, it works - The same ZSQL query is being used on a Windows machine running Zope and the free ZODBC module without a problem - The query has been verified directly in mysql-client-browser Other info: - The database is MySQL 4.1.10A-0 - iODBC is the DB driver RJ Juneau -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050505/68d278bf/attachment-0057.htm From mal at egenix.com Thu May 5 12:37:43 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 27 08:07:40 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c5512e$f72798c0$6505a8c0@rjlaptop> References: <000301c5512e$f72798c0$6505a8c0@rjlaptop> Message-ID: <4279E967.6010904@egenix.com> RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 > with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 09:37:42 2005 From: rj at maxxian.com (RJ Juneau) Date: Fri Jan 27 08:07:41 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000101c5516f$3b96de90$6505a8c0@rjlaptop> More interesting info on the problem: If I execute the query directly in the "test" window of the base eGenix mxODBC Database Connection window, it works fine and returns the 20 lines expected. That could point to a problem in the rendering, which seems to be where the traceback ends. Note that within the same Zope system I also have an ODBC connection to a Sybase database, and I have successfully tested multi-line ZSQL queries there. This is the traceback: Time 2005/05/05 07:55:15.294 GMT-4 Exception Type KeyError Exception Value 'query' Traceback (innermost last): Module ZPublisher.Publish, line 101, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 39, in call_object Module Shared.DC.ZRDB.DA, line 337, in manage_test Module DocumentTemplate.DT_String, line 474, in __call__ Module DocumentTemplate.DT_In, line 602, in renderwb Module DocumentTemplate.DT_Var, line 219, in render KeyError: 'query' I don't think the following is an issue, but I'll include it for completeness.I am also getting the following iODBC warnings and errors in the Zope console log, which are related to the ODBC parameters being passed by iODBC. Note that these errors also appear for all of the successful queries. [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (Setup). [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (UsageCount). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Timeout). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Reuse). As for the ZSQL snippet from the template... Since there's no template involved yet (I'm still testing directly from the ZSQL method), I assume you mean the SQL code? select h.host_name, s.system_name, s.system_handle, count(*) from terminal t, system_map s, host h where t.system_index = s.system_index and s.host_index = h.host_index group by s.system_name order by h.host_name Nothing complicated here. There are no parameters passed to the query. RJ -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: May 5, 2005 5:38 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: Re: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is > 2.3.4 with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ---------------------------------------------------------------------- > -- > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 16:00:32 2005 From: charlie at egenix.com (Charlie Clark) Date: Fri Jan 27 08:07:41 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000101c5516f$3b96de90$6505a8c0@rjlaptop> References: <000101c5516f$3b96de90$6505a8c0@rjlaptop> Message-ID: <20050505150032.644.1@bepc.1115296715.fake> On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base eGenix > mxODBC Database Connection window, it works fine and returns the 20 > lines expected. That could point to a problem in the rendering, which > seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection to > a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 10:22:17 2005 From: rj at maxxian.com (RJ Juneau) Date: Fri Jan 27 08:07:41 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505150032.644.1@bepc.1115296715.fake> Message-ID: <000201c55175$75bcad10$6505a8c0@rjlaptop> At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 11:47:14 2005 From: rj at maxxian.com (RJ Juneau) Date: Fri Jan 27 08:07:41 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c55181$549be0e0$6505a8c0@rjlaptop> Charlie, I found a fix. Here it is in case anyone else runs into this. You were correct - the problem is in another part of Zope. Based on your feedback, I did a bit more searching and found something here: http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. html The problem appears to be in Zope versions after 2.7.0. I'm running 2.7.6, and the post indicates that it also happens in 2.7.4. The solution: Edit file /lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. There are two lines in the file that start with . Edit them as follows: Change first line to: Change second line to: Just to be after, I shut down Zope before I made the changes and restarted it after. Thanks for the help! RJ -----Original Message----- From: RJ Juneau [mailto:rj@maxxian.com] Sent: May 5, 2005 9:22 AM To: 'Charlie Clark' Cc: 'egenix-users@lists.egenix.com' Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 17:57:25 2005 From: charlie at egenix.com (Charlie Clark) Date: Fri Jan 27 08:07:41 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <20050505165725.3380.2@bepc.1115296715.fake> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Thu May 5 09:15:21 2005 From: charlie at egenix.com (Charlie Clark) Date: Fri Jan 27 08:07:41 2006 Subject: [Zope-DB] RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <000001c55185$41477730$6b00a8c0@fonacier.local> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________ Zope-DB mailing list Zope-DB@zope.org http://mail.zope.org/mailman/listinfo/zope-db From rj at maxxian.com Thu May 5 12:38:00 2005 From: rj at maxxian.com (RJ Juneau) Date: Fri Jan 27 08:07:41 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000001c55188$6b841eb0$6505a8c0@rjlaptop> I just double-checked. Zope-2.7.6-final. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 12:49:16 2005 From: rj at maxxian.com (RJ Juneau) Date: Fri Jan 27 08:07:41 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000501c55189$fe149ba0$6505a8c0@rjlaptop> Charlie, The fix has only been applied for 2.7.7, 2.8b2. The info is in the original bug report which is closed and can be found here: http://www.zope.org/Collectors/Zope/1745 RJ -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Fri May 6 11:50:09 2005 From: rj at maxxian.com (RJ Juneau) Date: Fri Jan 27 08:07:42 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC Message-ID: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Still on eval for the product. I cannot get a stable connection to Sybase via the iODBC drivers. - The Sybase ODBC connection - including a query - have been verified at the iODBC level. - The setup is already working well for ODBC connection to MySQL. Symptoms include: - If I click on "Open Connection", it still comes back with "Connection Closed" when I go to a ZSQL method - Using 'Connect on Demand' is not working either. - Clicking "Open Connection" gives me the following error: Connection string: DSN=lixbox_sybase; UID=sa; PWD=XXXXXXX Connection pool entry: 0 Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection rejected by data source', 7952) The odbc.ini definition for DSN "lixbox_sybase" is as follows: [lixbox_sybase] JetFix = No NoRowSetSizeLimit = No Description = Test connection to listbox Options = LIXBOX DSQUERY = SQLSERVER TDSHOST = lixbox TDSPORT = 5000 TDSVER = 5.0 SQLSERVER_CATALOG = N CURSOR_SENSITIVITY = LOW UserName = sa Password = XXXXXXXX ServerType = Sybase 10/11/12 Driver = /opt/openlink/lib/sql_mt_lt.so Database = pubs2 ReadOnly = no NoAutoCommit = No NoLoginBox = No FetchBufferSize = 60 Other relevant data: - Connecting via OpenLink's iODBC - Zope 2.7.6-final - Python 2.3.4 - Connection to Sybase has been successfully tested with iODBC, including issuing a query - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC connection RJ Juneau Chief Technology Officer Maxxian Integration Inc. 155 Westhampton Drive Thornhill, Ontario Canada L4J 7X2 E-mail: rj@maxxian.com Phone: +1 905 482 9429 Cell: +1 416 897 6682 Toll free: +1 866 758 9161 Fax: +1 647 722 2038 -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050506/aef33361/attachment-0057.htm From mal at egenix.com Fri May 6 18:27:37 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 27 08:07:42 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC In-Reply-To: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> References: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Message-ID: <427B8CE9.1010601@egenix.com> RJ Juneau wrote: > Still on eval for the product. > > I cannot get a stable connection to Sybase via the iODBC drivers. > > - The Sybase ODBC connection - including a query - have been verified at > the iODBC level. > - The setup is already working well for ODBC connection to MySQL. > > Symptoms include: > > - If I click on "Open Connection", it still comes back with "Connection > Closed" when I go to a ZSQL method > - Using 'Connect on Demand' is not working either. > - Clicking "Open Connection" gives me the following error: > > Connection string: DSN=lixbox_sybase; > UID=sa; > PWD=XXXXXXX Try writing the connection string on one line and without whitespace. ODBC drivers sometimes have problems with this. > Connection pool entry: 0 > Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection > rejected by data source', 7952) This is a generic error that relates to authentication or firewall problems. It is possible that turning on ODBC tracing the ODBC manager will give more clues as to the real cause of the problem. > The odbc.ini definition for DSN "lixbox_sybase" is as follows: > > [lixbox_sybase] > JetFix = No > NoRowSetSizeLimit = No > Description = Test connection to listbox > Options = LIXBOX > DSQUERY = SQLSERVER > TDSHOST = lixbox > TDSPORT = 5000 > TDSVER = 5.0 > SQLSERVER_CATALOG = N > CURSOR_SENSITIVITY = LOW > UserName = sa > Password = XXXXXXXX > ServerType = Sybase 10/11/12 > Driver = /opt/openlink/lib/sql_mt_lt.so > Database = pubs2 > ReadOnly = no > NoAutoCommit = No > NoLoginBox = No > FetchBufferSize = 60 > > > Other relevant data: > - Connecting via OpenLink's iODBC > - Zope 2.7.6-final > - Python 2.3.4 > - Connection to Sybase has been successfully tested with iODBC, > including issuing a query > - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC > connection > > > > RJ Juneau > Chief Technology Officer > Maxxian Integration Inc. > 155 Westhampton Drive > Thornhill, Ontario > Canada L4J 7X2 > E-mail: rj@maxxian.com > Phone: +1 905 482 9429 > Cell: +1 416 897 6682 > Toll free: +1 866 758 9161 > Fax: +1 647 722 2038 > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 06 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From calisp at gmail.com Sun May 15 23:49:03 2005 From: calisp at gmail.com (calisp@gmail.com) Date: Fri Jan 27 08:07:42 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK Message-ID: Hi, I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the following error... 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the last phase of a two-phase commit. This shouldn't happen. Traceback (most recent call last): File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one jar.tpc_finish(self) File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish try: self._finish() File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could not perform COMMIT or ROLLBACK', 1023) What could be causing this? Can I get the mxODBCZopeDA source from somewhere? It would make debugging this much easier. Thanks, Calisp. From mal at egenix.com Mon May 16 13:52:12 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 27 08:07:42 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK In-Reply-To: References: Message-ID: <42887B5C.4010109@egenix.com> calisp@gmail.com wrote: > Hi, > > I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with > unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the > following error... > > 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the > last phase of a two-phase commit. This shouldn't happen. > Traceback (most recent call last): > File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one > jar.tpc_finish(self) > File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish > try: self._finish() > File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish > File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler > ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could > not perform COMMIT or ROLLBACK', 1023) You should have a look at the database logs to see what prevented the commit from being completed. > What could be causing this? Hard to say: mxODBCZopeDA is trying to commit the transaction, but the driver or database failed to complete the request. The above error was generated by the ODBC driver. This could be network or DNS problems, or be related to a bug in FreeTDS (which is getting more stable with every new release, but should still be considered beta quality software at the moment). > Can I get the mxODBCZopeDA source from > somewhere? It would make debugging this much easier. Getting the source is not an option and won't help much either since the source of the problem is not mxODBCZopeDA. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 16 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Sun May 1 21:29:25 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 27 12:02:25 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <427259F3.4090806@egenix.com> References: <20050427130906.52878.qmail@web30008.mail.mud.yahoo.com> <427259F3.4090806@egenix.com> Message-ID: <42752005.7080904@egenix.com> M.-A. Lemburg wrote: > David Rushby wrote: > >> --- "M.-A. Lemburg" wrote: >> >>> Are you using the standard mxDateTime build or one >>> with WANT_SUBCLASSABLE_TYPES defined... >> >> >> >> Presumably "the standard", since I just built with 'py24d setup.py >> build', making no attempt to enable special directives. >> >> >>> ... (mxDateTime_Deallocate is only used by the latter)? >> >> >> >> That's true in 2.1.0-2005-04-15, but not in 2.1.0b5. >> >> >>> In any case, please try our latest snapshot: >>> >>> >> >> http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-04-15.zip >> >>> to see if that makes any difference. >> >> >> >> I can't build it out of the box: > > > Hmm, looks like distutils' sdist command doesn't like our new > repository layout which uses symlinks (after we've switched to > subversion). > > We'll have to debug distutils first, I guess :-( Ok, we've found the problem and fixed it. Here's the new release (which does build out of the box at least on our boxes ;-): http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 01 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From davidrushby at yahoo.com Mon May 2 15:49:53 2005 From: davidrushby at yahoo.com (David Rushby) Date: Fri Jan 27 12:02:25 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Ok, we've found the problem and fixed it. Here's the new > release (which does build out of the box at least on our > boxes ;-): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip It does build now, but: py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" still behaves as it did when I submitted my original message: Fatal Python error: UNREF invalid object Aborted This is the same debug build of Python 2.4.1 that I was previously using, running the same configuration (CentOS Linux 4.0/i386, everything compiled with GCC 3.4.3). Have you examined my original claim as to the cause of the bug? __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 10:21:55 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 27 12:02:25 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> References: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> Message-ID: <42772693.8050306@egenix.com> David Rushby wrote: > --- "M.-A. Lemburg" wrote: > >>Ok, we've found the problem and fixed it. Here's the new >>release (which does build out of the box at least on our >>boxes ;-): >> >> > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip > > It does build now, but: > py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" > still behaves as it did when I submitted my original message: > Fatal Python error: UNREF invalid object > Aborted > > This is the same debug build of Python 2.4.1 that I was previously > using, running the same configuration (CentOS Linux 4.0/i386, > everything compiled with GCC 3.4.3). > > Have you examined my original claim as to the cause of the bug? No. We haven't had time for looking into it. I'm not sure whether your analysis of the problem is correct: if you don't define WANT_SUBCLASSABLE_TYPES, the API mxDateTime_Deallocate() is neither defined nor used. Furthermore, PyObject_Del() is only called by mxDateTime_Free() if you have explicitely edited mxDateTime.c to disabled the free list #defines. In a standard build, PyObject_Del() is only called at module finalization time. Note that the reason we call mxDateTime_Free() in the constructor is that we don't want the destructor of the object to be called. Py_DECREF() would call the destructor (mxDateTime_Deallocate). It is possible that the debug code in Python complains about the refcount in the object not being 0 at the time the object is finalized (module finalization time), but I don't see any such checks in PyObject_Free() (which is what PyObject_Del() maps to). Again, all of this does not happen in regular non-debug Python builds. Please be aware that we don't support debug builds, so fixing the problem (if there is one - gcc has some serious optimization problems on some combinations of platform and version) will take a while. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 09:27:37 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Fri Jan 27 12:02:25 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 Message-ID: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Hi all- I am trying to build the mx-base package, v.2.0.6. This will be used with postgresql 7.3.9, psycopg 1.1.18, and Roundup 0.8.2. RHEL 3.0 Python 2.3 egenix-mx-base-2.0.6.tar.gz I performed a: /usr/local/bin/python2.3 setup.py install Everything looks proper with the exeception of this series of warning statements: ----------------- gcc -pthread -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fno-strict-aliasing -fPIC -Imx/BeeBase/mxBeeBase -I/usr/local/incl ude/python2.3 -I/usr/local/include -c mx/BeeBase/mxBeeBase/btr.c -o build/temp.linux-i686-2.3/mx/BeeBase/mxBeeBase/mxBeeBa se/mx/BeeBase/mxBeeBase/btr.o mx/BeeBase/mxBeeBase/btr.c: In function `dumpBuf': mx/BeeBase/mxBeeBase/btr.c:249: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:250: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:255: warning: unsigned int format, long unsigned int arg (arg 4) mx/BeeBase/mxBeeBase/btr.c:256: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c: In function `_validateTree': mx/BeeBase/mxBeeBase/btr.c:330: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:337: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:339: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:349: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:351: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 3) creating build/lib.linux-i686-2.3/mx/BeeBase creating build/lib.linux-i686-2.3/mx/BeeBase/mxBeeBase -------------- Would someone be kind enough to let me know whether these messages were expected, and if not, how I might resolve these? Thanks! DC __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 22:06:33 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 27 12:02:25 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> References: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Message-ID: <4277CBB9.8020302@egenix.com> Dianne Chen wrote: > Hi all- > > I am trying to build the mx-base package, v.2.0.6. > This will be used with postgresql 7.3.9, psycopg > 1.1.18, and Roundup 0.8.2. > > RHEL 3.0 > Python 2.3 > egenix-mx-base-2.0.6.tar.gz > > I performed a: > > /usr/local/bin/python2.3 setup.py install > > Everything looks proper with the exeception of this > series of warning statements: > > ----------------- > ... > -------------- > > Would someone be kind enough to let me know whether > these messages were expected, and if not, how I might > resolve these? These warning can safely be ignored. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 13:41:14 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Fri Jan 27 12:02:25 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: 6667 Message-ID: <20050503194114.72091.qmail@web31414.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Dianne Chen wrote: > > Hi all- > > > > I am trying to build the mx-base package, v.2.0.6. > > This will be used with postgresql 7.3.9, psycopg > > 1.1.18, and Roundup 0.8.2. > > > > RHEL 3.0 > > Python 2.3 > > egenix-mx-base-2.0.6.tar.gz > > > > I performed a: > > > > /usr/local/bin/python2.3 setup.py install > > > > Everything looks proper with the exeception of > this > > series of warning statements: > > > > ----------------- > > ... > > -------------- > > > > Would someone be kind enough to let me know > whether > > these messages were expected, and if not, how I > might > > resolve these? > > These warning can safely be ignored. > > -- > Marc-Andre Lemburg > eGenix.com > Marc- Thank you very much for the reply. It helps greatly. With kind regards, DC __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From davidrushby at yahoo.com Tue May 3 17:18:46 2005 From: davidrushby at yahoo.com (David Rushby) Date: Fri Jan 27 12:02:25 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050503231846.35012.qmail@web30009.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > I'm not sure whether your analysis of the problem is correct... Indeed, my original analysis wasn't correct; I think this one is. The fatal error I'm complaining about only arises if the arguments to DateTime.DateTime are invalid, so that the object is deallocated in the onError block of mxDateTime_FromDateAndTime. If the object is created successfully, and later deallocated by Python's garbage collector, the fatal error doesn't arise. Here's my analysis of the problem: --- If the debugging directive Py_TRACE_REFS is enabled, as it is in my case, the Python interpreter maintains a doubly linked list of all Python objects (named refchain) via the _ob_next and _ob_prev pointers added to PyObject via _PyObject_HEAD_EXTRA. Each object is inserted into refchain by the _Py_AddToAllObjects call in _Py_NewReference, and removed from refchain by the _Py_ForgetReference call in _Py_Dealloc. _Py_ForgetReference performs an integrity check on the object being deallocated (op) to make sure that its neighbors in refchain recognize it. Specifically, _Py_ForgetReference verifies that the _ob_next pointer of the previous object in refchain (op->_ob_prev->_ob_next) points to op, and that the _ob_prev pointer of the next object in refchain (op->_ob_next->_ob_prev) points to op. If either of those conditions is false, the interpreter raises the fatal error I'm seeing. After mxDateTime_New pulls an mxDateTimeObject out of the free list, it calls _Py_NewReference on that object to transform it from a "conceptually deallocated" object to a "conceptually allocated" one. _Py_NewReference inserts the object into refchain. Later, when the object is being "conceptually deallocated", it should be removed from refchain with _Py_ForgetReference. The version of _Py_Dealloc that's active when Py_TRACE_REFS is enabled does this (_Py_Dealloc is the element of Py_DECREF that performs the actual destruction). _Py_Dealloc first calls _Py_ForgetReference to remove the object from refchain, then calls the object's destructor (op->ob_type->tp_dealloc). If WANT_SUBCLASSABLE_TYPES is not defined (it is not in my case), the destructor for mxDateTime_Type is mxDateTime_Free. So, if a DateTime object is deallocated normally, as a result of its reference count falling to zero, _Py_Dealloc is called on the object, which first removes it from refchain, then passes it to mxDateTime_Free. If a DateTime object is destroyed prematurely, as a result of invalid arguments to its destructor, the onError handler calls mxDateTime_Free, so the object is "conceptually deallocated" (placed in the free list), *but* the object is not removed from refchain. So if a refchain-membership-integrity-check is performed on the object in question or one of its immediate neighbors in refchain, that integrity check fails, leading to the fatal error. --- The solution is to 'Py_DECREF(...)' the object in the onError handler of its constructor, instead of passing the object directly to mxDateTime_Free. That change solves two problems: 1) It causes _Py_Dealloc to execute, which in turn executes _Py_ForgetReference, so the object is removed from refchain, as it should be. 2) At present, objects that are created successfully and later deallocated by normal reference count mechanics have a reference count of 0 when they enter the free list, whereas objects whose constructors abort their creation due to invalid arguments have a reference count of 1 when they enter the free list. Although AFAIK this doesn't cause an actual execution problem (because the object's reference count is *explicitly set to 1* rather than *incremented by 1* when the object is later "conceptually allocated" by _Py_NewReference), it is likely to confuse future maintainers and thereby lead to the introduction of an actual execution problem. I assume that if you agree that this is a reasonable solution, you'll want to apply the change not only to mxDateTime_FromDateAndTime, but to all similar constructors in mxDateTime.c. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From rj at maxxian.com Thu May 5 01:57:40 2005 From: rj at maxxian.com (RJ Juneau) Date: Fri Jan 27 12:02:25 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c5512e$f72798c0$6505a8c0@rjlaptop> I'm on the 30 day evaluation for mxodbc_zope_da. I'm getting the following error when I submit some queries: Error Type: KeyError Error Value: 'query' I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 with UCS4. The error seems to be caused by multiple rows being returned. I did see an earlier posting with the same error message. The response suggested a template error, but this is clearly not the case here. The additional evidence I've gathered so far: - I'm running the test directly from the ZSQL method, so there's no template involved. - If I use the same query with an additional "where" clause to ensure that only one row is returned, it works - If I use a value in the 'where' clause with no rows returned, it works - The same ZSQL query is being used on a Windows machine running Zope and the free ZODBC module without a problem - The query has been verified directly in mysql-client-browser Other info: - The database is MySQL 4.1.10A-0 - iODBC is the DB driver RJ Juneau -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050505/68d278bf/attachment-0058.htm From mal at egenix.com Thu May 5 12:37:43 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 27 12:02:25 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c5512e$f72798c0$6505a8c0@rjlaptop> References: <000301c5512e$f72798c0$6505a8c0@rjlaptop> Message-ID: <4279E967.6010904@egenix.com> RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 > with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 09:37:42 2005 From: rj at maxxian.com (RJ Juneau) Date: Fri Jan 27 12:02:25 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000101c5516f$3b96de90$6505a8c0@rjlaptop> More interesting info on the problem: If I execute the query directly in the "test" window of the base eGenix mxODBC Database Connection window, it works fine and returns the 20 lines expected. That could point to a problem in the rendering, which seems to be where the traceback ends. Note that within the same Zope system I also have an ODBC connection to a Sybase database, and I have successfully tested multi-line ZSQL queries there. This is the traceback: Time 2005/05/05 07:55:15.294 GMT-4 Exception Type KeyError Exception Value 'query' Traceback (innermost last): Module ZPublisher.Publish, line 101, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 39, in call_object Module Shared.DC.ZRDB.DA, line 337, in manage_test Module DocumentTemplate.DT_String, line 474, in __call__ Module DocumentTemplate.DT_In, line 602, in renderwb Module DocumentTemplate.DT_Var, line 219, in render KeyError: 'query' I don't think the following is an issue, but I'll include it for completeness.I am also getting the following iODBC warnings and errors in the Zope console log, which are related to the ODBC parameters being passed by iODBC. Note that these errors also appear for all of the successful queries. [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (Setup). [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (UsageCount). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Timeout). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Reuse). As for the ZSQL snippet from the template... Since there's no template involved yet (I'm still testing directly from the ZSQL method), I assume you mean the SQL code? select h.host_name, s.system_name, s.system_handle, count(*) from terminal t, system_map s, host h where t.system_index = s.system_index and s.host_index = h.host_index group by s.system_name order by h.host_name Nothing complicated here. There are no parameters passed to the query. RJ -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: May 5, 2005 5:38 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: Re: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is > 2.3.4 with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ---------------------------------------------------------------------- > -- > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 16:00:32 2005 From: charlie at egenix.com (Charlie Clark) Date: Fri Jan 27 12:02:25 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000101c5516f$3b96de90$6505a8c0@rjlaptop> References: <000101c5516f$3b96de90$6505a8c0@rjlaptop> Message-ID: <20050505150032.644.1@bepc.1115296715.fake> On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base eGenix > mxODBC Database Connection window, it works fine and returns the 20 > lines expected. That could point to a problem in the rendering, which > seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection to > a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 10:22:17 2005 From: rj at maxxian.com (RJ Juneau) Date: Fri Jan 27 12:02:25 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505150032.644.1@bepc.1115296715.fake> Message-ID: <000201c55175$75bcad10$6505a8c0@rjlaptop> At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 11:47:14 2005 From: rj at maxxian.com (RJ Juneau) Date: Fri Jan 27 12:02:25 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c55181$549be0e0$6505a8c0@rjlaptop> Charlie, I found a fix. Here it is in case anyone else runs into this. You were correct - the problem is in another part of Zope. Based on your feedback, I did a bit more searching and found something here: http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. html The problem appears to be in Zope versions after 2.7.0. I'm running 2.7.6, and the post indicates that it also happens in 2.7.4. The solution: Edit file /lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. There are two lines in the file that start with . Edit them as follows: Change first line to: Change second line to: Just to be after, I shut down Zope before I made the changes and restarted it after. Thanks for the help! RJ -----Original Message----- From: RJ Juneau [mailto:rj@maxxian.com] Sent: May 5, 2005 9:22 AM To: 'Charlie Clark' Cc: 'egenix-users@lists.egenix.com' Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 17:57:25 2005 From: charlie at egenix.com (Charlie Clark) Date: Fri Jan 27 12:02:25 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <20050505165725.3380.2@bepc.1115296715.fake> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Thu May 5 09:15:21 2005 From: charlie at egenix.com (Charlie Clark) Date: Fri Jan 27 12:02:25 2006 Subject: [Zope-DB] RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <000001c55185$41477730$6b00a8c0@fonacier.local> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________ Zope-DB mailing list Zope-DB@zope.org http://mail.zope.org/mailman/listinfo/zope-db From rj at maxxian.com Thu May 5 12:38:00 2005 From: rj at maxxian.com (RJ Juneau) Date: Fri Jan 27 12:02:25 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000001c55188$6b841eb0$6505a8c0@rjlaptop> I just double-checked. Zope-2.7.6-final. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 12:49:16 2005 From: rj at maxxian.com (RJ Juneau) Date: Fri Jan 27 12:02:25 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000501c55189$fe149ba0$6505a8c0@rjlaptop> Charlie, The fix has only been applied for 2.7.7, 2.8b2. The info is in the original bug report which is closed and can be found here: http://www.zope.org/Collectors/Zope/1745 RJ -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Fri May 6 11:50:09 2005 From: rj at maxxian.com (RJ Juneau) Date: Fri Jan 27 12:02:25 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC Message-ID: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Still on eval for the product. I cannot get a stable connection to Sybase via the iODBC drivers. - The Sybase ODBC connection - including a query - have been verified at the iODBC level. - The setup is already working well for ODBC connection to MySQL. Symptoms include: - If I click on "Open Connection", it still comes back with "Connection Closed" when I go to a ZSQL method - Using 'Connect on Demand' is not working either. - Clicking "Open Connection" gives me the following error: Connection string: DSN=lixbox_sybase; UID=sa; PWD=XXXXXXX Connection pool entry: 0 Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection rejected by data source', 7952) The odbc.ini definition for DSN "lixbox_sybase" is as follows: [lixbox_sybase] JetFix = No NoRowSetSizeLimit = No Description = Test connection to listbox Options = LIXBOX DSQUERY = SQLSERVER TDSHOST = lixbox TDSPORT = 5000 TDSVER = 5.0 SQLSERVER_CATALOG = N CURSOR_SENSITIVITY = LOW UserName = sa Password = XXXXXXXX ServerType = Sybase 10/11/12 Driver = /opt/openlink/lib/sql_mt_lt.so Database = pubs2 ReadOnly = no NoAutoCommit = No NoLoginBox = No FetchBufferSize = 60 Other relevant data: - Connecting via OpenLink's iODBC - Zope 2.7.6-final - Python 2.3.4 - Connection to Sybase has been successfully tested with iODBC, including issuing a query - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC connection RJ Juneau Chief Technology Officer Maxxian Integration Inc. 155 Westhampton Drive Thornhill, Ontario Canada L4J 7X2 E-mail: rj@maxxian.com Phone: +1 905 482 9429 Cell: +1 416 897 6682 Toll free: +1 866 758 9161 Fax: +1 647 722 2038 -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050506/aef33361/attachment-0058.htm From mal at egenix.com Fri May 6 18:27:37 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 27 12:02:25 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC In-Reply-To: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> References: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Message-ID: <427B8CE9.1010601@egenix.com> RJ Juneau wrote: > Still on eval for the product. > > I cannot get a stable connection to Sybase via the iODBC drivers. > > - The Sybase ODBC connection - including a query - have been verified at > the iODBC level. > - The setup is already working well for ODBC connection to MySQL. > > Symptoms include: > > - If I click on "Open Connection", it still comes back with "Connection > Closed" when I go to a ZSQL method > - Using 'Connect on Demand' is not working either. > - Clicking "Open Connection" gives me the following error: > > Connection string: DSN=lixbox_sybase; > UID=sa; > PWD=XXXXXXX Try writing the connection string on one line and without whitespace. ODBC drivers sometimes have problems with this. > Connection pool entry: 0 > Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection > rejected by data source', 7952) This is a generic error that relates to authentication or firewall problems. It is possible that turning on ODBC tracing the ODBC manager will give more clues as to the real cause of the problem. > The odbc.ini definition for DSN "lixbox_sybase" is as follows: > > [lixbox_sybase] > JetFix = No > NoRowSetSizeLimit = No > Description = Test connection to listbox > Options = LIXBOX > DSQUERY = SQLSERVER > TDSHOST = lixbox > TDSPORT = 5000 > TDSVER = 5.0 > SQLSERVER_CATALOG = N > CURSOR_SENSITIVITY = LOW > UserName = sa > Password = XXXXXXXX > ServerType = Sybase 10/11/12 > Driver = /opt/openlink/lib/sql_mt_lt.so > Database = pubs2 > ReadOnly = no > NoAutoCommit = No > NoLoginBox = No > FetchBufferSize = 60 > > > Other relevant data: > - Connecting via OpenLink's iODBC > - Zope 2.7.6-final > - Python 2.3.4 > - Connection to Sybase has been successfully tested with iODBC, > including issuing a query > - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC > connection > > > > RJ Juneau > Chief Technology Officer > Maxxian Integration Inc. > 155 Westhampton Drive > Thornhill, Ontario > Canada L4J 7X2 > E-mail: rj@maxxian.com > Phone: +1 905 482 9429 > Cell: +1 416 897 6682 > Toll free: +1 866 758 9161 > Fax: +1 647 722 2038 > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 06 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From calisp at gmail.com Sun May 15 23:49:03 2005 From: calisp at gmail.com (calisp@gmail.com) Date: Fri Jan 27 12:02:26 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK Message-ID: Hi, I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the following error... 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the last phase of a two-phase commit. This shouldn't happen. Traceback (most recent call last): File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one jar.tpc_finish(self) File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish try: self._finish() File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could not perform COMMIT or ROLLBACK', 1023) What could be causing this? Can I get the mxODBCZopeDA source from somewhere? It would make debugging this much easier. Thanks, Calisp. From mal at egenix.com Mon May 16 13:52:12 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 27 12:02:26 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK In-Reply-To: References: Message-ID: <42887B5C.4010109@egenix.com> calisp@gmail.com wrote: > Hi, > > I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with > unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the > following error... > > 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the > last phase of a two-phase commit. This shouldn't happen. > Traceback (most recent call last): > File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one > jar.tpc_finish(self) > File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish > try: self._finish() > File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish > File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler > ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could > not perform COMMIT or ROLLBACK', 1023) You should have a look at the database logs to see what prevented the commit from being completed. > What could be causing this? Hard to say: mxODBCZopeDA is trying to commit the transaction, but the driver or database failed to complete the request. The above error was generated by the ODBC driver. This could be network or DNS problems, or be related to a bug in FreeTDS (which is getting more stable with every new release, but should still be considered beta quality software at the moment). > Can I get the mxODBCZopeDA source from > somewhere? It would make debugging this much easier. Getting the source is not an option and won't help much either since the source of the problem is not mxODBCZopeDA. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 16 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Sun May 1 21:29:25 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 27 16:01:18 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <427259F3.4090806@egenix.com> References: <20050427130906.52878.qmail@web30008.mail.mud.yahoo.com> <427259F3.4090806@egenix.com> Message-ID: <42752005.7080904@egenix.com> M.-A. Lemburg wrote: > David Rushby wrote: > >> --- "M.-A. Lemburg" wrote: >> >>> Are you using the standard mxDateTime build or one >>> with WANT_SUBCLASSABLE_TYPES defined... >> >> >> >> Presumably "the standard", since I just built with 'py24d setup.py >> build', making no attempt to enable special directives. >> >> >>> ... (mxDateTime_Deallocate is only used by the latter)? >> >> >> >> That's true in 2.1.0-2005-04-15, but not in 2.1.0b5. >> >> >>> In any case, please try our latest snapshot: >>> >>> >> >> http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-04-15.zip >> >>> to see if that makes any difference. >> >> >> >> I can't build it out of the box: > > > Hmm, looks like distutils' sdist command doesn't like our new > repository layout which uses symlinks (after we've switched to > subversion). > > We'll have to debug distutils first, I guess :-( Ok, we've found the problem and fixed it. Here's the new release (which does build out of the box at least on our boxes ;-): http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 01 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From davidrushby at yahoo.com Mon May 2 15:49:53 2005 From: davidrushby at yahoo.com (David Rushby) Date: Fri Jan 27 16:01:18 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Ok, we've found the problem and fixed it. Here's the new > release (which does build out of the box at least on our > boxes ;-): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip It does build now, but: py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" still behaves as it did when I submitted my original message: Fatal Python error: UNREF invalid object Aborted This is the same debug build of Python 2.4.1 that I was previously using, running the same configuration (CentOS Linux 4.0/i386, everything compiled with GCC 3.4.3). Have you examined my original claim as to the cause of the bug? __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 10:21:55 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 27 16:01:18 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> References: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> Message-ID: <42772693.8050306@egenix.com> David Rushby wrote: > --- "M.-A. Lemburg" wrote: > >>Ok, we've found the problem and fixed it. Here's the new >>release (which does build out of the box at least on our >>boxes ;-): >> >> > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip > > It does build now, but: > py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" > still behaves as it did when I submitted my original message: > Fatal Python error: UNREF invalid object > Aborted > > This is the same debug build of Python 2.4.1 that I was previously > using, running the same configuration (CentOS Linux 4.0/i386, > everything compiled with GCC 3.4.3). > > Have you examined my original claim as to the cause of the bug? No. We haven't had time for looking into it. I'm not sure whether your analysis of the problem is correct: if you don't define WANT_SUBCLASSABLE_TYPES, the API mxDateTime_Deallocate() is neither defined nor used. Furthermore, PyObject_Del() is only called by mxDateTime_Free() if you have explicitely edited mxDateTime.c to disabled the free list #defines. In a standard build, PyObject_Del() is only called at module finalization time. Note that the reason we call mxDateTime_Free() in the constructor is that we don't want the destructor of the object to be called. Py_DECREF() would call the destructor (mxDateTime_Deallocate). It is possible that the debug code in Python complains about the refcount in the object not being 0 at the time the object is finalized (module finalization time), but I don't see any such checks in PyObject_Free() (which is what PyObject_Del() maps to). Again, all of this does not happen in regular non-debug Python builds. Please be aware that we don't support debug builds, so fixing the problem (if there is one - gcc has some serious optimization problems on some combinations of platform and version) will take a while. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 09:27:37 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Fri Jan 27 16:01:18 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 Message-ID: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Hi all- I am trying to build the mx-base package, v.2.0.6. This will be used with postgresql 7.3.9, psycopg 1.1.18, and Roundup 0.8.2. RHEL 3.0 Python 2.3 egenix-mx-base-2.0.6.tar.gz I performed a: /usr/local/bin/python2.3 setup.py install Everything looks proper with the exeception of this series of warning statements: ----------------- gcc -pthread -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fno-strict-aliasing -fPIC -Imx/BeeBase/mxBeeBase -I/usr/local/incl ude/python2.3 -I/usr/local/include -c mx/BeeBase/mxBeeBase/btr.c -o build/temp.linux-i686-2.3/mx/BeeBase/mxBeeBase/mxBeeBa se/mx/BeeBase/mxBeeBase/btr.o mx/BeeBase/mxBeeBase/btr.c: In function `dumpBuf': mx/BeeBase/mxBeeBase/btr.c:249: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:250: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:255: warning: unsigned int format, long unsigned int arg (arg 4) mx/BeeBase/mxBeeBase/btr.c:256: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c: In function `_validateTree': mx/BeeBase/mxBeeBase/btr.c:330: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:337: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:339: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:349: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:351: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 3) creating build/lib.linux-i686-2.3/mx/BeeBase creating build/lib.linux-i686-2.3/mx/BeeBase/mxBeeBase -------------- Would someone be kind enough to let me know whether these messages were expected, and if not, how I might resolve these? Thanks! DC __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 22:06:33 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 27 16:01:18 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> References: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Message-ID: <4277CBB9.8020302@egenix.com> Dianne Chen wrote: > Hi all- > > I am trying to build the mx-base package, v.2.0.6. > This will be used with postgresql 7.3.9, psycopg > 1.1.18, and Roundup 0.8.2. > > RHEL 3.0 > Python 2.3 > egenix-mx-base-2.0.6.tar.gz > > I performed a: > > /usr/local/bin/python2.3 setup.py install > > Everything looks proper with the exeception of this > series of warning statements: > > ----------------- > ... > -------------- > > Would someone be kind enough to let me know whether > these messages were expected, and if not, how I might > resolve these? These warning can safely be ignored. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 13:41:14 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Fri Jan 27 16:01:18 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: 6667 Message-ID: <20050503194114.72091.qmail@web31414.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Dianne Chen wrote: > > Hi all- > > > > I am trying to build the mx-base package, v.2.0.6. > > This will be used with postgresql 7.3.9, psycopg > > 1.1.18, and Roundup 0.8.2. > > > > RHEL 3.0 > > Python 2.3 > > egenix-mx-base-2.0.6.tar.gz > > > > I performed a: > > > > /usr/local/bin/python2.3 setup.py install > > > > Everything looks proper with the exeception of > this > > series of warning statements: > > > > ----------------- > > ... > > -------------- > > > > Would someone be kind enough to let me know > whether > > these messages were expected, and if not, how I > might > > resolve these? > > These warning can safely be ignored. > > -- > Marc-Andre Lemburg > eGenix.com > Marc- Thank you very much for the reply. It helps greatly. With kind regards, DC __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From davidrushby at yahoo.com Tue May 3 17:18:46 2005 From: davidrushby at yahoo.com (David Rushby) Date: Fri Jan 27 16:01:18 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050503231846.35012.qmail@web30009.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > I'm not sure whether your analysis of the problem is correct... Indeed, my original analysis wasn't correct; I think this one is. The fatal error I'm complaining about only arises if the arguments to DateTime.DateTime are invalid, so that the object is deallocated in the onError block of mxDateTime_FromDateAndTime. If the object is created successfully, and later deallocated by Python's garbage collector, the fatal error doesn't arise. Here's my analysis of the problem: --- If the debugging directive Py_TRACE_REFS is enabled, as it is in my case, the Python interpreter maintains a doubly linked list of all Python objects (named refchain) via the _ob_next and _ob_prev pointers added to PyObject via _PyObject_HEAD_EXTRA. Each object is inserted into refchain by the _Py_AddToAllObjects call in _Py_NewReference, and removed from refchain by the _Py_ForgetReference call in _Py_Dealloc. _Py_ForgetReference performs an integrity check on the object being deallocated (op) to make sure that its neighbors in refchain recognize it. Specifically, _Py_ForgetReference verifies that the _ob_next pointer of the previous object in refchain (op->_ob_prev->_ob_next) points to op, and that the _ob_prev pointer of the next object in refchain (op->_ob_next->_ob_prev) points to op. If either of those conditions is false, the interpreter raises the fatal error I'm seeing. After mxDateTime_New pulls an mxDateTimeObject out of the free list, it calls _Py_NewReference on that object to transform it from a "conceptually deallocated" object to a "conceptually allocated" one. _Py_NewReference inserts the object into refchain. Later, when the object is being "conceptually deallocated", it should be removed from refchain with _Py_ForgetReference. The version of _Py_Dealloc that's active when Py_TRACE_REFS is enabled does this (_Py_Dealloc is the element of Py_DECREF that performs the actual destruction). _Py_Dealloc first calls _Py_ForgetReference to remove the object from refchain, then calls the object's destructor (op->ob_type->tp_dealloc). If WANT_SUBCLASSABLE_TYPES is not defined (it is not in my case), the destructor for mxDateTime_Type is mxDateTime_Free. So, if a DateTime object is deallocated normally, as a result of its reference count falling to zero, _Py_Dealloc is called on the object, which first removes it from refchain, then passes it to mxDateTime_Free. If a DateTime object is destroyed prematurely, as a result of invalid arguments to its destructor, the onError handler calls mxDateTime_Free, so the object is "conceptually deallocated" (placed in the free list), *but* the object is not removed from refchain. So if a refchain-membership-integrity-check is performed on the object in question or one of its immediate neighbors in refchain, that integrity check fails, leading to the fatal error. --- The solution is to 'Py_DECREF(...)' the object in the onError handler of its constructor, instead of passing the object directly to mxDateTime_Free. That change solves two problems: 1) It causes _Py_Dealloc to execute, which in turn executes _Py_ForgetReference, so the object is removed from refchain, as it should be. 2) At present, objects that are created successfully and later deallocated by normal reference count mechanics have a reference count of 0 when they enter the free list, whereas objects whose constructors abort their creation due to invalid arguments have a reference count of 1 when they enter the free list. Although AFAIK this doesn't cause an actual execution problem (because the object's reference count is *explicitly set to 1* rather than *incremented by 1* when the object is later "conceptually allocated" by _Py_NewReference), it is likely to confuse future maintainers and thereby lead to the introduction of an actual execution problem. I assume that if you agree that this is a reasonable solution, you'll want to apply the change not only to mxDateTime_FromDateAndTime, but to all similar constructors in mxDateTime.c. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From rj at maxxian.com Thu May 5 01:57:40 2005 From: rj at maxxian.com (RJ Juneau) Date: Fri Jan 27 16:01:18 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c5512e$f72798c0$6505a8c0@rjlaptop> I'm on the 30 day evaluation for mxodbc_zope_da. I'm getting the following error when I submit some queries: Error Type: KeyError Error Value: 'query' I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 with UCS4. The error seems to be caused by multiple rows being returned. I did see an earlier posting with the same error message. The response suggested a template error, but this is clearly not the case here. The additional evidence I've gathered so far: - I'm running the test directly from the ZSQL method, so there's no template involved. - If I use the same query with an additional "where" clause to ensure that only one row is returned, it works - If I use a value in the 'where' clause with no rows returned, it works - The same ZSQL query is being used on a Windows machine running Zope and the free ZODBC module without a problem - The query has been verified directly in mysql-client-browser Other info: - The database is MySQL 4.1.10A-0 - iODBC is the DB driver RJ Juneau -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050505/68d278bf/attachment-0059.htm From mal at egenix.com Thu May 5 12:37:43 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 27 16:01:18 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c5512e$f72798c0$6505a8c0@rjlaptop> References: <000301c5512e$f72798c0$6505a8c0@rjlaptop> Message-ID: <4279E967.6010904@egenix.com> RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 > with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 09:37:42 2005 From: rj at maxxian.com (RJ Juneau) Date: Fri Jan 27 16:01:18 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000101c5516f$3b96de90$6505a8c0@rjlaptop> More interesting info on the problem: If I execute the query directly in the "test" window of the base eGenix mxODBC Database Connection window, it works fine and returns the 20 lines expected. That could point to a problem in the rendering, which seems to be where the traceback ends. Note that within the same Zope system I also have an ODBC connection to a Sybase database, and I have successfully tested multi-line ZSQL queries there. This is the traceback: Time 2005/05/05 07:55:15.294 GMT-4 Exception Type KeyError Exception Value 'query' Traceback (innermost last): Module ZPublisher.Publish, line 101, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 39, in call_object Module Shared.DC.ZRDB.DA, line 337, in manage_test Module DocumentTemplate.DT_String, line 474, in __call__ Module DocumentTemplate.DT_In, line 602, in renderwb Module DocumentTemplate.DT_Var, line 219, in render KeyError: 'query' I don't think the following is an issue, but I'll include it for completeness.I am also getting the following iODBC warnings and errors in the Zope console log, which are related to the ODBC parameters being passed by iODBC. Note that these errors also appear for all of the successful queries. [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (Setup). [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (UsageCount). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Timeout). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Reuse). As for the ZSQL snippet from the template... Since there's no template involved yet (I'm still testing directly from the ZSQL method), I assume you mean the SQL code? select h.host_name, s.system_name, s.system_handle, count(*) from terminal t, system_map s, host h where t.system_index = s.system_index and s.host_index = h.host_index group by s.system_name order by h.host_name Nothing complicated here. There are no parameters passed to the query. RJ -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: May 5, 2005 5:38 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: Re: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is > 2.3.4 with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ---------------------------------------------------------------------- > -- > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 16:00:32 2005 From: charlie at egenix.com (Charlie Clark) Date: Fri Jan 27 16:01:18 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000101c5516f$3b96de90$6505a8c0@rjlaptop> References: <000101c5516f$3b96de90$6505a8c0@rjlaptop> Message-ID: <20050505150032.644.1@bepc.1115296715.fake> On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base eGenix > mxODBC Database Connection window, it works fine and returns the 20 > lines expected. That could point to a problem in the rendering, which > seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection to > a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 10:22:17 2005 From: rj at maxxian.com (RJ Juneau) Date: Fri Jan 27 16:01:18 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505150032.644.1@bepc.1115296715.fake> Message-ID: <000201c55175$75bcad10$6505a8c0@rjlaptop> At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 11:47:14 2005 From: rj at maxxian.com (RJ Juneau) Date: Fri Jan 27 16:01:18 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c55181$549be0e0$6505a8c0@rjlaptop> Charlie, I found a fix. Here it is in case anyone else runs into this. You were correct - the problem is in another part of Zope. Based on your feedback, I did a bit more searching and found something here: http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. html The problem appears to be in Zope versions after 2.7.0. I'm running 2.7.6, and the post indicates that it also happens in 2.7.4. The solution: Edit file /lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. There are two lines in the file that start with . Edit them as follows: Change first line to: Change second line to: Just to be after, I shut down Zope before I made the changes and restarted it after. Thanks for the help! RJ -----Original Message----- From: RJ Juneau [mailto:rj@maxxian.com] Sent: May 5, 2005 9:22 AM To: 'Charlie Clark' Cc: 'egenix-users@lists.egenix.com' Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 17:57:25 2005 From: charlie at egenix.com (Charlie Clark) Date: Fri Jan 27 16:01:19 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <20050505165725.3380.2@bepc.1115296715.fake> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Thu May 5 09:15:21 2005 From: charlie at egenix.com (Charlie Clark) Date: Fri Jan 27 16:01:19 2006 Subject: [Zope-DB] RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <000001c55185$41477730$6b00a8c0@fonacier.local> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________ Zope-DB mailing list Zope-DB@zope.org http://mail.zope.org/mailman/listinfo/zope-db From rj at maxxian.com Thu May 5 12:38:00 2005 From: rj at maxxian.com (RJ Juneau) Date: Fri Jan 27 16:01:19 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000001c55188$6b841eb0$6505a8c0@rjlaptop> I just double-checked. Zope-2.7.6-final. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 12:49:16 2005 From: rj at maxxian.com (RJ Juneau) Date: Fri Jan 27 16:01:19 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000501c55189$fe149ba0$6505a8c0@rjlaptop> Charlie, The fix has only been applied for 2.7.7, 2.8b2. The info is in the original bug report which is closed and can be found here: http://www.zope.org/Collectors/Zope/1745 RJ -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Fri May 6 11:50:09 2005 From: rj at maxxian.com (RJ Juneau) Date: Fri Jan 27 16:01:19 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC Message-ID: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Still on eval for the product. I cannot get a stable connection to Sybase via the iODBC drivers. - The Sybase ODBC connection - including a query - have been verified at the iODBC level. - The setup is already working well for ODBC connection to MySQL. Symptoms include: - If I click on "Open Connection", it still comes back with "Connection Closed" when I go to a ZSQL method - Using 'Connect on Demand' is not working either. - Clicking "Open Connection" gives me the following error: Connection string: DSN=lixbox_sybase; UID=sa; PWD=XXXXXXX Connection pool entry: 0 Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection rejected by data source', 7952) The odbc.ini definition for DSN "lixbox_sybase" is as follows: [lixbox_sybase] JetFix = No NoRowSetSizeLimit = No Description = Test connection to listbox Options = LIXBOX DSQUERY = SQLSERVER TDSHOST = lixbox TDSPORT = 5000 TDSVER = 5.0 SQLSERVER_CATALOG = N CURSOR_SENSITIVITY = LOW UserName = sa Password = XXXXXXXX ServerType = Sybase 10/11/12 Driver = /opt/openlink/lib/sql_mt_lt.so Database = pubs2 ReadOnly = no NoAutoCommit = No NoLoginBox = No FetchBufferSize = 60 Other relevant data: - Connecting via OpenLink's iODBC - Zope 2.7.6-final - Python 2.3.4 - Connection to Sybase has been successfully tested with iODBC, including issuing a query - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC connection RJ Juneau Chief Technology Officer Maxxian Integration Inc. 155 Westhampton Drive Thornhill, Ontario Canada L4J 7X2 E-mail: rj@maxxian.com Phone: +1 905 482 9429 Cell: +1 416 897 6682 Toll free: +1 866 758 9161 Fax: +1 647 722 2038 -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050506/aef33361/attachment-0059.htm From mal at egenix.com Fri May 6 18:27:37 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 27 16:01:19 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC In-Reply-To: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> References: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Message-ID: <427B8CE9.1010601@egenix.com> RJ Juneau wrote: > Still on eval for the product. > > I cannot get a stable connection to Sybase via the iODBC drivers. > > - The Sybase ODBC connection - including a query - have been verified at > the iODBC level. > - The setup is already working well for ODBC connection to MySQL. > > Symptoms include: > > - If I click on "Open Connection", it still comes back with "Connection > Closed" when I go to a ZSQL method > - Using 'Connect on Demand' is not working either. > - Clicking "Open Connection" gives me the following error: > > Connection string: DSN=lixbox_sybase; > UID=sa; > PWD=XXXXXXX Try writing the connection string on one line and without whitespace. ODBC drivers sometimes have problems with this. > Connection pool entry: 0 > Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection > rejected by data source', 7952) This is a generic error that relates to authentication or firewall problems. It is possible that turning on ODBC tracing the ODBC manager will give more clues as to the real cause of the problem. > The odbc.ini definition for DSN "lixbox_sybase" is as follows: > > [lixbox_sybase] > JetFix = No > NoRowSetSizeLimit = No > Description = Test connection to listbox > Options = LIXBOX > DSQUERY = SQLSERVER > TDSHOST = lixbox > TDSPORT = 5000 > TDSVER = 5.0 > SQLSERVER_CATALOG = N > CURSOR_SENSITIVITY = LOW > UserName = sa > Password = XXXXXXXX > ServerType = Sybase 10/11/12 > Driver = /opt/openlink/lib/sql_mt_lt.so > Database = pubs2 > ReadOnly = no > NoAutoCommit = No > NoLoginBox = No > FetchBufferSize = 60 > > > Other relevant data: > - Connecting via OpenLink's iODBC > - Zope 2.7.6-final > - Python 2.3.4 > - Connection to Sybase has been successfully tested with iODBC, > including issuing a query > - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC > connection > > > > RJ Juneau > Chief Technology Officer > Maxxian Integration Inc. > 155 Westhampton Drive > Thornhill, Ontario > Canada L4J 7X2 > E-mail: rj@maxxian.com > Phone: +1 905 482 9429 > Cell: +1 416 897 6682 > Toll free: +1 866 758 9161 > Fax: +1 647 722 2038 > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 06 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From calisp at gmail.com Sun May 15 23:49:03 2005 From: calisp at gmail.com (calisp@gmail.com) Date: Fri Jan 27 16:01:19 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK Message-ID: Hi, I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the following error... 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the last phase of a two-phase commit. This shouldn't happen. Traceback (most recent call last): File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one jar.tpc_finish(self) File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish try: self._finish() File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could not perform COMMIT or ROLLBACK', 1023) What could be causing this? Can I get the mxODBCZopeDA source from somewhere? It would make debugging this much easier. Thanks, Calisp. From mal at egenix.com Mon May 16 13:52:12 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 27 16:01:19 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK In-Reply-To: References: Message-ID: <42887B5C.4010109@egenix.com> calisp@gmail.com wrote: > Hi, > > I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with > unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the > following error... > > 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the > last phase of a two-phase commit. This shouldn't happen. > Traceback (most recent call last): > File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one > jar.tpc_finish(self) > File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish > try: self._finish() > File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish > File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler > ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could > not perform COMMIT or ROLLBACK', 1023) You should have a look at the database logs to see what prevented the commit from being completed. > What could be causing this? Hard to say: mxODBCZopeDA is trying to commit the transaction, but the driver or database failed to complete the request. The above error was generated by the ODBC driver. This could be network or DNS problems, or be related to a bug in FreeTDS (which is getting more stable with every new release, but should still be considered beta quality software at the moment). > Can I get the mxODBCZopeDA source from > somewhere? It would make debugging this much easier. Getting the source is not an option and won't help much either since the source of the problem is not mxODBCZopeDA. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 16 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Sun May 1 21:29:25 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 27 20:01:09 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <427259F3.4090806@egenix.com> References: <20050427130906.52878.qmail@web30008.mail.mud.yahoo.com> <427259F3.4090806@egenix.com> Message-ID: <42752005.7080904@egenix.com> M.-A. Lemburg wrote: > David Rushby wrote: > >> --- "M.-A. Lemburg" wrote: >> >>> Are you using the standard mxDateTime build or one >>> with WANT_SUBCLASSABLE_TYPES defined... >> >> >> >> Presumably "the standard", since I just built with 'py24d setup.py >> build', making no attempt to enable special directives. >> >> >>> ... (mxDateTime_Deallocate is only used by the latter)? >> >> >> >> That's true in 2.1.0-2005-04-15, but not in 2.1.0b5. >> >> >>> In any case, please try our latest snapshot: >>> >>> >> >> http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-04-15.zip >> >>> to see if that makes any difference. >> >> >> >> I can't build it out of the box: > > > Hmm, looks like distutils' sdist command doesn't like our new > repository layout which uses symlinks (after we've switched to > subversion). > > We'll have to debug distutils first, I guess :-( Ok, we've found the problem and fixed it. Here's the new release (which does build out of the box at least on our boxes ;-): http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 01 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From davidrushby at yahoo.com Mon May 2 15:49:53 2005 From: davidrushby at yahoo.com (David Rushby) Date: Fri Jan 27 20:01:09 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Ok, we've found the problem and fixed it. Here's the new > release (which does build out of the box at least on our > boxes ;-): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip It does build now, but: py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" still behaves as it did when I submitted my original message: Fatal Python error: UNREF invalid object Aborted This is the same debug build of Python 2.4.1 that I was previously using, running the same configuration (CentOS Linux 4.0/i386, everything compiled with GCC 3.4.3). Have you examined my original claim as to the cause of the bug? __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 10:21:55 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 27 20:01:09 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> References: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> Message-ID: <42772693.8050306@egenix.com> David Rushby wrote: > --- "M.-A. Lemburg" wrote: > >>Ok, we've found the problem and fixed it. Here's the new >>release (which does build out of the box at least on our >>boxes ;-): >> >> > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip > > It does build now, but: > py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" > still behaves as it did when I submitted my original message: > Fatal Python error: UNREF invalid object > Aborted > > This is the same debug build of Python 2.4.1 that I was previously > using, running the same configuration (CentOS Linux 4.0/i386, > everything compiled with GCC 3.4.3). > > Have you examined my original claim as to the cause of the bug? No. We haven't had time for looking into it. I'm not sure whether your analysis of the problem is correct: if you don't define WANT_SUBCLASSABLE_TYPES, the API mxDateTime_Deallocate() is neither defined nor used. Furthermore, PyObject_Del() is only called by mxDateTime_Free() if you have explicitely edited mxDateTime.c to disabled the free list #defines. In a standard build, PyObject_Del() is only called at module finalization time. Note that the reason we call mxDateTime_Free() in the constructor is that we don't want the destructor of the object to be called. Py_DECREF() would call the destructor (mxDateTime_Deallocate). It is possible that the debug code in Python complains about the refcount in the object not being 0 at the time the object is finalized (module finalization time), but I don't see any such checks in PyObject_Free() (which is what PyObject_Del() maps to). Again, all of this does not happen in regular non-debug Python builds. Please be aware that we don't support debug builds, so fixing the problem (if there is one - gcc has some serious optimization problems on some combinations of platform and version) will take a while. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 09:27:37 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Fri Jan 27 20:01:09 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 Message-ID: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Hi all- I am trying to build the mx-base package, v.2.0.6. This will be used with postgresql 7.3.9, psycopg 1.1.18, and Roundup 0.8.2. RHEL 3.0 Python 2.3 egenix-mx-base-2.0.6.tar.gz I performed a: /usr/local/bin/python2.3 setup.py install Everything looks proper with the exeception of this series of warning statements: ----------------- gcc -pthread -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fno-strict-aliasing -fPIC -Imx/BeeBase/mxBeeBase -I/usr/local/incl ude/python2.3 -I/usr/local/include -c mx/BeeBase/mxBeeBase/btr.c -o build/temp.linux-i686-2.3/mx/BeeBase/mxBeeBase/mxBeeBa se/mx/BeeBase/mxBeeBase/btr.o mx/BeeBase/mxBeeBase/btr.c: In function `dumpBuf': mx/BeeBase/mxBeeBase/btr.c:249: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:250: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:255: warning: unsigned int format, long unsigned int arg (arg 4) mx/BeeBase/mxBeeBase/btr.c:256: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c: In function `_validateTree': mx/BeeBase/mxBeeBase/btr.c:330: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:337: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:339: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:349: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:351: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 3) creating build/lib.linux-i686-2.3/mx/BeeBase creating build/lib.linux-i686-2.3/mx/BeeBase/mxBeeBase -------------- Would someone be kind enough to let me know whether these messages were expected, and if not, how I might resolve these? Thanks! DC __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 22:06:33 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 27 20:01:09 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> References: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Message-ID: <4277CBB9.8020302@egenix.com> Dianne Chen wrote: > Hi all- > > I am trying to build the mx-base package, v.2.0.6. > This will be used with postgresql 7.3.9, psycopg > 1.1.18, and Roundup 0.8.2. > > RHEL 3.0 > Python 2.3 > egenix-mx-base-2.0.6.tar.gz > > I performed a: > > /usr/local/bin/python2.3 setup.py install > > Everything looks proper with the exeception of this > series of warning statements: > > ----------------- > ... > -------------- > > Would someone be kind enough to let me know whether > these messages were expected, and if not, how I might > resolve these? These warning can safely be ignored. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 13:41:14 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Fri Jan 27 20:01:09 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: 6667 Message-ID: <20050503194114.72091.qmail@web31414.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Dianne Chen wrote: > > Hi all- > > > > I am trying to build the mx-base package, v.2.0.6. > > This will be used with postgresql 7.3.9, psycopg > > 1.1.18, and Roundup 0.8.2. > > > > RHEL 3.0 > > Python 2.3 > > egenix-mx-base-2.0.6.tar.gz > > > > I performed a: > > > > /usr/local/bin/python2.3 setup.py install > > > > Everything looks proper with the exeception of > this > > series of warning statements: > > > > ----------------- > > ... > > -------------- > > > > Would someone be kind enough to let me know > whether > > these messages were expected, and if not, how I > might > > resolve these? > > These warning can safely be ignored. > > -- > Marc-Andre Lemburg > eGenix.com > Marc- Thank you very much for the reply. It helps greatly. With kind regards, DC __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From davidrushby at yahoo.com Tue May 3 17:18:46 2005 From: davidrushby at yahoo.com (David Rushby) Date: Fri Jan 27 20:01:09 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050503231846.35012.qmail@web30009.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > I'm not sure whether your analysis of the problem is correct... Indeed, my original analysis wasn't correct; I think this one is. The fatal error I'm complaining about only arises if the arguments to DateTime.DateTime are invalid, so that the object is deallocated in the onError block of mxDateTime_FromDateAndTime. If the object is created successfully, and later deallocated by Python's garbage collector, the fatal error doesn't arise. Here's my analysis of the problem: --- If the debugging directive Py_TRACE_REFS is enabled, as it is in my case, the Python interpreter maintains a doubly linked list of all Python objects (named refchain) via the _ob_next and _ob_prev pointers added to PyObject via _PyObject_HEAD_EXTRA. Each object is inserted into refchain by the _Py_AddToAllObjects call in _Py_NewReference, and removed from refchain by the _Py_ForgetReference call in _Py_Dealloc. _Py_ForgetReference performs an integrity check on the object being deallocated (op) to make sure that its neighbors in refchain recognize it. Specifically, _Py_ForgetReference verifies that the _ob_next pointer of the previous object in refchain (op->_ob_prev->_ob_next) points to op, and that the _ob_prev pointer of the next object in refchain (op->_ob_next->_ob_prev) points to op. If either of those conditions is false, the interpreter raises the fatal error I'm seeing. After mxDateTime_New pulls an mxDateTimeObject out of the free list, it calls _Py_NewReference on that object to transform it from a "conceptually deallocated" object to a "conceptually allocated" one. _Py_NewReference inserts the object into refchain. Later, when the object is being "conceptually deallocated", it should be removed from refchain with _Py_ForgetReference. The version of _Py_Dealloc that's active when Py_TRACE_REFS is enabled does this (_Py_Dealloc is the element of Py_DECREF that performs the actual destruction). _Py_Dealloc first calls _Py_ForgetReference to remove the object from refchain, then calls the object's destructor (op->ob_type->tp_dealloc). If WANT_SUBCLASSABLE_TYPES is not defined (it is not in my case), the destructor for mxDateTime_Type is mxDateTime_Free. So, if a DateTime object is deallocated normally, as a result of its reference count falling to zero, _Py_Dealloc is called on the object, which first removes it from refchain, then passes it to mxDateTime_Free. If a DateTime object is destroyed prematurely, as a result of invalid arguments to its destructor, the onError handler calls mxDateTime_Free, so the object is "conceptually deallocated" (placed in the free list), *but* the object is not removed from refchain. So if a refchain-membership-integrity-check is performed on the object in question or one of its immediate neighbors in refchain, that integrity check fails, leading to the fatal error. --- The solution is to 'Py_DECREF(...)' the object in the onError handler of its constructor, instead of passing the object directly to mxDateTime_Free. That change solves two problems: 1) It causes _Py_Dealloc to execute, which in turn executes _Py_ForgetReference, so the object is removed from refchain, as it should be. 2) At present, objects that are created successfully and later deallocated by normal reference count mechanics have a reference count of 0 when they enter the free list, whereas objects whose constructors abort their creation due to invalid arguments have a reference count of 1 when they enter the free list. Although AFAIK this doesn't cause an actual execution problem (because the object's reference count is *explicitly set to 1* rather than *incremented by 1* when the object is later "conceptually allocated" by _Py_NewReference), it is likely to confuse future maintainers and thereby lead to the introduction of an actual execution problem. I assume that if you agree that this is a reasonable solution, you'll want to apply the change not only to mxDateTime_FromDateAndTime, but to all similar constructors in mxDateTime.c. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From rj at maxxian.com Thu May 5 01:57:40 2005 From: rj at maxxian.com (RJ Juneau) Date: Fri Jan 27 20:01:09 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c5512e$f72798c0$6505a8c0@rjlaptop> I'm on the 30 day evaluation for mxodbc_zope_da. I'm getting the following error when I submit some queries: Error Type: KeyError Error Value: 'query' I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 with UCS4. The error seems to be caused by multiple rows being returned. I did see an earlier posting with the same error message. The response suggested a template error, but this is clearly not the case here. The additional evidence I've gathered so far: - I'm running the test directly from the ZSQL method, so there's no template involved. - If I use the same query with an additional "where" clause to ensure that only one row is returned, it works - If I use a value in the 'where' clause with no rows returned, it works - The same ZSQL query is being used on a Windows machine running Zope and the free ZODBC module without a problem - The query has been verified directly in mysql-client-browser Other info: - The database is MySQL 4.1.10A-0 - iODBC is the DB driver RJ Juneau -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050505/68d278bf/attachment-0060.htm From mal at egenix.com Thu May 5 12:37:43 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 27 20:01:09 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c5512e$f72798c0$6505a8c0@rjlaptop> References: <000301c5512e$f72798c0$6505a8c0@rjlaptop> Message-ID: <4279E967.6010904@egenix.com> RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 > with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 09:37:42 2005 From: rj at maxxian.com (RJ Juneau) Date: Fri Jan 27 20:01:09 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000101c5516f$3b96de90$6505a8c0@rjlaptop> More interesting info on the problem: If I execute the query directly in the "test" window of the base eGenix mxODBC Database Connection window, it works fine and returns the 20 lines expected. That could point to a problem in the rendering, which seems to be where the traceback ends. Note that within the same Zope system I also have an ODBC connection to a Sybase database, and I have successfully tested multi-line ZSQL queries there. This is the traceback: Time 2005/05/05 07:55:15.294 GMT-4 Exception Type KeyError Exception Value 'query' Traceback (innermost last): Module ZPublisher.Publish, line 101, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 39, in call_object Module Shared.DC.ZRDB.DA, line 337, in manage_test Module DocumentTemplate.DT_String, line 474, in __call__ Module DocumentTemplate.DT_In, line 602, in renderwb Module DocumentTemplate.DT_Var, line 219, in render KeyError: 'query' I don't think the following is an issue, but I'll include it for completeness.I am also getting the following iODBC warnings and errors in the Zope console log, which are related to the ODBC parameters being passed by iODBC. Note that these errors also appear for all of the successful queries. [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (Setup). [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (UsageCount). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Timeout). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Reuse). As for the ZSQL snippet from the template... Since there's no template involved yet (I'm still testing directly from the ZSQL method), I assume you mean the SQL code? select h.host_name, s.system_name, s.system_handle, count(*) from terminal t, system_map s, host h where t.system_index = s.system_index and s.host_index = h.host_index group by s.system_name order by h.host_name Nothing complicated here. There are no parameters passed to the query. RJ -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: May 5, 2005 5:38 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: Re: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is > 2.3.4 with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ---------------------------------------------------------------------- > -- > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 16:00:32 2005 From: charlie at egenix.com (Charlie Clark) Date: Fri Jan 27 20:01:09 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000101c5516f$3b96de90$6505a8c0@rjlaptop> References: <000101c5516f$3b96de90$6505a8c0@rjlaptop> Message-ID: <20050505150032.644.1@bepc.1115296715.fake> On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base eGenix > mxODBC Database Connection window, it works fine and returns the 20 > lines expected. That could point to a problem in the rendering, which > seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection to > a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 10:22:17 2005 From: rj at maxxian.com (RJ Juneau) Date: Fri Jan 27 20:01:09 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505150032.644.1@bepc.1115296715.fake> Message-ID: <000201c55175$75bcad10$6505a8c0@rjlaptop> At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 11:47:14 2005 From: rj at maxxian.com (RJ Juneau) Date: Fri Jan 27 20:01:09 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c55181$549be0e0$6505a8c0@rjlaptop> Charlie, I found a fix. Here it is in case anyone else runs into this. You were correct - the problem is in another part of Zope. Based on your feedback, I did a bit more searching and found something here: http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. html The problem appears to be in Zope versions after 2.7.0. I'm running 2.7.6, and the post indicates that it also happens in 2.7.4. The solution: Edit file /lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. There are two lines in the file that start with . Edit them as follows: Change first line to: Change second line to: Just to be after, I shut down Zope before I made the changes and restarted it after. Thanks for the help! RJ -----Original Message----- From: RJ Juneau [mailto:rj@maxxian.com] Sent: May 5, 2005 9:22 AM To: 'Charlie Clark' Cc: 'egenix-users@lists.egenix.com' Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 17:57:25 2005 From: charlie at egenix.com (Charlie Clark) Date: Fri Jan 27 20:01:09 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <20050505165725.3380.2@bepc.1115296715.fake> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Thu May 5 09:15:21 2005 From: charlie at egenix.com (Charlie Clark) Date: Fri Jan 27 20:01:09 2006 Subject: [Zope-DB] RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <000001c55185$41477730$6b00a8c0@fonacier.local> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________ Zope-DB mailing list Zope-DB@zope.org http://mail.zope.org/mailman/listinfo/zope-db From rj at maxxian.com Thu May 5 12:38:00 2005 From: rj at maxxian.com (RJ Juneau) Date: Fri Jan 27 20:01:09 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000001c55188$6b841eb0$6505a8c0@rjlaptop> I just double-checked. Zope-2.7.6-final. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 12:49:16 2005 From: rj at maxxian.com (RJ Juneau) Date: Fri Jan 27 20:01:10 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000501c55189$fe149ba0$6505a8c0@rjlaptop> Charlie, The fix has only been applied for 2.7.7, 2.8b2. The info is in the original bug report which is closed and can be found here: http://www.zope.org/Collectors/Zope/1745 RJ -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Fri May 6 11:50:09 2005 From: rj at maxxian.com (RJ Juneau) Date: Fri Jan 27 20:01:10 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC Message-ID: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Still on eval for the product. I cannot get a stable connection to Sybase via the iODBC drivers. - The Sybase ODBC connection - including a query - have been verified at the iODBC level. - The setup is already working well for ODBC connection to MySQL. Symptoms include: - If I click on "Open Connection", it still comes back with "Connection Closed" when I go to a ZSQL method - Using 'Connect on Demand' is not working either. - Clicking "Open Connection" gives me the following error: Connection string: DSN=lixbox_sybase; UID=sa; PWD=XXXXXXX Connection pool entry: 0 Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection rejected by data source', 7952) The odbc.ini definition for DSN "lixbox_sybase" is as follows: [lixbox_sybase] JetFix = No NoRowSetSizeLimit = No Description = Test connection to listbox Options = LIXBOX DSQUERY = SQLSERVER TDSHOST = lixbox TDSPORT = 5000 TDSVER = 5.0 SQLSERVER_CATALOG = N CURSOR_SENSITIVITY = LOW UserName = sa Password = XXXXXXXX ServerType = Sybase 10/11/12 Driver = /opt/openlink/lib/sql_mt_lt.so Database = pubs2 ReadOnly = no NoAutoCommit = No NoLoginBox = No FetchBufferSize = 60 Other relevant data: - Connecting via OpenLink's iODBC - Zope 2.7.6-final - Python 2.3.4 - Connection to Sybase has been successfully tested with iODBC, including issuing a query - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC connection RJ Juneau Chief Technology Officer Maxxian Integration Inc. 155 Westhampton Drive Thornhill, Ontario Canada L4J 7X2 E-mail: rj@maxxian.com Phone: +1 905 482 9429 Cell: +1 416 897 6682 Toll free: +1 866 758 9161 Fax: +1 647 722 2038 -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050506/aef33361/attachment-0060.htm From mal at egenix.com Fri May 6 18:27:37 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 27 20:01:10 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC In-Reply-To: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> References: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Message-ID: <427B8CE9.1010601@egenix.com> RJ Juneau wrote: > Still on eval for the product. > > I cannot get a stable connection to Sybase via the iODBC drivers. > > - The Sybase ODBC connection - including a query - have been verified at > the iODBC level. > - The setup is already working well for ODBC connection to MySQL. > > Symptoms include: > > - If I click on "Open Connection", it still comes back with "Connection > Closed" when I go to a ZSQL method > - Using 'Connect on Demand' is not working either. > - Clicking "Open Connection" gives me the following error: > > Connection string: DSN=lixbox_sybase; > UID=sa; > PWD=XXXXXXX Try writing the connection string on one line and without whitespace. ODBC drivers sometimes have problems with this. > Connection pool entry: 0 > Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection > rejected by data source', 7952) This is a generic error that relates to authentication or firewall problems. It is possible that turning on ODBC tracing the ODBC manager will give more clues as to the real cause of the problem. > The odbc.ini definition for DSN "lixbox_sybase" is as follows: > > [lixbox_sybase] > JetFix = No > NoRowSetSizeLimit = No > Description = Test connection to listbox > Options = LIXBOX > DSQUERY = SQLSERVER > TDSHOST = lixbox > TDSPORT = 5000 > TDSVER = 5.0 > SQLSERVER_CATALOG = N > CURSOR_SENSITIVITY = LOW > UserName = sa > Password = XXXXXXXX > ServerType = Sybase 10/11/12 > Driver = /opt/openlink/lib/sql_mt_lt.so > Database = pubs2 > ReadOnly = no > NoAutoCommit = No > NoLoginBox = No > FetchBufferSize = 60 > > > Other relevant data: > - Connecting via OpenLink's iODBC > - Zope 2.7.6-final > - Python 2.3.4 > - Connection to Sybase has been successfully tested with iODBC, > including issuing a query > - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC > connection > > > > RJ Juneau > Chief Technology Officer > Maxxian Integration Inc. > 155 Westhampton Drive > Thornhill, Ontario > Canada L4J 7X2 > E-mail: rj@maxxian.com > Phone: +1 905 482 9429 > Cell: +1 416 897 6682 > Toll free: +1 866 758 9161 > Fax: +1 647 722 2038 > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 06 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From calisp at gmail.com Sun May 15 23:49:03 2005 From: calisp at gmail.com (calisp@gmail.com) Date: Fri Jan 27 20:01:10 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK Message-ID: Hi, I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the following error... 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the last phase of a two-phase commit. This shouldn't happen. Traceback (most recent call last): File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one jar.tpc_finish(self) File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish try: self._finish() File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could not perform COMMIT or ROLLBACK', 1023) What could be causing this? Can I get the mxODBCZopeDA source from somewhere? It would make debugging this much easier. Thanks, Calisp. From mal at egenix.com Mon May 16 13:52:12 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 27 20:01:10 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK In-Reply-To: References: Message-ID: <42887B5C.4010109@egenix.com> calisp@gmail.com wrote: > Hi, > > I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with > unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the > following error... > > 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the > last phase of a two-phase commit. This shouldn't happen. > Traceback (most recent call last): > File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one > jar.tpc_finish(self) > File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish > try: self._finish() > File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish > File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler > ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could > not perform COMMIT or ROLLBACK', 1023) You should have a look at the database logs to see what prevented the commit from being completed. > What could be causing this? Hard to say: mxODBCZopeDA is trying to commit the transaction, but the driver or database failed to complete the request. The above error was generated by the ODBC driver. This could be network or DNS problems, or be related to a bug in FreeTDS (which is getting more stable with every new release, but should still be considered beta quality software at the moment). > Can I get the mxODBCZopeDA source from > somewhere? It would make debugging this much easier. Getting the source is not an option and won't help much either since the source of the problem is not mxODBCZopeDA. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 16 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Sun May 1 21:29:25 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 28 08:06:19 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <427259F3.4090806@egenix.com> References: <20050427130906.52878.qmail@web30008.mail.mud.yahoo.com> <427259F3.4090806@egenix.com> Message-ID: <42752005.7080904@egenix.com> M.-A. Lemburg wrote: > David Rushby wrote: > >> --- "M.-A. Lemburg" wrote: >> >>> Are you using the standard mxDateTime build or one >>> with WANT_SUBCLASSABLE_TYPES defined... >> >> >> >> Presumably "the standard", since I just built with 'py24d setup.py >> build', making no attempt to enable special directives. >> >> >>> ... (mxDateTime_Deallocate is only used by the latter)? >> >> >> >> That's true in 2.1.0-2005-04-15, but not in 2.1.0b5. >> >> >>> In any case, please try our latest snapshot: >>> >>> >> >> http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-04-15.zip >> >>> to see if that makes any difference. >> >> >> >> I can't build it out of the box: > > > Hmm, looks like distutils' sdist command doesn't like our new > repository layout which uses symlinks (after we've switched to > subversion). > > We'll have to debug distutils first, I guess :-( Ok, we've found the problem and fixed it. Here's the new release (which does build out of the box at least on our boxes ;-): http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 01 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From davidrushby at yahoo.com Mon May 2 15:49:53 2005 From: davidrushby at yahoo.com (David Rushby) Date: Sat Jan 28 08:06:19 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Ok, we've found the problem and fixed it. Here's the new > release (which does build out of the box at least on our > boxes ;-): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip It does build now, but: py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" still behaves as it did when I submitted my original message: Fatal Python error: UNREF invalid object Aborted This is the same debug build of Python 2.4.1 that I was previously using, running the same configuration (CentOS Linux 4.0/i386, everything compiled with GCC 3.4.3). Have you examined my original claim as to the cause of the bug? __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 10:21:55 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 28 08:06:19 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> References: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> Message-ID: <42772693.8050306@egenix.com> David Rushby wrote: > --- "M.-A. Lemburg" wrote: > >>Ok, we've found the problem and fixed it. Here's the new >>release (which does build out of the box at least on our >>boxes ;-): >> >> > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip > > It does build now, but: > py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" > still behaves as it did when I submitted my original message: > Fatal Python error: UNREF invalid object > Aborted > > This is the same debug build of Python 2.4.1 that I was previously > using, running the same configuration (CentOS Linux 4.0/i386, > everything compiled with GCC 3.4.3). > > Have you examined my original claim as to the cause of the bug? No. We haven't had time for looking into it. I'm not sure whether your analysis of the problem is correct: if you don't define WANT_SUBCLASSABLE_TYPES, the API mxDateTime_Deallocate() is neither defined nor used. Furthermore, PyObject_Del() is only called by mxDateTime_Free() if you have explicitely edited mxDateTime.c to disabled the free list #defines. In a standard build, PyObject_Del() is only called at module finalization time. Note that the reason we call mxDateTime_Free() in the constructor is that we don't want the destructor of the object to be called. Py_DECREF() would call the destructor (mxDateTime_Deallocate). It is possible that the debug code in Python complains about the refcount in the object not being 0 at the time the object is finalized (module finalization time), but I don't see any such checks in PyObject_Free() (which is what PyObject_Del() maps to). Again, all of this does not happen in regular non-debug Python builds. Please be aware that we don't support debug builds, so fixing the problem (if there is one - gcc has some serious optimization problems on some combinations of platform and version) will take a while. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 09:27:37 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Sat Jan 28 08:06:19 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 Message-ID: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Hi all- I am trying to build the mx-base package, v.2.0.6. This will be used with postgresql 7.3.9, psycopg 1.1.18, and Roundup 0.8.2. RHEL 3.0 Python 2.3 egenix-mx-base-2.0.6.tar.gz I performed a: /usr/local/bin/python2.3 setup.py install Everything looks proper with the exeception of this series of warning statements: ----------------- gcc -pthread -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fno-strict-aliasing -fPIC -Imx/BeeBase/mxBeeBase -I/usr/local/incl ude/python2.3 -I/usr/local/include -c mx/BeeBase/mxBeeBase/btr.c -o build/temp.linux-i686-2.3/mx/BeeBase/mxBeeBase/mxBeeBa se/mx/BeeBase/mxBeeBase/btr.o mx/BeeBase/mxBeeBase/btr.c: In function `dumpBuf': mx/BeeBase/mxBeeBase/btr.c:249: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:250: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:255: warning: unsigned int format, long unsigned int arg (arg 4) mx/BeeBase/mxBeeBase/btr.c:256: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c: In function `_validateTree': mx/BeeBase/mxBeeBase/btr.c:330: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:337: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:339: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:349: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:351: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 3) creating build/lib.linux-i686-2.3/mx/BeeBase creating build/lib.linux-i686-2.3/mx/BeeBase/mxBeeBase -------------- Would someone be kind enough to let me know whether these messages were expected, and if not, how I might resolve these? Thanks! DC __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 22:06:33 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 28 08:06:19 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> References: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Message-ID: <4277CBB9.8020302@egenix.com> Dianne Chen wrote: > Hi all- > > I am trying to build the mx-base package, v.2.0.6. > This will be used with postgresql 7.3.9, psycopg > 1.1.18, and Roundup 0.8.2. > > RHEL 3.0 > Python 2.3 > egenix-mx-base-2.0.6.tar.gz > > I performed a: > > /usr/local/bin/python2.3 setup.py install > > Everything looks proper with the exeception of this > series of warning statements: > > ----------------- > ... > -------------- > > Would someone be kind enough to let me know whether > these messages were expected, and if not, how I might > resolve these? These warning can safely be ignored. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 13:41:14 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Sat Jan 28 08:06:19 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: 6667 Message-ID: <20050503194114.72091.qmail@web31414.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Dianne Chen wrote: > > Hi all- > > > > I am trying to build the mx-base package, v.2.0.6. > > This will be used with postgresql 7.3.9, psycopg > > 1.1.18, and Roundup 0.8.2. > > > > RHEL 3.0 > > Python 2.3 > > egenix-mx-base-2.0.6.tar.gz > > > > I performed a: > > > > /usr/local/bin/python2.3 setup.py install > > > > Everything looks proper with the exeception of > this > > series of warning statements: > > > > ----------------- > > ... > > -------------- > > > > Would someone be kind enough to let me know > whether > > these messages were expected, and if not, how I > might > > resolve these? > > These warning can safely be ignored. > > -- > Marc-Andre Lemburg > eGenix.com > Marc- Thank you very much for the reply. It helps greatly. With kind regards, DC __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From davidrushby at yahoo.com Tue May 3 17:18:46 2005 From: davidrushby at yahoo.com (David Rushby) Date: Sat Jan 28 08:06:20 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050503231846.35012.qmail@web30009.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > I'm not sure whether your analysis of the problem is correct... Indeed, my original analysis wasn't correct; I think this one is. The fatal error I'm complaining about only arises if the arguments to DateTime.DateTime are invalid, so that the object is deallocated in the onError block of mxDateTime_FromDateAndTime. If the object is created successfully, and later deallocated by Python's garbage collector, the fatal error doesn't arise. Here's my analysis of the problem: --- If the debugging directive Py_TRACE_REFS is enabled, as it is in my case, the Python interpreter maintains a doubly linked list of all Python objects (named refchain) via the _ob_next and _ob_prev pointers added to PyObject via _PyObject_HEAD_EXTRA. Each object is inserted into refchain by the _Py_AddToAllObjects call in _Py_NewReference, and removed from refchain by the _Py_ForgetReference call in _Py_Dealloc. _Py_ForgetReference performs an integrity check on the object being deallocated (op) to make sure that its neighbors in refchain recognize it. Specifically, _Py_ForgetReference verifies that the _ob_next pointer of the previous object in refchain (op->_ob_prev->_ob_next) points to op, and that the _ob_prev pointer of the next object in refchain (op->_ob_next->_ob_prev) points to op. If either of those conditions is false, the interpreter raises the fatal error I'm seeing. After mxDateTime_New pulls an mxDateTimeObject out of the free list, it calls _Py_NewReference on that object to transform it from a "conceptually deallocated" object to a "conceptually allocated" one. _Py_NewReference inserts the object into refchain. Later, when the object is being "conceptually deallocated", it should be removed from refchain with _Py_ForgetReference. The version of _Py_Dealloc that's active when Py_TRACE_REFS is enabled does this (_Py_Dealloc is the element of Py_DECREF that performs the actual destruction). _Py_Dealloc first calls _Py_ForgetReference to remove the object from refchain, then calls the object's destructor (op->ob_type->tp_dealloc). If WANT_SUBCLASSABLE_TYPES is not defined (it is not in my case), the destructor for mxDateTime_Type is mxDateTime_Free. So, if a DateTime object is deallocated normally, as a result of its reference count falling to zero, _Py_Dealloc is called on the object, which first removes it from refchain, then passes it to mxDateTime_Free. If a DateTime object is destroyed prematurely, as a result of invalid arguments to its destructor, the onError handler calls mxDateTime_Free, so the object is "conceptually deallocated" (placed in the free list), *but* the object is not removed from refchain. So if a refchain-membership-integrity-check is performed on the object in question or one of its immediate neighbors in refchain, that integrity check fails, leading to the fatal error. --- The solution is to 'Py_DECREF(...)' the object in the onError handler of its constructor, instead of passing the object directly to mxDateTime_Free. That change solves two problems: 1) It causes _Py_Dealloc to execute, which in turn executes _Py_ForgetReference, so the object is removed from refchain, as it should be. 2) At present, objects that are created successfully and later deallocated by normal reference count mechanics have a reference count of 0 when they enter the free list, whereas objects whose constructors abort their creation due to invalid arguments have a reference count of 1 when they enter the free list. Although AFAIK this doesn't cause an actual execution problem (because the object's reference count is *explicitly set to 1* rather than *incremented by 1* when the object is later "conceptually allocated" by _Py_NewReference), it is likely to confuse future maintainers and thereby lead to the introduction of an actual execution problem. I assume that if you agree that this is a reasonable solution, you'll want to apply the change not only to mxDateTime_FromDateAndTime, but to all similar constructors in mxDateTime.c. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From rj at maxxian.com Thu May 5 01:57:40 2005 From: rj at maxxian.com (RJ Juneau) Date: Sat Jan 28 08:06:20 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c5512e$f72798c0$6505a8c0@rjlaptop> I'm on the 30 day evaluation for mxodbc_zope_da. I'm getting the following error when I submit some queries: Error Type: KeyError Error Value: 'query' I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 with UCS4. The error seems to be caused by multiple rows being returned. I did see an earlier posting with the same error message. The response suggested a template error, but this is clearly not the case here. The additional evidence I've gathered so far: - I'm running the test directly from the ZSQL method, so there's no template involved. - If I use the same query with an additional "where" clause to ensure that only one row is returned, it works - If I use a value in the 'where' clause with no rows returned, it works - The same ZSQL query is being used on a Windows machine running Zope and the free ZODBC module without a problem - The query has been verified directly in mysql-client-browser Other info: - The database is MySQL 4.1.10A-0 - iODBC is the DB driver RJ Juneau -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050505/68d278bf/attachment-0061.htm From mal at egenix.com Thu May 5 12:37:43 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 28 08:06:20 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c5512e$f72798c0$6505a8c0@rjlaptop> References: <000301c5512e$f72798c0$6505a8c0@rjlaptop> Message-ID: <4279E967.6010904@egenix.com> RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 > with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 09:37:42 2005 From: rj at maxxian.com (RJ Juneau) Date: Sat Jan 28 08:06:20 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000101c5516f$3b96de90$6505a8c0@rjlaptop> More interesting info on the problem: If I execute the query directly in the "test" window of the base eGenix mxODBC Database Connection window, it works fine and returns the 20 lines expected. That could point to a problem in the rendering, which seems to be where the traceback ends. Note that within the same Zope system I also have an ODBC connection to a Sybase database, and I have successfully tested multi-line ZSQL queries there. This is the traceback: Time 2005/05/05 07:55:15.294 GMT-4 Exception Type KeyError Exception Value 'query' Traceback (innermost last): Module ZPublisher.Publish, line 101, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 39, in call_object Module Shared.DC.ZRDB.DA, line 337, in manage_test Module DocumentTemplate.DT_String, line 474, in __call__ Module DocumentTemplate.DT_In, line 602, in renderwb Module DocumentTemplate.DT_Var, line 219, in render KeyError: 'query' I don't think the following is an issue, but I'll include it for completeness.I am also getting the following iODBC warnings and errors in the Zope console log, which are related to the ODBC parameters being passed by iODBC. Note that these errors also appear for all of the successful queries. [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (Setup). [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (UsageCount). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Timeout). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Reuse). As for the ZSQL snippet from the template... Since there's no template involved yet (I'm still testing directly from the ZSQL method), I assume you mean the SQL code? select h.host_name, s.system_name, s.system_handle, count(*) from terminal t, system_map s, host h where t.system_index = s.system_index and s.host_index = h.host_index group by s.system_name order by h.host_name Nothing complicated here. There are no parameters passed to the query. RJ -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: May 5, 2005 5:38 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: Re: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is > 2.3.4 with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ---------------------------------------------------------------------- > -- > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 16:00:32 2005 From: charlie at egenix.com (Charlie Clark) Date: Sat Jan 28 08:06:20 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000101c5516f$3b96de90$6505a8c0@rjlaptop> References: <000101c5516f$3b96de90$6505a8c0@rjlaptop> Message-ID: <20050505150032.644.1@bepc.1115296715.fake> On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base eGenix > mxODBC Database Connection window, it works fine and returns the 20 > lines expected. That could point to a problem in the rendering, which > seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection to > a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 10:22:17 2005 From: rj at maxxian.com (RJ Juneau) Date: Sat Jan 28 08:06:20 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505150032.644.1@bepc.1115296715.fake> Message-ID: <000201c55175$75bcad10$6505a8c0@rjlaptop> At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 11:47:14 2005 From: rj at maxxian.com (RJ Juneau) Date: Sat Jan 28 08:06:20 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c55181$549be0e0$6505a8c0@rjlaptop> Charlie, I found a fix. Here it is in case anyone else runs into this. You were correct - the problem is in another part of Zope. Based on your feedback, I did a bit more searching and found something here: http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. html The problem appears to be in Zope versions after 2.7.0. I'm running 2.7.6, and the post indicates that it also happens in 2.7.4. The solution: Edit file /lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. There are two lines in the file that start with . Edit them as follows: Change first line to: Change second line to: Just to be after, I shut down Zope before I made the changes and restarted it after. Thanks for the help! RJ -----Original Message----- From: RJ Juneau [mailto:rj@maxxian.com] Sent: May 5, 2005 9:22 AM To: 'Charlie Clark' Cc: 'egenix-users@lists.egenix.com' Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 17:57:25 2005 From: charlie at egenix.com (Charlie Clark) Date: Sat Jan 28 08:06:20 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <20050505165725.3380.2@bepc.1115296715.fake> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Thu May 5 09:15:21 2005 From: charlie at egenix.com (Charlie Clark) Date: Sat Jan 28 08:06:20 2006 Subject: [Zope-DB] RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <000001c55185$41477730$6b00a8c0@fonacier.local> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________ Zope-DB mailing list Zope-DB@zope.org http://mail.zope.org/mailman/listinfo/zope-db From rj at maxxian.com Thu May 5 12:38:00 2005 From: rj at maxxian.com (RJ Juneau) Date: Sat Jan 28 08:06:20 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000001c55188$6b841eb0$6505a8c0@rjlaptop> I just double-checked. Zope-2.7.6-final. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 12:49:16 2005 From: rj at maxxian.com (RJ Juneau) Date: Sat Jan 28 08:06:21 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000501c55189$fe149ba0$6505a8c0@rjlaptop> Charlie, The fix has only been applied for 2.7.7, 2.8b2. The info is in the original bug report which is closed and can be found here: http://www.zope.org/Collectors/Zope/1745 RJ -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Fri May 6 11:50:09 2005 From: rj at maxxian.com (RJ Juneau) Date: Sat Jan 28 08:06:21 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC Message-ID: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Still on eval for the product. I cannot get a stable connection to Sybase via the iODBC drivers. - The Sybase ODBC connection - including a query - have been verified at the iODBC level. - The setup is already working well for ODBC connection to MySQL. Symptoms include: - If I click on "Open Connection", it still comes back with "Connection Closed" when I go to a ZSQL method - Using 'Connect on Demand' is not working either. - Clicking "Open Connection" gives me the following error: Connection string: DSN=lixbox_sybase; UID=sa; PWD=XXXXXXX Connection pool entry: 0 Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection rejected by data source', 7952) The odbc.ini definition for DSN "lixbox_sybase" is as follows: [lixbox_sybase] JetFix = No NoRowSetSizeLimit = No Description = Test connection to listbox Options = LIXBOX DSQUERY = SQLSERVER TDSHOST = lixbox TDSPORT = 5000 TDSVER = 5.0 SQLSERVER_CATALOG = N CURSOR_SENSITIVITY = LOW UserName = sa Password = XXXXXXXX ServerType = Sybase 10/11/12 Driver = /opt/openlink/lib/sql_mt_lt.so Database = pubs2 ReadOnly = no NoAutoCommit = No NoLoginBox = No FetchBufferSize = 60 Other relevant data: - Connecting via OpenLink's iODBC - Zope 2.7.6-final - Python 2.3.4 - Connection to Sybase has been successfully tested with iODBC, including issuing a query - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC connection RJ Juneau Chief Technology Officer Maxxian Integration Inc. 155 Westhampton Drive Thornhill, Ontario Canada L4J 7X2 E-mail: rj@maxxian.com Phone: +1 905 482 9429 Cell: +1 416 897 6682 Toll free: +1 866 758 9161 Fax: +1 647 722 2038 -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050506/aef33361/attachment-0061.htm From mal at egenix.com Fri May 6 18:27:37 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 28 08:06:21 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC In-Reply-To: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> References: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Message-ID: <427B8CE9.1010601@egenix.com> RJ Juneau wrote: > Still on eval for the product. > > I cannot get a stable connection to Sybase via the iODBC drivers. > > - The Sybase ODBC connection - including a query - have been verified at > the iODBC level. > - The setup is already working well for ODBC connection to MySQL. > > Symptoms include: > > - If I click on "Open Connection", it still comes back with "Connection > Closed" when I go to a ZSQL method > - Using 'Connect on Demand' is not working either. > - Clicking "Open Connection" gives me the following error: > > Connection string: DSN=lixbox_sybase; > UID=sa; > PWD=XXXXXXX Try writing the connection string on one line and without whitespace. ODBC drivers sometimes have problems with this. > Connection pool entry: 0 > Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection > rejected by data source', 7952) This is a generic error that relates to authentication or firewall problems. It is possible that turning on ODBC tracing the ODBC manager will give more clues as to the real cause of the problem. > The odbc.ini definition for DSN "lixbox_sybase" is as follows: > > [lixbox_sybase] > JetFix = No > NoRowSetSizeLimit = No > Description = Test connection to listbox > Options = LIXBOX > DSQUERY = SQLSERVER > TDSHOST = lixbox > TDSPORT = 5000 > TDSVER = 5.0 > SQLSERVER_CATALOG = N > CURSOR_SENSITIVITY = LOW > UserName = sa > Password = XXXXXXXX > ServerType = Sybase 10/11/12 > Driver = /opt/openlink/lib/sql_mt_lt.so > Database = pubs2 > ReadOnly = no > NoAutoCommit = No > NoLoginBox = No > FetchBufferSize = 60 > > > Other relevant data: > - Connecting via OpenLink's iODBC > - Zope 2.7.6-final > - Python 2.3.4 > - Connection to Sybase has been successfully tested with iODBC, > including issuing a query > - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC > connection > > > > RJ Juneau > Chief Technology Officer > Maxxian Integration Inc. > 155 Westhampton Drive > Thornhill, Ontario > Canada L4J 7X2 > E-mail: rj@maxxian.com > Phone: +1 905 482 9429 > Cell: +1 416 897 6682 > Toll free: +1 866 758 9161 > Fax: +1 647 722 2038 > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 06 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From calisp at gmail.com Sun May 15 23:49:03 2005 From: calisp at gmail.com (calisp@gmail.com) Date: Sat Jan 28 08:06:21 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK Message-ID: Hi, I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the following error... 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the last phase of a two-phase commit. This shouldn't happen. Traceback (most recent call last): File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one jar.tpc_finish(self) File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish try: self._finish() File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could not perform COMMIT or ROLLBACK', 1023) What could be causing this? Can I get the mxODBCZopeDA source from somewhere? It would make debugging this much easier. Thanks, Calisp. From mal at egenix.com Mon May 16 13:52:12 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 28 08:06:21 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK In-Reply-To: References: Message-ID: <42887B5C.4010109@egenix.com> calisp@gmail.com wrote: > Hi, > > I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with > unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the > following error... > > 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the > last phase of a two-phase commit. This shouldn't happen. > Traceback (most recent call last): > File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one > jar.tpc_finish(self) > File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish > try: self._finish() > File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish > File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler > ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could > not perform COMMIT or ROLLBACK', 1023) You should have a look at the database logs to see what prevented the commit from being completed. > What could be causing this? Hard to say: mxODBCZopeDA is trying to commit the transaction, but the driver or database failed to complete the request. The above error was generated by the ODBC driver. This could be network or DNS problems, or be related to a bug in FreeTDS (which is getting more stable with every new release, but should still be considered beta quality software at the moment). > Can I get the mxODBCZopeDA source from > somewhere? It would make debugging this much easier. Getting the source is not an option and won't help much either since the source of the problem is not mxODBCZopeDA. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 16 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Sun May 1 21:29:25 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 28 12:02:06 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <427259F3.4090806@egenix.com> References: <20050427130906.52878.qmail@web30008.mail.mud.yahoo.com> <427259F3.4090806@egenix.com> Message-ID: <42752005.7080904@egenix.com> M.-A. Lemburg wrote: > David Rushby wrote: > >> --- "M.-A. Lemburg" wrote: >> >>> Are you using the standard mxDateTime build or one >>> with WANT_SUBCLASSABLE_TYPES defined... >> >> >> >> Presumably "the standard", since I just built with 'py24d setup.py >> build', making no attempt to enable special directives. >> >> >>> ... (mxDateTime_Deallocate is only used by the latter)? >> >> >> >> That's true in 2.1.0-2005-04-15, but not in 2.1.0b5. >> >> >>> In any case, please try our latest snapshot: >>> >>> >> >> http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-04-15.zip >> >>> to see if that makes any difference. >> >> >> >> I can't build it out of the box: > > > Hmm, looks like distutils' sdist command doesn't like our new > repository layout which uses symlinks (after we've switched to > subversion). > > We'll have to debug distutils first, I guess :-( Ok, we've found the problem and fixed it. Here's the new release (which does build out of the box at least on our boxes ;-): http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 01 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From davidrushby at yahoo.com Mon May 2 15:49:53 2005 From: davidrushby at yahoo.com (David Rushby) Date: Sat Jan 28 12:02:06 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Ok, we've found the problem and fixed it. Here's the new > release (which does build out of the box at least on our > boxes ;-): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip It does build now, but: py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" still behaves as it did when I submitted my original message: Fatal Python error: UNREF invalid object Aborted This is the same debug build of Python 2.4.1 that I was previously using, running the same configuration (CentOS Linux 4.0/i386, everything compiled with GCC 3.4.3). Have you examined my original claim as to the cause of the bug? __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 10:21:55 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 28 12:02:06 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> References: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> Message-ID: <42772693.8050306@egenix.com> David Rushby wrote: > --- "M.-A. Lemburg" wrote: > >>Ok, we've found the problem and fixed it. Here's the new >>release (which does build out of the box at least on our >>boxes ;-): >> >> > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip > > It does build now, but: > py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" > still behaves as it did when I submitted my original message: > Fatal Python error: UNREF invalid object > Aborted > > This is the same debug build of Python 2.4.1 that I was previously > using, running the same configuration (CentOS Linux 4.0/i386, > everything compiled with GCC 3.4.3). > > Have you examined my original claim as to the cause of the bug? No. We haven't had time for looking into it. I'm not sure whether your analysis of the problem is correct: if you don't define WANT_SUBCLASSABLE_TYPES, the API mxDateTime_Deallocate() is neither defined nor used. Furthermore, PyObject_Del() is only called by mxDateTime_Free() if you have explicitely edited mxDateTime.c to disabled the free list #defines. In a standard build, PyObject_Del() is only called at module finalization time. Note that the reason we call mxDateTime_Free() in the constructor is that we don't want the destructor of the object to be called. Py_DECREF() would call the destructor (mxDateTime_Deallocate). It is possible that the debug code in Python complains about the refcount in the object not being 0 at the time the object is finalized (module finalization time), but I don't see any such checks in PyObject_Free() (which is what PyObject_Del() maps to). Again, all of this does not happen in regular non-debug Python builds. Please be aware that we don't support debug builds, so fixing the problem (if there is one - gcc has some serious optimization problems on some combinations of platform and version) will take a while. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 09:27:37 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Sat Jan 28 12:02:06 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 Message-ID: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Hi all- I am trying to build the mx-base package, v.2.0.6. This will be used with postgresql 7.3.9, psycopg 1.1.18, and Roundup 0.8.2. RHEL 3.0 Python 2.3 egenix-mx-base-2.0.6.tar.gz I performed a: /usr/local/bin/python2.3 setup.py install Everything looks proper with the exeception of this series of warning statements: ----------------- gcc -pthread -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fno-strict-aliasing -fPIC -Imx/BeeBase/mxBeeBase -I/usr/local/incl ude/python2.3 -I/usr/local/include -c mx/BeeBase/mxBeeBase/btr.c -o build/temp.linux-i686-2.3/mx/BeeBase/mxBeeBase/mxBeeBa se/mx/BeeBase/mxBeeBase/btr.o mx/BeeBase/mxBeeBase/btr.c: In function `dumpBuf': mx/BeeBase/mxBeeBase/btr.c:249: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:250: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:255: warning: unsigned int format, long unsigned int arg (arg 4) mx/BeeBase/mxBeeBase/btr.c:256: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c: In function `_validateTree': mx/BeeBase/mxBeeBase/btr.c:330: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:337: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:339: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:349: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:351: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 3) creating build/lib.linux-i686-2.3/mx/BeeBase creating build/lib.linux-i686-2.3/mx/BeeBase/mxBeeBase -------------- Would someone be kind enough to let me know whether these messages were expected, and if not, how I might resolve these? Thanks! DC __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 22:06:33 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 28 12:02:06 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> References: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Message-ID: <4277CBB9.8020302@egenix.com> Dianne Chen wrote: > Hi all- > > I am trying to build the mx-base package, v.2.0.6. > This will be used with postgresql 7.3.9, psycopg > 1.1.18, and Roundup 0.8.2. > > RHEL 3.0 > Python 2.3 > egenix-mx-base-2.0.6.tar.gz > > I performed a: > > /usr/local/bin/python2.3 setup.py install > > Everything looks proper with the exeception of this > series of warning statements: > > ----------------- > ... > -------------- > > Would someone be kind enough to let me know whether > these messages were expected, and if not, how I might > resolve these? These warning can safely be ignored. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 13:41:14 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Sat Jan 28 12:02:06 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: 6667 Message-ID: <20050503194114.72091.qmail@web31414.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Dianne Chen wrote: > > Hi all- > > > > I am trying to build the mx-base package, v.2.0.6. > > This will be used with postgresql 7.3.9, psycopg > > 1.1.18, and Roundup 0.8.2. > > > > RHEL 3.0 > > Python 2.3 > > egenix-mx-base-2.0.6.tar.gz > > > > I performed a: > > > > /usr/local/bin/python2.3 setup.py install > > > > Everything looks proper with the exeception of > this > > series of warning statements: > > > > ----------------- > > ... > > -------------- > > > > Would someone be kind enough to let me know > whether > > these messages were expected, and if not, how I > might > > resolve these? > > These warning can safely be ignored. > > -- > Marc-Andre Lemburg > eGenix.com > Marc- Thank you very much for the reply. It helps greatly. With kind regards, DC __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From davidrushby at yahoo.com Tue May 3 17:18:46 2005 From: davidrushby at yahoo.com (David Rushby) Date: Sat Jan 28 12:02:06 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050503231846.35012.qmail@web30009.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > I'm not sure whether your analysis of the problem is correct... Indeed, my original analysis wasn't correct; I think this one is. The fatal error I'm complaining about only arises if the arguments to DateTime.DateTime are invalid, so that the object is deallocated in the onError block of mxDateTime_FromDateAndTime. If the object is created successfully, and later deallocated by Python's garbage collector, the fatal error doesn't arise. Here's my analysis of the problem: --- If the debugging directive Py_TRACE_REFS is enabled, as it is in my case, the Python interpreter maintains a doubly linked list of all Python objects (named refchain) via the _ob_next and _ob_prev pointers added to PyObject via _PyObject_HEAD_EXTRA. Each object is inserted into refchain by the _Py_AddToAllObjects call in _Py_NewReference, and removed from refchain by the _Py_ForgetReference call in _Py_Dealloc. _Py_ForgetReference performs an integrity check on the object being deallocated (op) to make sure that its neighbors in refchain recognize it. Specifically, _Py_ForgetReference verifies that the _ob_next pointer of the previous object in refchain (op->_ob_prev->_ob_next) points to op, and that the _ob_prev pointer of the next object in refchain (op->_ob_next->_ob_prev) points to op. If either of those conditions is false, the interpreter raises the fatal error I'm seeing. After mxDateTime_New pulls an mxDateTimeObject out of the free list, it calls _Py_NewReference on that object to transform it from a "conceptually deallocated" object to a "conceptually allocated" one. _Py_NewReference inserts the object into refchain. Later, when the object is being "conceptually deallocated", it should be removed from refchain with _Py_ForgetReference. The version of _Py_Dealloc that's active when Py_TRACE_REFS is enabled does this (_Py_Dealloc is the element of Py_DECREF that performs the actual destruction). _Py_Dealloc first calls _Py_ForgetReference to remove the object from refchain, then calls the object's destructor (op->ob_type->tp_dealloc). If WANT_SUBCLASSABLE_TYPES is not defined (it is not in my case), the destructor for mxDateTime_Type is mxDateTime_Free. So, if a DateTime object is deallocated normally, as a result of its reference count falling to zero, _Py_Dealloc is called on the object, which first removes it from refchain, then passes it to mxDateTime_Free. If a DateTime object is destroyed prematurely, as a result of invalid arguments to its destructor, the onError handler calls mxDateTime_Free, so the object is "conceptually deallocated" (placed in the free list), *but* the object is not removed from refchain. So if a refchain-membership-integrity-check is performed on the object in question or one of its immediate neighbors in refchain, that integrity check fails, leading to the fatal error. --- The solution is to 'Py_DECREF(...)' the object in the onError handler of its constructor, instead of passing the object directly to mxDateTime_Free. That change solves two problems: 1) It causes _Py_Dealloc to execute, which in turn executes _Py_ForgetReference, so the object is removed from refchain, as it should be. 2) At present, objects that are created successfully and later deallocated by normal reference count mechanics have a reference count of 0 when they enter the free list, whereas objects whose constructors abort their creation due to invalid arguments have a reference count of 1 when they enter the free list. Although AFAIK this doesn't cause an actual execution problem (because the object's reference count is *explicitly set to 1* rather than *incremented by 1* when the object is later "conceptually allocated" by _Py_NewReference), it is likely to confuse future maintainers and thereby lead to the introduction of an actual execution problem. I assume that if you agree that this is a reasonable solution, you'll want to apply the change not only to mxDateTime_FromDateAndTime, but to all similar constructors in mxDateTime.c. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From rj at maxxian.com Thu May 5 01:57:40 2005 From: rj at maxxian.com (RJ Juneau) Date: Sat Jan 28 12:02:06 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c5512e$f72798c0$6505a8c0@rjlaptop> I'm on the 30 day evaluation for mxodbc_zope_da. I'm getting the following error when I submit some queries: Error Type: KeyError Error Value: 'query' I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 with UCS4. The error seems to be caused by multiple rows being returned. I did see an earlier posting with the same error message. The response suggested a template error, but this is clearly not the case here. The additional evidence I've gathered so far: - I'm running the test directly from the ZSQL method, so there's no template involved. - If I use the same query with an additional "where" clause to ensure that only one row is returned, it works - If I use a value in the 'where' clause with no rows returned, it works - The same ZSQL query is being used on a Windows machine running Zope and the free ZODBC module without a problem - The query has been verified directly in mysql-client-browser Other info: - The database is MySQL 4.1.10A-0 - iODBC is the DB driver RJ Juneau -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050505/68d278bf/attachment-0062.htm From mal at egenix.com Thu May 5 12:37:43 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 28 12:02:06 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c5512e$f72798c0$6505a8c0@rjlaptop> References: <000301c5512e$f72798c0$6505a8c0@rjlaptop> Message-ID: <4279E967.6010904@egenix.com> RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 > with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 09:37:42 2005 From: rj at maxxian.com (RJ Juneau) Date: Sat Jan 28 12:02:06 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000101c5516f$3b96de90$6505a8c0@rjlaptop> More interesting info on the problem: If I execute the query directly in the "test" window of the base eGenix mxODBC Database Connection window, it works fine and returns the 20 lines expected. That could point to a problem in the rendering, which seems to be where the traceback ends. Note that within the same Zope system I also have an ODBC connection to a Sybase database, and I have successfully tested multi-line ZSQL queries there. This is the traceback: Time 2005/05/05 07:55:15.294 GMT-4 Exception Type KeyError Exception Value 'query' Traceback (innermost last): Module ZPublisher.Publish, line 101, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 39, in call_object Module Shared.DC.ZRDB.DA, line 337, in manage_test Module DocumentTemplate.DT_String, line 474, in __call__ Module DocumentTemplate.DT_In, line 602, in renderwb Module DocumentTemplate.DT_Var, line 219, in render KeyError: 'query' I don't think the following is an issue, but I'll include it for completeness.I am also getting the following iODBC warnings and errors in the Zope console log, which are related to the ODBC parameters being passed by iODBC. Note that these errors also appear for all of the successful queries. [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (Setup). [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (UsageCount). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Timeout). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Reuse). As for the ZSQL snippet from the template... Since there's no template involved yet (I'm still testing directly from the ZSQL method), I assume you mean the SQL code? select h.host_name, s.system_name, s.system_handle, count(*) from terminal t, system_map s, host h where t.system_index = s.system_index and s.host_index = h.host_index group by s.system_name order by h.host_name Nothing complicated here. There are no parameters passed to the query. RJ -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: May 5, 2005 5:38 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: Re: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is > 2.3.4 with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ---------------------------------------------------------------------- > -- > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 16:00:32 2005 From: charlie at egenix.com (Charlie Clark) Date: Sat Jan 28 12:02:06 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000101c5516f$3b96de90$6505a8c0@rjlaptop> References: <000101c5516f$3b96de90$6505a8c0@rjlaptop> Message-ID: <20050505150032.644.1@bepc.1115296715.fake> On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base eGenix > mxODBC Database Connection window, it works fine and returns the 20 > lines expected. That could point to a problem in the rendering, which > seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection to > a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 10:22:17 2005 From: rj at maxxian.com (RJ Juneau) Date: Sat Jan 28 12:02:06 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505150032.644.1@bepc.1115296715.fake> Message-ID: <000201c55175$75bcad10$6505a8c0@rjlaptop> At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 11:47:14 2005 From: rj at maxxian.com (RJ Juneau) Date: Sat Jan 28 12:02:06 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c55181$549be0e0$6505a8c0@rjlaptop> Charlie, I found a fix. Here it is in case anyone else runs into this. You were correct - the problem is in another part of Zope. Based on your feedback, I did a bit more searching and found something here: http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. html The problem appears to be in Zope versions after 2.7.0. I'm running 2.7.6, and the post indicates that it also happens in 2.7.4. The solution: Edit file /lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. There are two lines in the file that start with . Edit them as follows: Change first line to: Change second line to: Just to be after, I shut down Zope before I made the changes and restarted it after. Thanks for the help! RJ -----Original Message----- From: RJ Juneau [mailto:rj@maxxian.com] Sent: May 5, 2005 9:22 AM To: 'Charlie Clark' Cc: 'egenix-users@lists.egenix.com' Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 17:57:25 2005 From: charlie at egenix.com (Charlie Clark) Date: Sat Jan 28 12:02:06 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <20050505165725.3380.2@bepc.1115296715.fake> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Thu May 5 09:15:21 2005 From: charlie at egenix.com (Charlie Clark) Date: Sat Jan 28 12:02:06 2006 Subject: [Zope-DB] RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <000001c55185$41477730$6b00a8c0@fonacier.local> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________ Zope-DB mailing list Zope-DB@zope.org http://mail.zope.org/mailman/listinfo/zope-db From rj at maxxian.com Thu May 5 12:38:00 2005 From: rj at maxxian.com (RJ Juneau) Date: Sat Jan 28 12:02:06 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000001c55188$6b841eb0$6505a8c0@rjlaptop> I just double-checked. Zope-2.7.6-final. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 12:49:16 2005 From: rj at maxxian.com (RJ Juneau) Date: Sat Jan 28 12:02:06 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000501c55189$fe149ba0$6505a8c0@rjlaptop> Charlie, The fix has only been applied for 2.7.7, 2.8b2. The info is in the original bug report which is closed and can be found here: http://www.zope.org/Collectors/Zope/1745 RJ -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Fri May 6 11:50:09 2005 From: rj at maxxian.com (RJ Juneau) Date: Sat Jan 28 12:02:07 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC Message-ID: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Still on eval for the product. I cannot get a stable connection to Sybase via the iODBC drivers. - The Sybase ODBC connection - including a query - have been verified at the iODBC level. - The setup is already working well for ODBC connection to MySQL. Symptoms include: - If I click on "Open Connection", it still comes back with "Connection Closed" when I go to a ZSQL method - Using 'Connect on Demand' is not working either. - Clicking "Open Connection" gives me the following error: Connection string: DSN=lixbox_sybase; UID=sa; PWD=XXXXXXX Connection pool entry: 0 Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection rejected by data source', 7952) The odbc.ini definition for DSN "lixbox_sybase" is as follows: [lixbox_sybase] JetFix = No NoRowSetSizeLimit = No Description = Test connection to listbox Options = LIXBOX DSQUERY = SQLSERVER TDSHOST = lixbox TDSPORT = 5000 TDSVER = 5.0 SQLSERVER_CATALOG = N CURSOR_SENSITIVITY = LOW UserName = sa Password = XXXXXXXX ServerType = Sybase 10/11/12 Driver = /opt/openlink/lib/sql_mt_lt.so Database = pubs2 ReadOnly = no NoAutoCommit = No NoLoginBox = No FetchBufferSize = 60 Other relevant data: - Connecting via OpenLink's iODBC - Zope 2.7.6-final - Python 2.3.4 - Connection to Sybase has been successfully tested with iODBC, including issuing a query - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC connection RJ Juneau Chief Technology Officer Maxxian Integration Inc. 155 Westhampton Drive Thornhill, Ontario Canada L4J 7X2 E-mail: rj@maxxian.com Phone: +1 905 482 9429 Cell: +1 416 897 6682 Toll free: +1 866 758 9161 Fax: +1 647 722 2038 -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050506/aef33361/attachment-0062.htm From mal at egenix.com Fri May 6 18:27:37 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 28 12:02:07 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC In-Reply-To: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> References: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Message-ID: <427B8CE9.1010601@egenix.com> RJ Juneau wrote: > Still on eval for the product. > > I cannot get a stable connection to Sybase via the iODBC drivers. > > - The Sybase ODBC connection - including a query - have been verified at > the iODBC level. > - The setup is already working well for ODBC connection to MySQL. > > Symptoms include: > > - If I click on "Open Connection", it still comes back with "Connection > Closed" when I go to a ZSQL method > - Using 'Connect on Demand' is not working either. > - Clicking "Open Connection" gives me the following error: > > Connection string: DSN=lixbox_sybase; > UID=sa; > PWD=XXXXXXX Try writing the connection string on one line and without whitespace. ODBC drivers sometimes have problems with this. > Connection pool entry: 0 > Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection > rejected by data source', 7952) This is a generic error that relates to authentication or firewall problems. It is possible that turning on ODBC tracing the ODBC manager will give more clues as to the real cause of the problem. > The odbc.ini definition for DSN "lixbox_sybase" is as follows: > > [lixbox_sybase] > JetFix = No > NoRowSetSizeLimit = No > Description = Test connection to listbox > Options = LIXBOX > DSQUERY = SQLSERVER > TDSHOST = lixbox > TDSPORT = 5000 > TDSVER = 5.0 > SQLSERVER_CATALOG = N > CURSOR_SENSITIVITY = LOW > UserName = sa > Password = XXXXXXXX > ServerType = Sybase 10/11/12 > Driver = /opt/openlink/lib/sql_mt_lt.so > Database = pubs2 > ReadOnly = no > NoAutoCommit = No > NoLoginBox = No > FetchBufferSize = 60 > > > Other relevant data: > - Connecting via OpenLink's iODBC > - Zope 2.7.6-final > - Python 2.3.4 > - Connection to Sybase has been successfully tested with iODBC, > including issuing a query > - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC > connection > > > > RJ Juneau > Chief Technology Officer > Maxxian Integration Inc. > 155 Westhampton Drive > Thornhill, Ontario > Canada L4J 7X2 > E-mail: rj@maxxian.com > Phone: +1 905 482 9429 > Cell: +1 416 897 6682 > Toll free: +1 866 758 9161 > Fax: +1 647 722 2038 > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 06 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From calisp at gmail.com Sun May 15 23:49:03 2005 From: calisp at gmail.com (calisp@gmail.com) Date: Sat Jan 28 12:02:07 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK Message-ID: Hi, I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the following error... 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the last phase of a two-phase commit. This shouldn't happen. Traceback (most recent call last): File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one jar.tpc_finish(self) File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish try: self._finish() File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could not perform COMMIT or ROLLBACK', 1023) What could be causing this? Can I get the mxODBCZopeDA source from somewhere? It would make debugging this much easier. Thanks, Calisp. From mal at egenix.com Mon May 16 13:52:12 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 28 12:02:07 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK In-Reply-To: References: Message-ID: <42887B5C.4010109@egenix.com> calisp@gmail.com wrote: > Hi, > > I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with > unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the > following error... > > 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the > last phase of a two-phase commit. This shouldn't happen. > Traceback (most recent call last): > File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one > jar.tpc_finish(self) > File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish > try: self._finish() > File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish > File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler > ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could > not perform COMMIT or ROLLBACK', 1023) You should have a look at the database logs to see what prevented the commit from being completed. > What could be causing this? Hard to say: mxODBCZopeDA is trying to commit the transaction, but the driver or database failed to complete the request. The above error was generated by the ODBC driver. This could be network or DNS problems, or be related to a bug in FreeTDS (which is getting more stable with every new release, but should still be considered beta quality software at the moment). > Can I get the mxODBCZopeDA source from > somewhere? It would make debugging this much easier. Getting the source is not an option and won't help much either since the source of the problem is not mxODBCZopeDA. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 16 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Sun May 1 21:29:25 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 28 16:01:06 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <427259F3.4090806@egenix.com> References: <20050427130906.52878.qmail@web30008.mail.mud.yahoo.com> <427259F3.4090806@egenix.com> Message-ID: <42752005.7080904@egenix.com> M.-A. Lemburg wrote: > David Rushby wrote: > >> --- "M.-A. Lemburg" wrote: >> >>> Are you using the standard mxDateTime build or one >>> with WANT_SUBCLASSABLE_TYPES defined... >> >> >> >> Presumably "the standard", since I just built with 'py24d setup.py >> build', making no attempt to enable special directives. >> >> >>> ... (mxDateTime_Deallocate is only used by the latter)? >> >> >> >> That's true in 2.1.0-2005-04-15, but not in 2.1.0b5. >> >> >>> In any case, please try our latest snapshot: >>> >>> >> >> http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-04-15.zip >> >>> to see if that makes any difference. >> >> >> >> I can't build it out of the box: > > > Hmm, looks like distutils' sdist command doesn't like our new > repository layout which uses symlinks (after we've switched to > subversion). > > We'll have to debug distutils first, I guess :-( Ok, we've found the problem and fixed it. Here's the new release (which does build out of the box at least on our boxes ;-): http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 01 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From davidrushby at yahoo.com Mon May 2 15:49:53 2005 From: davidrushby at yahoo.com (David Rushby) Date: Sat Jan 28 16:01:06 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Ok, we've found the problem and fixed it. Here's the new > release (which does build out of the box at least on our > boxes ;-): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip It does build now, but: py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" still behaves as it did when I submitted my original message: Fatal Python error: UNREF invalid object Aborted This is the same debug build of Python 2.4.1 that I was previously using, running the same configuration (CentOS Linux 4.0/i386, everything compiled with GCC 3.4.3). Have you examined my original claim as to the cause of the bug? __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 10:21:55 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 28 16:01:06 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> References: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> Message-ID: <42772693.8050306@egenix.com> David Rushby wrote: > --- "M.-A. Lemburg" wrote: > >>Ok, we've found the problem and fixed it. Here's the new >>release (which does build out of the box at least on our >>boxes ;-): >> >> > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip > > It does build now, but: > py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" > still behaves as it did when I submitted my original message: > Fatal Python error: UNREF invalid object > Aborted > > This is the same debug build of Python 2.4.1 that I was previously > using, running the same configuration (CentOS Linux 4.0/i386, > everything compiled with GCC 3.4.3). > > Have you examined my original claim as to the cause of the bug? No. We haven't had time for looking into it. I'm not sure whether your analysis of the problem is correct: if you don't define WANT_SUBCLASSABLE_TYPES, the API mxDateTime_Deallocate() is neither defined nor used. Furthermore, PyObject_Del() is only called by mxDateTime_Free() if you have explicitely edited mxDateTime.c to disabled the free list #defines. In a standard build, PyObject_Del() is only called at module finalization time. Note that the reason we call mxDateTime_Free() in the constructor is that we don't want the destructor of the object to be called. Py_DECREF() would call the destructor (mxDateTime_Deallocate). It is possible that the debug code in Python complains about the refcount in the object not being 0 at the time the object is finalized (module finalization time), but I don't see any such checks in PyObject_Free() (which is what PyObject_Del() maps to). Again, all of this does not happen in regular non-debug Python builds. Please be aware that we don't support debug builds, so fixing the problem (if there is one - gcc has some serious optimization problems on some combinations of platform and version) will take a while. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 09:27:37 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Sat Jan 28 16:01:06 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 Message-ID: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Hi all- I am trying to build the mx-base package, v.2.0.6. This will be used with postgresql 7.3.9, psycopg 1.1.18, and Roundup 0.8.2. RHEL 3.0 Python 2.3 egenix-mx-base-2.0.6.tar.gz I performed a: /usr/local/bin/python2.3 setup.py install Everything looks proper with the exeception of this series of warning statements: ----------------- gcc -pthread -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fno-strict-aliasing -fPIC -Imx/BeeBase/mxBeeBase -I/usr/local/incl ude/python2.3 -I/usr/local/include -c mx/BeeBase/mxBeeBase/btr.c -o build/temp.linux-i686-2.3/mx/BeeBase/mxBeeBase/mxBeeBa se/mx/BeeBase/mxBeeBase/btr.o mx/BeeBase/mxBeeBase/btr.c: In function `dumpBuf': mx/BeeBase/mxBeeBase/btr.c:249: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:250: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:255: warning: unsigned int format, long unsigned int arg (arg 4) mx/BeeBase/mxBeeBase/btr.c:256: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c: In function `_validateTree': mx/BeeBase/mxBeeBase/btr.c:330: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:337: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:339: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:349: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:351: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 3) creating build/lib.linux-i686-2.3/mx/BeeBase creating build/lib.linux-i686-2.3/mx/BeeBase/mxBeeBase -------------- Would someone be kind enough to let me know whether these messages were expected, and if not, how I might resolve these? Thanks! DC __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 22:06:33 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 28 16:01:06 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> References: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Message-ID: <4277CBB9.8020302@egenix.com> Dianne Chen wrote: > Hi all- > > I am trying to build the mx-base package, v.2.0.6. > This will be used with postgresql 7.3.9, psycopg > 1.1.18, and Roundup 0.8.2. > > RHEL 3.0 > Python 2.3 > egenix-mx-base-2.0.6.tar.gz > > I performed a: > > /usr/local/bin/python2.3 setup.py install > > Everything looks proper with the exeception of this > series of warning statements: > > ----------------- > ... > -------------- > > Would someone be kind enough to let me know whether > these messages were expected, and if not, how I might > resolve these? These warning can safely be ignored. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 13:41:14 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Sat Jan 28 16:01:06 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: 6667 Message-ID: <20050503194114.72091.qmail@web31414.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Dianne Chen wrote: > > Hi all- > > > > I am trying to build the mx-base package, v.2.0.6. > > This will be used with postgresql 7.3.9, psycopg > > 1.1.18, and Roundup 0.8.2. > > > > RHEL 3.0 > > Python 2.3 > > egenix-mx-base-2.0.6.tar.gz > > > > I performed a: > > > > /usr/local/bin/python2.3 setup.py install > > > > Everything looks proper with the exeception of > this > > series of warning statements: > > > > ----------------- > > ... > > -------------- > > > > Would someone be kind enough to let me know > whether > > these messages were expected, and if not, how I > might > > resolve these? > > These warning can safely be ignored. > > -- > Marc-Andre Lemburg > eGenix.com > Marc- Thank you very much for the reply. It helps greatly. With kind regards, DC __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From davidrushby at yahoo.com Tue May 3 17:18:46 2005 From: davidrushby at yahoo.com (David Rushby) Date: Sat Jan 28 16:01:06 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050503231846.35012.qmail@web30009.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > I'm not sure whether your analysis of the problem is correct... Indeed, my original analysis wasn't correct; I think this one is. The fatal error I'm complaining about only arises if the arguments to DateTime.DateTime are invalid, so that the object is deallocated in the onError block of mxDateTime_FromDateAndTime. If the object is created successfully, and later deallocated by Python's garbage collector, the fatal error doesn't arise. Here's my analysis of the problem: --- If the debugging directive Py_TRACE_REFS is enabled, as it is in my case, the Python interpreter maintains a doubly linked list of all Python objects (named refchain) via the _ob_next and _ob_prev pointers added to PyObject via _PyObject_HEAD_EXTRA. Each object is inserted into refchain by the _Py_AddToAllObjects call in _Py_NewReference, and removed from refchain by the _Py_ForgetReference call in _Py_Dealloc. _Py_ForgetReference performs an integrity check on the object being deallocated (op) to make sure that its neighbors in refchain recognize it. Specifically, _Py_ForgetReference verifies that the _ob_next pointer of the previous object in refchain (op->_ob_prev->_ob_next) points to op, and that the _ob_prev pointer of the next object in refchain (op->_ob_next->_ob_prev) points to op. If either of those conditions is false, the interpreter raises the fatal error I'm seeing. After mxDateTime_New pulls an mxDateTimeObject out of the free list, it calls _Py_NewReference on that object to transform it from a "conceptually deallocated" object to a "conceptually allocated" one. _Py_NewReference inserts the object into refchain. Later, when the object is being "conceptually deallocated", it should be removed from refchain with _Py_ForgetReference. The version of _Py_Dealloc that's active when Py_TRACE_REFS is enabled does this (_Py_Dealloc is the element of Py_DECREF that performs the actual destruction). _Py_Dealloc first calls _Py_ForgetReference to remove the object from refchain, then calls the object's destructor (op->ob_type->tp_dealloc). If WANT_SUBCLASSABLE_TYPES is not defined (it is not in my case), the destructor for mxDateTime_Type is mxDateTime_Free. So, if a DateTime object is deallocated normally, as a result of its reference count falling to zero, _Py_Dealloc is called on the object, which first removes it from refchain, then passes it to mxDateTime_Free. If a DateTime object is destroyed prematurely, as a result of invalid arguments to its destructor, the onError handler calls mxDateTime_Free, so the object is "conceptually deallocated" (placed in the free list), *but* the object is not removed from refchain. So if a refchain-membership-integrity-check is performed on the object in question or one of its immediate neighbors in refchain, that integrity check fails, leading to the fatal error. --- The solution is to 'Py_DECREF(...)' the object in the onError handler of its constructor, instead of passing the object directly to mxDateTime_Free. That change solves two problems: 1) It causes _Py_Dealloc to execute, which in turn executes _Py_ForgetReference, so the object is removed from refchain, as it should be. 2) At present, objects that are created successfully and later deallocated by normal reference count mechanics have a reference count of 0 when they enter the free list, whereas objects whose constructors abort their creation due to invalid arguments have a reference count of 1 when they enter the free list. Although AFAIK this doesn't cause an actual execution problem (because the object's reference count is *explicitly set to 1* rather than *incremented by 1* when the object is later "conceptually allocated" by _Py_NewReference), it is likely to confuse future maintainers and thereby lead to the introduction of an actual execution problem. I assume that if you agree that this is a reasonable solution, you'll want to apply the change not only to mxDateTime_FromDateAndTime, but to all similar constructors in mxDateTime.c. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From rj at maxxian.com Thu May 5 01:57:40 2005 From: rj at maxxian.com (RJ Juneau) Date: Sat Jan 28 16:01:06 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c5512e$f72798c0$6505a8c0@rjlaptop> I'm on the 30 day evaluation for mxodbc_zope_da. I'm getting the following error when I submit some queries: Error Type: KeyError Error Value: 'query' I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 with UCS4. The error seems to be caused by multiple rows being returned. I did see an earlier posting with the same error message. The response suggested a template error, but this is clearly not the case here. The additional evidence I've gathered so far: - I'm running the test directly from the ZSQL method, so there's no template involved. - If I use the same query with an additional "where" clause to ensure that only one row is returned, it works - If I use a value in the 'where' clause with no rows returned, it works - The same ZSQL query is being used on a Windows machine running Zope and the free ZODBC module without a problem - The query has been verified directly in mysql-client-browser Other info: - The database is MySQL 4.1.10A-0 - iODBC is the DB driver RJ Juneau -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050505/68d278bf/attachment-0063.htm From mal at egenix.com Thu May 5 12:37:43 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 28 16:01:06 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c5512e$f72798c0$6505a8c0@rjlaptop> References: <000301c5512e$f72798c0$6505a8c0@rjlaptop> Message-ID: <4279E967.6010904@egenix.com> RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 > with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 09:37:42 2005 From: rj at maxxian.com (RJ Juneau) Date: Sat Jan 28 16:01:06 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000101c5516f$3b96de90$6505a8c0@rjlaptop> More interesting info on the problem: If I execute the query directly in the "test" window of the base eGenix mxODBC Database Connection window, it works fine and returns the 20 lines expected. That could point to a problem in the rendering, which seems to be where the traceback ends. Note that within the same Zope system I also have an ODBC connection to a Sybase database, and I have successfully tested multi-line ZSQL queries there. This is the traceback: Time 2005/05/05 07:55:15.294 GMT-4 Exception Type KeyError Exception Value 'query' Traceback (innermost last): Module ZPublisher.Publish, line 101, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 39, in call_object Module Shared.DC.ZRDB.DA, line 337, in manage_test Module DocumentTemplate.DT_String, line 474, in __call__ Module DocumentTemplate.DT_In, line 602, in renderwb Module DocumentTemplate.DT_Var, line 219, in render KeyError: 'query' I don't think the following is an issue, but I'll include it for completeness.I am also getting the following iODBC warnings and errors in the Zope console log, which are related to the ODBC parameters being passed by iODBC. Note that these errors also appear for all of the successful queries. [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (Setup). [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (UsageCount). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Timeout). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Reuse). As for the ZSQL snippet from the template... Since there's no template involved yet (I'm still testing directly from the ZSQL method), I assume you mean the SQL code? select h.host_name, s.system_name, s.system_handle, count(*) from terminal t, system_map s, host h where t.system_index = s.system_index and s.host_index = h.host_index group by s.system_name order by h.host_name Nothing complicated here. There are no parameters passed to the query. RJ -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: May 5, 2005 5:38 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: Re: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is > 2.3.4 with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ---------------------------------------------------------------------- > -- > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 16:00:32 2005 From: charlie at egenix.com (Charlie Clark) Date: Sat Jan 28 16:01:06 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000101c5516f$3b96de90$6505a8c0@rjlaptop> References: <000101c5516f$3b96de90$6505a8c0@rjlaptop> Message-ID: <20050505150032.644.1@bepc.1115296715.fake> On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base eGenix > mxODBC Database Connection window, it works fine and returns the 20 > lines expected. That could point to a problem in the rendering, which > seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection to > a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 10:22:17 2005 From: rj at maxxian.com (RJ Juneau) Date: Sat Jan 28 16:01:06 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505150032.644.1@bepc.1115296715.fake> Message-ID: <000201c55175$75bcad10$6505a8c0@rjlaptop> At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 11:47:14 2005 From: rj at maxxian.com (RJ Juneau) Date: Sat Jan 28 16:01:06 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c55181$549be0e0$6505a8c0@rjlaptop> Charlie, I found a fix. Here it is in case anyone else runs into this. You were correct - the problem is in another part of Zope. Based on your feedback, I did a bit more searching and found something here: http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. html The problem appears to be in Zope versions after 2.7.0. I'm running 2.7.6, and the post indicates that it also happens in 2.7.4. The solution: Edit file /lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. There are two lines in the file that start with . Edit them as follows: Change first line to: Change second line to: Just to be after, I shut down Zope before I made the changes and restarted it after. Thanks for the help! RJ -----Original Message----- From: RJ Juneau [mailto:rj@maxxian.com] Sent: May 5, 2005 9:22 AM To: 'Charlie Clark' Cc: 'egenix-users@lists.egenix.com' Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 17:57:25 2005 From: charlie at egenix.com (Charlie Clark) Date: Sat Jan 28 16:01:06 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <20050505165725.3380.2@bepc.1115296715.fake> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Thu May 5 09:15:21 2005 From: charlie at egenix.com (Charlie Clark) Date: Sat Jan 28 16:01:06 2006 Subject: [Zope-DB] RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <000001c55185$41477730$6b00a8c0@fonacier.local> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________ Zope-DB mailing list Zope-DB@zope.org http://mail.zope.org/mailman/listinfo/zope-db From rj at maxxian.com Thu May 5 12:38:00 2005 From: rj at maxxian.com (RJ Juneau) Date: Sat Jan 28 16:01:06 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000001c55188$6b841eb0$6505a8c0@rjlaptop> I just double-checked. Zope-2.7.6-final. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 12:49:16 2005 From: rj at maxxian.com (RJ Juneau) Date: Sat Jan 28 16:01:06 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000501c55189$fe149ba0$6505a8c0@rjlaptop> Charlie, The fix has only been applied for 2.7.7, 2.8b2. The info is in the original bug report which is closed and can be found here: http://www.zope.org/Collectors/Zope/1745 RJ -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Fri May 6 11:50:09 2005 From: rj at maxxian.com (RJ Juneau) Date: Sat Jan 28 16:01:06 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC Message-ID: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Still on eval for the product. I cannot get a stable connection to Sybase via the iODBC drivers. - The Sybase ODBC connection - including a query - have been verified at the iODBC level. - The setup is already working well for ODBC connection to MySQL. Symptoms include: - If I click on "Open Connection", it still comes back with "Connection Closed" when I go to a ZSQL method - Using 'Connect on Demand' is not working either. - Clicking "Open Connection" gives me the following error: Connection string: DSN=lixbox_sybase; UID=sa; PWD=XXXXXXX Connection pool entry: 0 Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection rejected by data source', 7952) The odbc.ini definition for DSN "lixbox_sybase" is as follows: [lixbox_sybase] JetFix = No NoRowSetSizeLimit = No Description = Test connection to listbox Options = LIXBOX DSQUERY = SQLSERVER TDSHOST = lixbox TDSPORT = 5000 TDSVER = 5.0 SQLSERVER_CATALOG = N CURSOR_SENSITIVITY = LOW UserName = sa Password = XXXXXXXX ServerType = Sybase 10/11/12 Driver = /opt/openlink/lib/sql_mt_lt.so Database = pubs2 ReadOnly = no NoAutoCommit = No NoLoginBox = No FetchBufferSize = 60 Other relevant data: - Connecting via OpenLink's iODBC - Zope 2.7.6-final - Python 2.3.4 - Connection to Sybase has been successfully tested with iODBC, including issuing a query - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC connection RJ Juneau Chief Technology Officer Maxxian Integration Inc. 155 Westhampton Drive Thornhill, Ontario Canada L4J 7X2 E-mail: rj@maxxian.com Phone: +1 905 482 9429 Cell: +1 416 897 6682 Toll free: +1 866 758 9161 Fax: +1 647 722 2038 -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050506/aef33361/attachment-0063.htm From mal at egenix.com Fri May 6 18:27:37 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 28 16:01:06 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC In-Reply-To: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> References: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Message-ID: <427B8CE9.1010601@egenix.com> RJ Juneau wrote: > Still on eval for the product. > > I cannot get a stable connection to Sybase via the iODBC drivers. > > - The Sybase ODBC connection - including a query - have been verified at > the iODBC level. > - The setup is already working well for ODBC connection to MySQL. > > Symptoms include: > > - If I click on "Open Connection", it still comes back with "Connection > Closed" when I go to a ZSQL method > - Using 'Connect on Demand' is not working either. > - Clicking "Open Connection" gives me the following error: > > Connection string: DSN=lixbox_sybase; > UID=sa; > PWD=XXXXXXX Try writing the connection string on one line and without whitespace. ODBC drivers sometimes have problems with this. > Connection pool entry: 0 > Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection > rejected by data source', 7952) This is a generic error that relates to authentication or firewall problems. It is possible that turning on ODBC tracing the ODBC manager will give more clues as to the real cause of the problem. > The odbc.ini definition for DSN "lixbox_sybase" is as follows: > > [lixbox_sybase] > JetFix = No > NoRowSetSizeLimit = No > Description = Test connection to listbox > Options = LIXBOX > DSQUERY = SQLSERVER > TDSHOST = lixbox > TDSPORT = 5000 > TDSVER = 5.0 > SQLSERVER_CATALOG = N > CURSOR_SENSITIVITY = LOW > UserName = sa > Password = XXXXXXXX > ServerType = Sybase 10/11/12 > Driver = /opt/openlink/lib/sql_mt_lt.so > Database = pubs2 > ReadOnly = no > NoAutoCommit = No > NoLoginBox = No > FetchBufferSize = 60 > > > Other relevant data: > - Connecting via OpenLink's iODBC > - Zope 2.7.6-final > - Python 2.3.4 > - Connection to Sybase has been successfully tested with iODBC, > including issuing a query > - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC > connection > > > > RJ Juneau > Chief Technology Officer > Maxxian Integration Inc. > 155 Westhampton Drive > Thornhill, Ontario > Canada L4J 7X2 > E-mail: rj@maxxian.com > Phone: +1 905 482 9429 > Cell: +1 416 897 6682 > Toll free: +1 866 758 9161 > Fax: +1 647 722 2038 > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 06 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From calisp at gmail.com Sun May 15 23:49:03 2005 From: calisp at gmail.com (calisp@gmail.com) Date: Sat Jan 28 16:01:06 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK Message-ID: Hi, I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the following error... 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the last phase of a two-phase commit. This shouldn't happen. Traceback (most recent call last): File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one jar.tpc_finish(self) File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish try: self._finish() File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could not perform COMMIT or ROLLBACK', 1023) What could be causing this? Can I get the mxODBCZopeDA source from somewhere? It would make debugging this much easier. Thanks, Calisp. From mal at egenix.com Mon May 16 13:52:12 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 28 16:01:06 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK In-Reply-To: References: Message-ID: <42887B5C.4010109@egenix.com> calisp@gmail.com wrote: > Hi, > > I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with > unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the > following error... > > 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the > last phase of a two-phase commit. This shouldn't happen. > Traceback (most recent call last): > File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one > jar.tpc_finish(self) > File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish > try: self._finish() > File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish > File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler > ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could > not perform COMMIT or ROLLBACK', 1023) You should have a look at the database logs to see what prevented the commit from being completed. > What could be causing this? Hard to say: mxODBCZopeDA is trying to commit the transaction, but the driver or database failed to complete the request. The above error was generated by the ODBC driver. This could be network or DNS problems, or be related to a bug in FreeTDS (which is getting more stable with every new release, but should still be considered beta quality software at the moment). > Can I get the mxODBCZopeDA source from > somewhere? It would make debugging this much easier. Getting the source is not an option and won't help much either since the source of the problem is not mxODBCZopeDA. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 16 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Sun May 1 21:29:25 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 28 20:01:05 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <427259F3.4090806@egenix.com> References: <20050427130906.52878.qmail@web30008.mail.mud.yahoo.com> <427259F3.4090806@egenix.com> Message-ID: <42752005.7080904@egenix.com> M.-A. Lemburg wrote: > David Rushby wrote: > >> --- "M.-A. Lemburg" wrote: >> >>> Are you using the standard mxDateTime build or one >>> with WANT_SUBCLASSABLE_TYPES defined... >> >> >> >> Presumably "the standard", since I just built with 'py24d setup.py >> build', making no attempt to enable special directives. >> >> >>> ... (mxDateTime_Deallocate is only used by the latter)? >> >> >> >> That's true in 2.1.0-2005-04-15, but not in 2.1.0b5. >> >> >>> In any case, please try our latest snapshot: >>> >>> >> >> http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-04-15.zip >> >>> to see if that makes any difference. >> >> >> >> I can't build it out of the box: > > > Hmm, looks like distutils' sdist command doesn't like our new > repository layout which uses symlinks (after we've switched to > subversion). > > We'll have to debug distutils first, I guess :-( Ok, we've found the problem and fixed it. Here's the new release (which does build out of the box at least on our boxes ;-): http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 01 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From davidrushby at yahoo.com Mon May 2 15:49:53 2005 From: davidrushby at yahoo.com (David Rushby) Date: Sat Jan 28 20:01:05 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Ok, we've found the problem and fixed it. Here's the new > release (which does build out of the box at least on our > boxes ;-): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip It does build now, but: py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" still behaves as it did when I submitted my original message: Fatal Python error: UNREF invalid object Aborted This is the same debug build of Python 2.4.1 that I was previously using, running the same configuration (CentOS Linux 4.0/i386, everything compiled with GCC 3.4.3). Have you examined my original claim as to the cause of the bug? __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 10:21:55 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 28 20:01:05 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> References: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> Message-ID: <42772693.8050306@egenix.com> David Rushby wrote: > --- "M.-A. Lemburg" wrote: > >>Ok, we've found the problem and fixed it. Here's the new >>release (which does build out of the box at least on our >>boxes ;-): >> >> > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip > > It does build now, but: > py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" > still behaves as it did when I submitted my original message: > Fatal Python error: UNREF invalid object > Aborted > > This is the same debug build of Python 2.4.1 that I was previously > using, running the same configuration (CentOS Linux 4.0/i386, > everything compiled with GCC 3.4.3). > > Have you examined my original claim as to the cause of the bug? No. We haven't had time for looking into it. I'm not sure whether your analysis of the problem is correct: if you don't define WANT_SUBCLASSABLE_TYPES, the API mxDateTime_Deallocate() is neither defined nor used. Furthermore, PyObject_Del() is only called by mxDateTime_Free() if you have explicitely edited mxDateTime.c to disabled the free list #defines. In a standard build, PyObject_Del() is only called at module finalization time. Note that the reason we call mxDateTime_Free() in the constructor is that we don't want the destructor of the object to be called. Py_DECREF() would call the destructor (mxDateTime_Deallocate). It is possible that the debug code in Python complains about the refcount in the object not being 0 at the time the object is finalized (module finalization time), but I don't see any such checks in PyObject_Free() (which is what PyObject_Del() maps to). Again, all of this does not happen in regular non-debug Python builds. Please be aware that we don't support debug builds, so fixing the problem (if there is one - gcc has some serious optimization problems on some combinations of platform and version) will take a while. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 09:27:37 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Sat Jan 28 20:01:05 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 Message-ID: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Hi all- I am trying to build the mx-base package, v.2.0.6. This will be used with postgresql 7.3.9, psycopg 1.1.18, and Roundup 0.8.2. RHEL 3.0 Python 2.3 egenix-mx-base-2.0.6.tar.gz I performed a: /usr/local/bin/python2.3 setup.py install Everything looks proper with the exeception of this series of warning statements: ----------------- gcc -pthread -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fno-strict-aliasing -fPIC -Imx/BeeBase/mxBeeBase -I/usr/local/incl ude/python2.3 -I/usr/local/include -c mx/BeeBase/mxBeeBase/btr.c -o build/temp.linux-i686-2.3/mx/BeeBase/mxBeeBase/mxBeeBa se/mx/BeeBase/mxBeeBase/btr.o mx/BeeBase/mxBeeBase/btr.c: In function `dumpBuf': mx/BeeBase/mxBeeBase/btr.c:249: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:250: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:255: warning: unsigned int format, long unsigned int arg (arg 4) mx/BeeBase/mxBeeBase/btr.c:256: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c: In function `_validateTree': mx/BeeBase/mxBeeBase/btr.c:330: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:337: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:339: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:349: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:351: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 3) creating build/lib.linux-i686-2.3/mx/BeeBase creating build/lib.linux-i686-2.3/mx/BeeBase/mxBeeBase -------------- Would someone be kind enough to let me know whether these messages were expected, and if not, how I might resolve these? Thanks! DC __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 22:06:33 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 28 20:01:05 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> References: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Message-ID: <4277CBB9.8020302@egenix.com> Dianne Chen wrote: > Hi all- > > I am trying to build the mx-base package, v.2.0.6. > This will be used with postgresql 7.3.9, psycopg > 1.1.18, and Roundup 0.8.2. > > RHEL 3.0 > Python 2.3 > egenix-mx-base-2.0.6.tar.gz > > I performed a: > > /usr/local/bin/python2.3 setup.py install > > Everything looks proper with the exeception of this > series of warning statements: > > ----------------- > ... > -------------- > > Would someone be kind enough to let me know whether > these messages were expected, and if not, how I might > resolve these? These warning can safely be ignored. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 13:41:14 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Sat Jan 28 20:01:05 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: 6667 Message-ID: <20050503194114.72091.qmail@web31414.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Dianne Chen wrote: > > Hi all- > > > > I am trying to build the mx-base package, v.2.0.6. > > This will be used with postgresql 7.3.9, psycopg > > 1.1.18, and Roundup 0.8.2. > > > > RHEL 3.0 > > Python 2.3 > > egenix-mx-base-2.0.6.tar.gz > > > > I performed a: > > > > /usr/local/bin/python2.3 setup.py install > > > > Everything looks proper with the exeception of > this > > series of warning statements: > > > > ----------------- > > ... > > -------------- > > > > Would someone be kind enough to let me know > whether > > these messages were expected, and if not, how I > might > > resolve these? > > These warning can safely be ignored. > > -- > Marc-Andre Lemburg > eGenix.com > Marc- Thank you very much for the reply. It helps greatly. With kind regards, DC __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From davidrushby at yahoo.com Tue May 3 17:18:46 2005 From: davidrushby at yahoo.com (David Rushby) Date: Sat Jan 28 20:01:05 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050503231846.35012.qmail@web30009.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > I'm not sure whether your analysis of the problem is correct... Indeed, my original analysis wasn't correct; I think this one is. The fatal error I'm complaining about only arises if the arguments to DateTime.DateTime are invalid, so that the object is deallocated in the onError block of mxDateTime_FromDateAndTime. If the object is created successfully, and later deallocated by Python's garbage collector, the fatal error doesn't arise. Here's my analysis of the problem: --- If the debugging directive Py_TRACE_REFS is enabled, as it is in my case, the Python interpreter maintains a doubly linked list of all Python objects (named refchain) via the _ob_next and _ob_prev pointers added to PyObject via _PyObject_HEAD_EXTRA. Each object is inserted into refchain by the _Py_AddToAllObjects call in _Py_NewReference, and removed from refchain by the _Py_ForgetReference call in _Py_Dealloc. _Py_ForgetReference performs an integrity check on the object being deallocated (op) to make sure that its neighbors in refchain recognize it. Specifically, _Py_ForgetReference verifies that the _ob_next pointer of the previous object in refchain (op->_ob_prev->_ob_next) points to op, and that the _ob_prev pointer of the next object in refchain (op->_ob_next->_ob_prev) points to op. If either of those conditions is false, the interpreter raises the fatal error I'm seeing. After mxDateTime_New pulls an mxDateTimeObject out of the free list, it calls _Py_NewReference on that object to transform it from a "conceptually deallocated" object to a "conceptually allocated" one. _Py_NewReference inserts the object into refchain. Later, when the object is being "conceptually deallocated", it should be removed from refchain with _Py_ForgetReference. The version of _Py_Dealloc that's active when Py_TRACE_REFS is enabled does this (_Py_Dealloc is the element of Py_DECREF that performs the actual destruction). _Py_Dealloc first calls _Py_ForgetReference to remove the object from refchain, then calls the object's destructor (op->ob_type->tp_dealloc). If WANT_SUBCLASSABLE_TYPES is not defined (it is not in my case), the destructor for mxDateTime_Type is mxDateTime_Free. So, if a DateTime object is deallocated normally, as a result of its reference count falling to zero, _Py_Dealloc is called on the object, which first removes it from refchain, then passes it to mxDateTime_Free. If a DateTime object is destroyed prematurely, as a result of invalid arguments to its destructor, the onError handler calls mxDateTime_Free, so the object is "conceptually deallocated" (placed in the free list), *but* the object is not removed from refchain. So if a refchain-membership-integrity-check is performed on the object in question or one of its immediate neighbors in refchain, that integrity check fails, leading to the fatal error. --- The solution is to 'Py_DECREF(...)' the object in the onError handler of its constructor, instead of passing the object directly to mxDateTime_Free. That change solves two problems: 1) It causes _Py_Dealloc to execute, which in turn executes _Py_ForgetReference, so the object is removed from refchain, as it should be. 2) At present, objects that are created successfully and later deallocated by normal reference count mechanics have a reference count of 0 when they enter the free list, whereas objects whose constructors abort their creation due to invalid arguments have a reference count of 1 when they enter the free list. Although AFAIK this doesn't cause an actual execution problem (because the object's reference count is *explicitly set to 1* rather than *incremented by 1* when the object is later "conceptually allocated" by _Py_NewReference), it is likely to confuse future maintainers and thereby lead to the introduction of an actual execution problem. I assume that if you agree that this is a reasonable solution, you'll want to apply the change not only to mxDateTime_FromDateAndTime, but to all similar constructors in mxDateTime.c. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From rj at maxxian.com Thu May 5 01:57:40 2005 From: rj at maxxian.com (RJ Juneau) Date: Sat Jan 28 20:01:05 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c5512e$f72798c0$6505a8c0@rjlaptop> I'm on the 30 day evaluation for mxodbc_zope_da. I'm getting the following error when I submit some queries: Error Type: KeyError Error Value: 'query' I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 with UCS4. The error seems to be caused by multiple rows being returned. I did see an earlier posting with the same error message. The response suggested a template error, but this is clearly not the case here. The additional evidence I've gathered so far: - I'm running the test directly from the ZSQL method, so there's no template involved. - If I use the same query with an additional "where" clause to ensure that only one row is returned, it works - If I use a value in the 'where' clause with no rows returned, it works - The same ZSQL query is being used on a Windows machine running Zope and the free ZODBC module without a problem - The query has been verified directly in mysql-client-browser Other info: - The database is MySQL 4.1.10A-0 - iODBC is the DB driver RJ Juneau -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050505/68d278bf/attachment-0064.htm From mal at egenix.com Thu May 5 12:37:43 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 28 20:01:05 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c5512e$f72798c0$6505a8c0@rjlaptop> References: <000301c5512e$f72798c0$6505a8c0@rjlaptop> Message-ID: <4279E967.6010904@egenix.com> RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 > with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 09:37:42 2005 From: rj at maxxian.com (RJ Juneau) Date: Sat Jan 28 20:01:05 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000101c5516f$3b96de90$6505a8c0@rjlaptop> More interesting info on the problem: If I execute the query directly in the "test" window of the base eGenix mxODBC Database Connection window, it works fine and returns the 20 lines expected. That could point to a problem in the rendering, which seems to be where the traceback ends. Note that within the same Zope system I also have an ODBC connection to a Sybase database, and I have successfully tested multi-line ZSQL queries there. This is the traceback: Time 2005/05/05 07:55:15.294 GMT-4 Exception Type KeyError Exception Value 'query' Traceback (innermost last): Module ZPublisher.Publish, line 101, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 39, in call_object Module Shared.DC.ZRDB.DA, line 337, in manage_test Module DocumentTemplate.DT_String, line 474, in __call__ Module DocumentTemplate.DT_In, line 602, in renderwb Module DocumentTemplate.DT_Var, line 219, in render KeyError: 'query' I don't think the following is an issue, but I'll include it for completeness.I am also getting the following iODBC warnings and errors in the Zope console log, which are related to the ODBC parameters being passed by iODBC. Note that these errors also appear for all of the successful queries. [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (Setup). [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (UsageCount). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Timeout). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Reuse). As for the ZSQL snippet from the template... Since there's no template involved yet (I'm still testing directly from the ZSQL method), I assume you mean the SQL code? select h.host_name, s.system_name, s.system_handle, count(*) from terminal t, system_map s, host h where t.system_index = s.system_index and s.host_index = h.host_index group by s.system_name order by h.host_name Nothing complicated here. There are no parameters passed to the query. RJ -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: May 5, 2005 5:38 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: Re: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is > 2.3.4 with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ---------------------------------------------------------------------- > -- > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 16:00:32 2005 From: charlie at egenix.com (Charlie Clark) Date: Sat Jan 28 20:01:05 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000101c5516f$3b96de90$6505a8c0@rjlaptop> References: <000101c5516f$3b96de90$6505a8c0@rjlaptop> Message-ID: <20050505150032.644.1@bepc.1115296715.fake> On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base eGenix > mxODBC Database Connection window, it works fine and returns the 20 > lines expected. That could point to a problem in the rendering, which > seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection to > a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 10:22:17 2005 From: rj at maxxian.com (RJ Juneau) Date: Sat Jan 28 20:01:05 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505150032.644.1@bepc.1115296715.fake> Message-ID: <000201c55175$75bcad10$6505a8c0@rjlaptop> At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 11:47:14 2005 From: rj at maxxian.com (RJ Juneau) Date: Sat Jan 28 20:01:05 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c55181$549be0e0$6505a8c0@rjlaptop> Charlie, I found a fix. Here it is in case anyone else runs into this. You were correct - the problem is in another part of Zope. Based on your feedback, I did a bit more searching and found something here: http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. html The problem appears to be in Zope versions after 2.7.0. I'm running 2.7.6, and the post indicates that it also happens in 2.7.4. The solution: Edit file /lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. There are two lines in the file that start with . Edit them as follows: Change first line to: Change second line to: Just to be after, I shut down Zope before I made the changes and restarted it after. Thanks for the help! RJ -----Original Message----- From: RJ Juneau [mailto:rj@maxxian.com] Sent: May 5, 2005 9:22 AM To: 'Charlie Clark' Cc: 'egenix-users@lists.egenix.com' Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 17:57:25 2005 From: charlie at egenix.com (Charlie Clark) Date: Sat Jan 28 20:01:05 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <20050505165725.3380.2@bepc.1115296715.fake> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Thu May 5 09:15:21 2005 From: charlie at egenix.com (Charlie Clark) Date: Sat Jan 28 20:01:05 2006 Subject: [Zope-DB] RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <000001c55185$41477730$6b00a8c0@fonacier.local> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________ Zope-DB mailing list Zope-DB@zope.org http://mail.zope.org/mailman/listinfo/zope-db From rj at maxxian.com Thu May 5 12:38:00 2005 From: rj at maxxian.com (RJ Juneau) Date: Sat Jan 28 20:01:05 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000001c55188$6b841eb0$6505a8c0@rjlaptop> I just double-checked. Zope-2.7.6-final. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 12:49:16 2005 From: rj at maxxian.com (RJ Juneau) Date: Sat Jan 28 20:01:05 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000501c55189$fe149ba0$6505a8c0@rjlaptop> Charlie, The fix has only been applied for 2.7.7, 2.8b2. The info is in the original bug report which is closed and can be found here: http://www.zope.org/Collectors/Zope/1745 RJ -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Fri May 6 11:50:09 2005 From: rj at maxxian.com (RJ Juneau) Date: Sat Jan 28 20:01:05 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC Message-ID: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Still on eval for the product. I cannot get a stable connection to Sybase via the iODBC drivers. - The Sybase ODBC connection - including a query - have been verified at the iODBC level. - The setup is already working well for ODBC connection to MySQL. Symptoms include: - If I click on "Open Connection", it still comes back with "Connection Closed" when I go to a ZSQL method - Using 'Connect on Demand' is not working either. - Clicking "Open Connection" gives me the following error: Connection string: DSN=lixbox_sybase; UID=sa; PWD=XXXXXXX Connection pool entry: 0 Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection rejected by data source', 7952) The odbc.ini definition for DSN "lixbox_sybase" is as follows: [lixbox_sybase] JetFix = No NoRowSetSizeLimit = No Description = Test connection to listbox Options = LIXBOX DSQUERY = SQLSERVER TDSHOST = lixbox TDSPORT = 5000 TDSVER = 5.0 SQLSERVER_CATALOG = N CURSOR_SENSITIVITY = LOW UserName = sa Password = XXXXXXXX ServerType = Sybase 10/11/12 Driver = /opt/openlink/lib/sql_mt_lt.so Database = pubs2 ReadOnly = no NoAutoCommit = No NoLoginBox = No FetchBufferSize = 60 Other relevant data: - Connecting via OpenLink's iODBC - Zope 2.7.6-final - Python 2.3.4 - Connection to Sybase has been successfully tested with iODBC, including issuing a query - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC connection RJ Juneau Chief Technology Officer Maxxian Integration Inc. 155 Westhampton Drive Thornhill, Ontario Canada L4J 7X2 E-mail: rj@maxxian.com Phone: +1 905 482 9429 Cell: +1 416 897 6682 Toll free: +1 866 758 9161 Fax: +1 647 722 2038 -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050506/aef33361/attachment-0064.htm From mal at egenix.com Fri May 6 18:27:37 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 28 20:01:05 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC In-Reply-To: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> References: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Message-ID: <427B8CE9.1010601@egenix.com> RJ Juneau wrote: > Still on eval for the product. > > I cannot get a stable connection to Sybase via the iODBC drivers. > > - The Sybase ODBC connection - including a query - have been verified at > the iODBC level. > - The setup is already working well for ODBC connection to MySQL. > > Symptoms include: > > - If I click on "Open Connection", it still comes back with "Connection > Closed" when I go to a ZSQL method > - Using 'Connect on Demand' is not working either. > - Clicking "Open Connection" gives me the following error: > > Connection string: DSN=lixbox_sybase; > UID=sa; > PWD=XXXXXXX Try writing the connection string on one line and without whitespace. ODBC drivers sometimes have problems with this. > Connection pool entry: 0 > Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection > rejected by data source', 7952) This is a generic error that relates to authentication or firewall problems. It is possible that turning on ODBC tracing the ODBC manager will give more clues as to the real cause of the problem. > The odbc.ini definition for DSN "lixbox_sybase" is as follows: > > [lixbox_sybase] > JetFix = No > NoRowSetSizeLimit = No > Description = Test connection to listbox > Options = LIXBOX > DSQUERY = SQLSERVER > TDSHOST = lixbox > TDSPORT = 5000 > TDSVER = 5.0 > SQLSERVER_CATALOG = N > CURSOR_SENSITIVITY = LOW > UserName = sa > Password = XXXXXXXX > ServerType = Sybase 10/11/12 > Driver = /opt/openlink/lib/sql_mt_lt.so > Database = pubs2 > ReadOnly = no > NoAutoCommit = No > NoLoginBox = No > FetchBufferSize = 60 > > > Other relevant data: > - Connecting via OpenLink's iODBC > - Zope 2.7.6-final > - Python 2.3.4 > - Connection to Sybase has been successfully tested with iODBC, > including issuing a query > - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC > connection > > > > RJ Juneau > Chief Technology Officer > Maxxian Integration Inc. > 155 Westhampton Drive > Thornhill, Ontario > Canada L4J 7X2 > E-mail: rj@maxxian.com > Phone: +1 905 482 9429 > Cell: +1 416 897 6682 > Toll free: +1 866 758 9161 > Fax: +1 647 722 2038 > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 06 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From calisp at gmail.com Sun May 15 23:49:03 2005 From: calisp at gmail.com (calisp@gmail.com) Date: Sat Jan 28 20:01:05 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK Message-ID: Hi, I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the following error... 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the last phase of a two-phase commit. This shouldn't happen. Traceback (most recent call last): File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one jar.tpc_finish(self) File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish try: self._finish() File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could not perform COMMIT or ROLLBACK', 1023) What could be causing this? Can I get the mxODBCZopeDA source from somewhere? It would make debugging this much easier. Thanks, Calisp. From mal at egenix.com Mon May 16 13:52:12 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Jan 28 20:01:05 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK In-Reply-To: References: Message-ID: <42887B5C.4010109@egenix.com> calisp@gmail.com wrote: > Hi, > > I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with > unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the > following error... > > 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the > last phase of a two-phase commit. This shouldn't happen. > Traceback (most recent call last): > File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one > jar.tpc_finish(self) > File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish > try: self._finish() > File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish > File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler > ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could > not perform COMMIT or ROLLBACK', 1023) You should have a look at the database logs to see what prevented the commit from being completed. > What could be causing this? Hard to say: mxODBCZopeDA is trying to commit the transaction, but the driver or database failed to complete the request. The above error was generated by the ODBC driver. This could be network or DNS problems, or be related to a bug in FreeTDS (which is getting more stable with every new release, but should still be considered beta quality software at the moment). > Can I get the mxODBCZopeDA source from > somewhere? It would make debugging this much easier. Getting the source is not an option and won't help much either since the source of the problem is not mxODBCZopeDA. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 16 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Sun May 1 21:29:25 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 29 08:07:53 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <427259F3.4090806@egenix.com> References: <20050427130906.52878.qmail@web30008.mail.mud.yahoo.com> <427259F3.4090806@egenix.com> Message-ID: <42752005.7080904@egenix.com> M.-A. Lemburg wrote: > David Rushby wrote: > >> --- "M.-A. Lemburg" wrote: >> >>> Are you using the standard mxDateTime build or one >>> with WANT_SUBCLASSABLE_TYPES defined... >> >> >> >> Presumably "the standard", since I just built with 'py24d setup.py >> build', making no attempt to enable special directives. >> >> >>> ... (mxDateTime_Deallocate is only used by the latter)? >> >> >> >> That's true in 2.1.0-2005-04-15, but not in 2.1.0b5. >> >> >>> In any case, please try our latest snapshot: >>> >>> >> >> http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-04-15.zip >> >>> to see if that makes any difference. >> >> >> >> I can't build it out of the box: > > > Hmm, looks like distutils' sdist command doesn't like our new > repository layout which uses symlinks (after we've switched to > subversion). > > We'll have to debug distutils first, I guess :-( Ok, we've found the problem and fixed it. Here's the new release (which does build out of the box at least on our boxes ;-): http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 01 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From davidrushby at yahoo.com Mon May 2 15:49:53 2005 From: davidrushby at yahoo.com (David Rushby) Date: Sun Jan 29 08:07:53 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Ok, we've found the problem and fixed it. Here's the new > release (which does build out of the box at least on our > boxes ;-): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip It does build now, but: py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" still behaves as it did when I submitted my original message: Fatal Python error: UNREF invalid object Aborted This is the same debug build of Python 2.4.1 that I was previously using, running the same configuration (CentOS Linux 4.0/i386, everything compiled with GCC 3.4.3). Have you examined my original claim as to the cause of the bug? __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 10:21:55 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 29 08:07:53 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> References: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> Message-ID: <42772693.8050306@egenix.com> David Rushby wrote: > --- "M.-A. Lemburg" wrote: > >>Ok, we've found the problem and fixed it. Here's the new >>release (which does build out of the box at least on our >>boxes ;-): >> >> > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip > > It does build now, but: > py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" > still behaves as it did when I submitted my original message: > Fatal Python error: UNREF invalid object > Aborted > > This is the same debug build of Python 2.4.1 that I was previously > using, running the same configuration (CentOS Linux 4.0/i386, > everything compiled with GCC 3.4.3). > > Have you examined my original claim as to the cause of the bug? No. We haven't had time for looking into it. I'm not sure whether your analysis of the problem is correct: if you don't define WANT_SUBCLASSABLE_TYPES, the API mxDateTime_Deallocate() is neither defined nor used. Furthermore, PyObject_Del() is only called by mxDateTime_Free() if you have explicitely edited mxDateTime.c to disabled the free list #defines. In a standard build, PyObject_Del() is only called at module finalization time. Note that the reason we call mxDateTime_Free() in the constructor is that we don't want the destructor of the object to be called. Py_DECREF() would call the destructor (mxDateTime_Deallocate). It is possible that the debug code in Python complains about the refcount in the object not being 0 at the time the object is finalized (module finalization time), but I don't see any such checks in PyObject_Free() (which is what PyObject_Del() maps to). Again, all of this does not happen in regular non-debug Python builds. Please be aware that we don't support debug builds, so fixing the problem (if there is one - gcc has some serious optimization problems on some combinations of platform and version) will take a while. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 09:27:37 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Sun Jan 29 08:07:53 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 Message-ID: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Hi all- I am trying to build the mx-base package, v.2.0.6. This will be used with postgresql 7.3.9, psycopg 1.1.18, and Roundup 0.8.2. RHEL 3.0 Python 2.3 egenix-mx-base-2.0.6.tar.gz I performed a: /usr/local/bin/python2.3 setup.py install Everything looks proper with the exeception of this series of warning statements: ----------------- gcc -pthread -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fno-strict-aliasing -fPIC -Imx/BeeBase/mxBeeBase -I/usr/local/incl ude/python2.3 -I/usr/local/include -c mx/BeeBase/mxBeeBase/btr.c -o build/temp.linux-i686-2.3/mx/BeeBase/mxBeeBase/mxBeeBa se/mx/BeeBase/mxBeeBase/btr.o mx/BeeBase/mxBeeBase/btr.c: In function `dumpBuf': mx/BeeBase/mxBeeBase/btr.c:249: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:250: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:255: warning: unsigned int format, long unsigned int arg (arg 4) mx/BeeBase/mxBeeBase/btr.c:256: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c: In function `_validateTree': mx/BeeBase/mxBeeBase/btr.c:330: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:337: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:339: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:349: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:351: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 3) creating build/lib.linux-i686-2.3/mx/BeeBase creating build/lib.linux-i686-2.3/mx/BeeBase/mxBeeBase -------------- Would someone be kind enough to let me know whether these messages were expected, and if not, how I might resolve these? Thanks! DC __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 22:06:33 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 29 08:07:53 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> References: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Message-ID: <4277CBB9.8020302@egenix.com> Dianne Chen wrote: > Hi all- > > I am trying to build the mx-base package, v.2.0.6. > This will be used with postgresql 7.3.9, psycopg > 1.1.18, and Roundup 0.8.2. > > RHEL 3.0 > Python 2.3 > egenix-mx-base-2.0.6.tar.gz > > I performed a: > > /usr/local/bin/python2.3 setup.py install > > Everything looks proper with the exeception of this > series of warning statements: > > ----------------- > ... > -------------- > > Would someone be kind enough to let me know whether > these messages were expected, and if not, how I might > resolve these? These warning can safely be ignored. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 13:41:14 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Sun Jan 29 08:07:53 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: 6667 Message-ID: <20050503194114.72091.qmail@web31414.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Dianne Chen wrote: > > Hi all- > > > > I am trying to build the mx-base package, v.2.0.6. > > This will be used with postgresql 7.3.9, psycopg > > 1.1.18, and Roundup 0.8.2. > > > > RHEL 3.0 > > Python 2.3 > > egenix-mx-base-2.0.6.tar.gz > > > > I performed a: > > > > /usr/local/bin/python2.3 setup.py install > > > > Everything looks proper with the exeception of > this > > series of warning statements: > > > > ----------------- > > ... > > -------------- > > > > Would someone be kind enough to let me know > whether > > these messages were expected, and if not, how I > might > > resolve these? > > These warning can safely be ignored. > > -- > Marc-Andre Lemburg > eGenix.com > Marc- Thank you very much for the reply. It helps greatly. With kind regards, DC __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From davidrushby at yahoo.com Tue May 3 17:18:46 2005 From: davidrushby at yahoo.com (David Rushby) Date: Sun Jan 29 08:07:53 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050503231846.35012.qmail@web30009.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > I'm not sure whether your analysis of the problem is correct... Indeed, my original analysis wasn't correct; I think this one is. The fatal error I'm complaining about only arises if the arguments to DateTime.DateTime are invalid, so that the object is deallocated in the onError block of mxDateTime_FromDateAndTime. If the object is created successfully, and later deallocated by Python's garbage collector, the fatal error doesn't arise. Here's my analysis of the problem: --- If the debugging directive Py_TRACE_REFS is enabled, as it is in my case, the Python interpreter maintains a doubly linked list of all Python objects (named refchain) via the _ob_next and _ob_prev pointers added to PyObject via _PyObject_HEAD_EXTRA. Each object is inserted into refchain by the _Py_AddToAllObjects call in _Py_NewReference, and removed from refchain by the _Py_ForgetReference call in _Py_Dealloc. _Py_ForgetReference performs an integrity check on the object being deallocated (op) to make sure that its neighbors in refchain recognize it. Specifically, _Py_ForgetReference verifies that the _ob_next pointer of the previous object in refchain (op->_ob_prev->_ob_next) points to op, and that the _ob_prev pointer of the next object in refchain (op->_ob_next->_ob_prev) points to op. If either of those conditions is false, the interpreter raises the fatal error I'm seeing. After mxDateTime_New pulls an mxDateTimeObject out of the free list, it calls _Py_NewReference on that object to transform it from a "conceptually deallocated" object to a "conceptually allocated" one. _Py_NewReference inserts the object into refchain. Later, when the object is being "conceptually deallocated", it should be removed from refchain with _Py_ForgetReference. The version of _Py_Dealloc that's active when Py_TRACE_REFS is enabled does this (_Py_Dealloc is the element of Py_DECREF that performs the actual destruction). _Py_Dealloc first calls _Py_ForgetReference to remove the object from refchain, then calls the object's destructor (op->ob_type->tp_dealloc). If WANT_SUBCLASSABLE_TYPES is not defined (it is not in my case), the destructor for mxDateTime_Type is mxDateTime_Free. So, if a DateTime object is deallocated normally, as a result of its reference count falling to zero, _Py_Dealloc is called on the object, which first removes it from refchain, then passes it to mxDateTime_Free. If a DateTime object is destroyed prematurely, as a result of invalid arguments to its destructor, the onError handler calls mxDateTime_Free, so the object is "conceptually deallocated" (placed in the free list), *but* the object is not removed from refchain. So if a refchain-membership-integrity-check is performed on the object in question or one of its immediate neighbors in refchain, that integrity check fails, leading to the fatal error. --- The solution is to 'Py_DECREF(...)' the object in the onError handler of its constructor, instead of passing the object directly to mxDateTime_Free. That change solves two problems: 1) It causes _Py_Dealloc to execute, which in turn executes _Py_ForgetReference, so the object is removed from refchain, as it should be. 2) At present, objects that are created successfully and later deallocated by normal reference count mechanics have a reference count of 0 when they enter the free list, whereas objects whose constructors abort their creation due to invalid arguments have a reference count of 1 when they enter the free list. Although AFAIK this doesn't cause an actual execution problem (because the object's reference count is *explicitly set to 1* rather than *incremented by 1* when the object is later "conceptually allocated" by _Py_NewReference), it is likely to confuse future maintainers and thereby lead to the introduction of an actual execution problem. I assume that if you agree that this is a reasonable solution, you'll want to apply the change not only to mxDateTime_FromDateAndTime, but to all similar constructors in mxDateTime.c. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From rj at maxxian.com Thu May 5 01:57:40 2005 From: rj at maxxian.com (RJ Juneau) Date: Sun Jan 29 08:07:53 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c5512e$f72798c0$6505a8c0@rjlaptop> I'm on the 30 day evaluation for mxodbc_zope_da. I'm getting the following error when I submit some queries: Error Type: KeyError Error Value: 'query' I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 with UCS4. The error seems to be caused by multiple rows being returned. I did see an earlier posting with the same error message. The response suggested a template error, but this is clearly not the case here. The additional evidence I've gathered so far: - I'm running the test directly from the ZSQL method, so there's no template involved. - If I use the same query with an additional "where" clause to ensure that only one row is returned, it works - If I use a value in the 'where' clause with no rows returned, it works - The same ZSQL query is being used on a Windows machine running Zope and the free ZODBC module without a problem - The query has been verified directly in mysql-client-browser Other info: - The database is MySQL 4.1.10A-0 - iODBC is the DB driver RJ Juneau -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050505/68d278bf/attachment-0065.htm From mal at egenix.com Thu May 5 12:37:43 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 29 08:07:53 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c5512e$f72798c0$6505a8c0@rjlaptop> References: <000301c5512e$f72798c0$6505a8c0@rjlaptop> Message-ID: <4279E967.6010904@egenix.com> RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 > with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 09:37:42 2005 From: rj at maxxian.com (RJ Juneau) Date: Sun Jan 29 08:07:53 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000101c5516f$3b96de90$6505a8c0@rjlaptop> More interesting info on the problem: If I execute the query directly in the "test" window of the base eGenix mxODBC Database Connection window, it works fine and returns the 20 lines expected. That could point to a problem in the rendering, which seems to be where the traceback ends. Note that within the same Zope system I also have an ODBC connection to a Sybase database, and I have successfully tested multi-line ZSQL queries there. This is the traceback: Time 2005/05/05 07:55:15.294 GMT-4 Exception Type KeyError Exception Value 'query' Traceback (innermost last): Module ZPublisher.Publish, line 101, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 39, in call_object Module Shared.DC.ZRDB.DA, line 337, in manage_test Module DocumentTemplate.DT_String, line 474, in __call__ Module DocumentTemplate.DT_In, line 602, in renderwb Module DocumentTemplate.DT_Var, line 219, in render KeyError: 'query' I don't think the following is an issue, but I'll include it for completeness.I am also getting the following iODBC warnings and errors in the Zope console log, which are related to the ODBC parameters being passed by iODBC. Note that these errors also appear for all of the successful queries. [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (Setup). [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (UsageCount). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Timeout). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Reuse). As for the ZSQL snippet from the template... Since there's no template involved yet (I'm still testing directly from the ZSQL method), I assume you mean the SQL code? select h.host_name, s.system_name, s.system_handle, count(*) from terminal t, system_map s, host h where t.system_index = s.system_index and s.host_index = h.host_index group by s.system_name order by h.host_name Nothing complicated here. There are no parameters passed to the query. RJ -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: May 5, 2005 5:38 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: Re: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is > 2.3.4 with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ---------------------------------------------------------------------- > -- > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 16:00:32 2005 From: charlie at egenix.com (Charlie Clark) Date: Sun Jan 29 08:07:53 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000101c5516f$3b96de90$6505a8c0@rjlaptop> References: <000101c5516f$3b96de90$6505a8c0@rjlaptop> Message-ID: <20050505150032.644.1@bepc.1115296715.fake> On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base eGenix > mxODBC Database Connection window, it works fine and returns the 20 > lines expected. That could point to a problem in the rendering, which > seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection to > a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 10:22:17 2005 From: rj at maxxian.com (RJ Juneau) Date: Sun Jan 29 08:07:53 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505150032.644.1@bepc.1115296715.fake> Message-ID: <000201c55175$75bcad10$6505a8c0@rjlaptop> At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 11:47:14 2005 From: rj at maxxian.com (RJ Juneau) Date: Sun Jan 29 08:07:53 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c55181$549be0e0$6505a8c0@rjlaptop> Charlie, I found a fix. Here it is in case anyone else runs into this. You were correct - the problem is in another part of Zope. Based on your feedback, I did a bit more searching and found something here: http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. html The problem appears to be in Zope versions after 2.7.0. I'm running 2.7.6, and the post indicates that it also happens in 2.7.4. The solution: Edit file /lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. There are two lines in the file that start with . Edit them as follows: Change first line to: Change second line to: Just to be after, I shut down Zope before I made the changes and restarted it after. Thanks for the help! RJ -----Original Message----- From: RJ Juneau [mailto:rj@maxxian.com] Sent: May 5, 2005 9:22 AM To: 'Charlie Clark' Cc: 'egenix-users@lists.egenix.com' Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 17:57:25 2005 From: charlie at egenix.com (Charlie Clark) Date: Sun Jan 29 08:07:53 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <20050505165725.3380.2@bepc.1115296715.fake> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Thu May 5 09:15:21 2005 From: charlie at egenix.com (Charlie Clark) Date: Sun Jan 29 08:07:53 2006 Subject: [Zope-DB] RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <000001c55185$41477730$6b00a8c0@fonacier.local> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________ Zope-DB mailing list Zope-DB@zope.org http://mail.zope.org/mailman/listinfo/zope-db From rj at maxxian.com Thu May 5 12:38:00 2005 From: rj at maxxian.com (RJ Juneau) Date: Sun Jan 29 08:07:53 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000001c55188$6b841eb0$6505a8c0@rjlaptop> I just double-checked. Zope-2.7.6-final. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 12:49:16 2005 From: rj at maxxian.com (RJ Juneau) Date: Sun Jan 29 08:07:53 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000501c55189$fe149ba0$6505a8c0@rjlaptop> Charlie, The fix has only been applied for 2.7.7, 2.8b2. The info is in the original bug report which is closed and can be found here: http://www.zope.org/Collectors/Zope/1745 RJ -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Fri May 6 11:50:09 2005 From: rj at maxxian.com (RJ Juneau) Date: Sun Jan 29 08:07:53 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC Message-ID: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Still on eval for the product. I cannot get a stable connection to Sybase via the iODBC drivers. - The Sybase ODBC connection - including a query - have been verified at the iODBC level. - The setup is already working well for ODBC connection to MySQL. Symptoms include: - If I click on "Open Connection", it still comes back with "Connection Closed" when I go to a ZSQL method - Using 'Connect on Demand' is not working either. - Clicking "Open Connection" gives me the following error: Connection string: DSN=lixbox_sybase; UID=sa; PWD=XXXXXXX Connection pool entry: 0 Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection rejected by data source', 7952) The odbc.ini definition for DSN "lixbox_sybase" is as follows: [lixbox_sybase] JetFix = No NoRowSetSizeLimit = No Description = Test connection to listbox Options = LIXBOX DSQUERY = SQLSERVER TDSHOST = lixbox TDSPORT = 5000 TDSVER = 5.0 SQLSERVER_CATALOG = N CURSOR_SENSITIVITY = LOW UserName = sa Password = XXXXXXXX ServerType = Sybase 10/11/12 Driver = /opt/openlink/lib/sql_mt_lt.so Database = pubs2 ReadOnly = no NoAutoCommit = No NoLoginBox = No FetchBufferSize = 60 Other relevant data: - Connecting via OpenLink's iODBC - Zope 2.7.6-final - Python 2.3.4 - Connection to Sybase has been successfully tested with iODBC, including issuing a query - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC connection RJ Juneau Chief Technology Officer Maxxian Integration Inc. 155 Westhampton Drive Thornhill, Ontario Canada L4J 7X2 E-mail: rj@maxxian.com Phone: +1 905 482 9429 Cell: +1 416 897 6682 Toll free: +1 866 758 9161 Fax: +1 647 722 2038 -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050506/aef33361/attachment-0065.htm From mal at egenix.com Fri May 6 18:27:37 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 29 08:07:53 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC In-Reply-To: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> References: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Message-ID: <427B8CE9.1010601@egenix.com> RJ Juneau wrote: > Still on eval for the product. > > I cannot get a stable connection to Sybase via the iODBC drivers. > > - The Sybase ODBC connection - including a query - have been verified at > the iODBC level. > - The setup is already working well for ODBC connection to MySQL. > > Symptoms include: > > - If I click on "Open Connection", it still comes back with "Connection > Closed" when I go to a ZSQL method > - Using 'Connect on Demand' is not working either. > - Clicking "Open Connection" gives me the following error: > > Connection string: DSN=lixbox_sybase; > UID=sa; > PWD=XXXXXXX Try writing the connection string on one line and without whitespace. ODBC drivers sometimes have problems with this. > Connection pool entry: 0 > Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection > rejected by data source', 7952) This is a generic error that relates to authentication or firewall problems. It is possible that turning on ODBC tracing the ODBC manager will give more clues as to the real cause of the problem. > The odbc.ini definition for DSN "lixbox_sybase" is as follows: > > [lixbox_sybase] > JetFix = No > NoRowSetSizeLimit = No > Description = Test connection to listbox > Options = LIXBOX > DSQUERY = SQLSERVER > TDSHOST = lixbox > TDSPORT = 5000 > TDSVER = 5.0 > SQLSERVER_CATALOG = N > CURSOR_SENSITIVITY = LOW > UserName = sa > Password = XXXXXXXX > ServerType = Sybase 10/11/12 > Driver = /opt/openlink/lib/sql_mt_lt.so > Database = pubs2 > ReadOnly = no > NoAutoCommit = No > NoLoginBox = No > FetchBufferSize = 60 > > > Other relevant data: > - Connecting via OpenLink's iODBC > - Zope 2.7.6-final > - Python 2.3.4 > - Connection to Sybase has been successfully tested with iODBC, > including issuing a query > - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC > connection > > > > RJ Juneau > Chief Technology Officer > Maxxian Integration Inc. > 155 Westhampton Drive > Thornhill, Ontario > Canada L4J 7X2 > E-mail: rj@maxxian.com > Phone: +1 905 482 9429 > Cell: +1 416 897 6682 > Toll free: +1 866 758 9161 > Fax: +1 647 722 2038 > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 06 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From calisp at gmail.com Sun May 15 23:49:03 2005 From: calisp at gmail.com (calisp@gmail.com) Date: Sun Jan 29 08:07:53 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK Message-ID: Hi, I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the following error... 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the last phase of a two-phase commit. This shouldn't happen. Traceback (most recent call last): File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one jar.tpc_finish(self) File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish try: self._finish() File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could not perform COMMIT or ROLLBACK', 1023) What could be causing this? Can I get the mxODBCZopeDA source from somewhere? It would make debugging this much easier. Thanks, Calisp. From mal at egenix.com Mon May 16 13:52:12 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 29 08:07:53 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK In-Reply-To: References: Message-ID: <42887B5C.4010109@egenix.com> calisp@gmail.com wrote: > Hi, > > I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with > unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the > following error... > > 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the > last phase of a two-phase commit. This shouldn't happen. > Traceback (most recent call last): > File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one > jar.tpc_finish(self) > File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish > try: self._finish() > File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish > File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler > ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could > not perform COMMIT or ROLLBACK', 1023) You should have a look at the database logs to see what prevented the commit from being completed. > What could be causing this? Hard to say: mxODBCZopeDA is trying to commit the transaction, but the driver or database failed to complete the request. The above error was generated by the ODBC driver. This could be network or DNS problems, or be related to a bug in FreeTDS (which is getting more stable with every new release, but should still be considered beta quality software at the moment). > Can I get the mxODBCZopeDA source from > somewhere? It would make debugging this much easier. Getting the source is not an option and won't help much either since the source of the problem is not mxODBCZopeDA. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 16 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Sun May 1 21:29:25 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 29 12:01:15 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <427259F3.4090806@egenix.com> References: <20050427130906.52878.qmail@web30008.mail.mud.yahoo.com> <427259F3.4090806@egenix.com> Message-ID: <42752005.7080904@egenix.com> M.-A. Lemburg wrote: > David Rushby wrote: > >> --- "M.-A. Lemburg" wrote: >> >>> Are you using the standard mxDateTime build or one >>> with WANT_SUBCLASSABLE_TYPES defined... >> >> >> >> Presumably "the standard", since I just built with 'py24d setup.py >> build', making no attempt to enable special directives. >> >> >>> ... (mxDateTime_Deallocate is only used by the latter)? >> >> >> >> That's true in 2.1.0-2005-04-15, but not in 2.1.0b5. >> >> >>> In any case, please try our latest snapshot: >>> >>> >> >> http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-04-15.zip >> >>> to see if that makes any difference. >> >> >> >> I can't build it out of the box: > > > Hmm, looks like distutils' sdist command doesn't like our new > repository layout which uses symlinks (after we've switched to > subversion). > > We'll have to debug distutils first, I guess :-( Ok, we've found the problem and fixed it. Here's the new release (which does build out of the box at least on our boxes ;-): http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 01 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From davidrushby at yahoo.com Mon May 2 15:49:53 2005 From: davidrushby at yahoo.com (David Rushby) Date: Sun Jan 29 12:01:15 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Ok, we've found the problem and fixed it. Here's the new > release (which does build out of the box at least on our > boxes ;-): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip It does build now, but: py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" still behaves as it did when I submitted my original message: Fatal Python error: UNREF invalid object Aborted This is the same debug build of Python 2.4.1 that I was previously using, running the same configuration (CentOS Linux 4.0/i386, everything compiled with GCC 3.4.3). Have you examined my original claim as to the cause of the bug? __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 10:21:55 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 29 12:01:15 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> References: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> Message-ID: <42772693.8050306@egenix.com> David Rushby wrote: > --- "M.-A. Lemburg" wrote: > >>Ok, we've found the problem and fixed it. Here's the new >>release (which does build out of the box at least on our >>boxes ;-): >> >> > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip > > It does build now, but: > py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" > still behaves as it did when I submitted my original message: > Fatal Python error: UNREF invalid object > Aborted > > This is the same debug build of Python 2.4.1 that I was previously > using, running the same configuration (CentOS Linux 4.0/i386, > everything compiled with GCC 3.4.3). > > Have you examined my original claim as to the cause of the bug? No. We haven't had time for looking into it. I'm not sure whether your analysis of the problem is correct: if you don't define WANT_SUBCLASSABLE_TYPES, the API mxDateTime_Deallocate() is neither defined nor used. Furthermore, PyObject_Del() is only called by mxDateTime_Free() if you have explicitely edited mxDateTime.c to disabled the free list #defines. In a standard build, PyObject_Del() is only called at module finalization time. Note that the reason we call mxDateTime_Free() in the constructor is that we don't want the destructor of the object to be called. Py_DECREF() would call the destructor (mxDateTime_Deallocate). It is possible that the debug code in Python complains about the refcount in the object not being 0 at the time the object is finalized (module finalization time), but I don't see any such checks in PyObject_Free() (which is what PyObject_Del() maps to). Again, all of this does not happen in regular non-debug Python builds. Please be aware that we don't support debug builds, so fixing the problem (if there is one - gcc has some serious optimization problems on some combinations of platform and version) will take a while. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 09:27:37 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Sun Jan 29 12:01:15 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 Message-ID: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Hi all- I am trying to build the mx-base package, v.2.0.6. This will be used with postgresql 7.3.9, psycopg 1.1.18, and Roundup 0.8.2. RHEL 3.0 Python 2.3 egenix-mx-base-2.0.6.tar.gz I performed a: /usr/local/bin/python2.3 setup.py install Everything looks proper with the exeception of this series of warning statements: ----------------- gcc -pthread -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fno-strict-aliasing -fPIC -Imx/BeeBase/mxBeeBase -I/usr/local/incl ude/python2.3 -I/usr/local/include -c mx/BeeBase/mxBeeBase/btr.c -o build/temp.linux-i686-2.3/mx/BeeBase/mxBeeBase/mxBeeBa se/mx/BeeBase/mxBeeBase/btr.o mx/BeeBase/mxBeeBase/btr.c: In function `dumpBuf': mx/BeeBase/mxBeeBase/btr.c:249: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:250: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:255: warning: unsigned int format, long unsigned int arg (arg 4) mx/BeeBase/mxBeeBase/btr.c:256: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c: In function `_validateTree': mx/BeeBase/mxBeeBase/btr.c:330: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:337: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:339: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:349: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:351: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 3) creating build/lib.linux-i686-2.3/mx/BeeBase creating build/lib.linux-i686-2.3/mx/BeeBase/mxBeeBase -------------- Would someone be kind enough to let me know whether these messages were expected, and if not, how I might resolve these? Thanks! DC __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 22:06:33 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 29 12:01:15 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> References: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Message-ID: <4277CBB9.8020302@egenix.com> Dianne Chen wrote: > Hi all- > > I am trying to build the mx-base package, v.2.0.6. > This will be used with postgresql 7.3.9, psycopg > 1.1.18, and Roundup 0.8.2. > > RHEL 3.0 > Python 2.3 > egenix-mx-base-2.0.6.tar.gz > > I performed a: > > /usr/local/bin/python2.3 setup.py install > > Everything looks proper with the exeception of this > series of warning statements: > > ----------------- > ... > -------------- > > Would someone be kind enough to let me know whether > these messages were expected, and if not, how I might > resolve these? These warning can safely be ignored. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 13:41:14 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Sun Jan 29 12:01:15 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: 6667 Message-ID: <20050503194114.72091.qmail@web31414.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Dianne Chen wrote: > > Hi all- > > > > I am trying to build the mx-base package, v.2.0.6. > > This will be used with postgresql 7.3.9, psycopg > > 1.1.18, and Roundup 0.8.2. > > > > RHEL 3.0 > > Python 2.3 > > egenix-mx-base-2.0.6.tar.gz > > > > I performed a: > > > > /usr/local/bin/python2.3 setup.py install > > > > Everything looks proper with the exeception of > this > > series of warning statements: > > > > ----------------- > > ... > > -------------- > > > > Would someone be kind enough to let me know > whether > > these messages were expected, and if not, how I > might > > resolve these? > > These warning can safely be ignored. > > -- > Marc-Andre Lemburg > eGenix.com > Marc- Thank you very much for the reply. It helps greatly. With kind regards, DC __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From davidrushby at yahoo.com Tue May 3 17:18:46 2005 From: davidrushby at yahoo.com (David Rushby) Date: Sun Jan 29 12:01:15 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050503231846.35012.qmail@web30009.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > I'm not sure whether your analysis of the problem is correct... Indeed, my original analysis wasn't correct; I think this one is. The fatal error I'm complaining about only arises if the arguments to DateTime.DateTime are invalid, so that the object is deallocated in the onError block of mxDateTime_FromDateAndTime. If the object is created successfully, and later deallocated by Python's garbage collector, the fatal error doesn't arise. Here's my analysis of the problem: --- If the debugging directive Py_TRACE_REFS is enabled, as it is in my case, the Python interpreter maintains a doubly linked list of all Python objects (named refchain) via the _ob_next and _ob_prev pointers added to PyObject via _PyObject_HEAD_EXTRA. Each object is inserted into refchain by the _Py_AddToAllObjects call in _Py_NewReference, and removed from refchain by the _Py_ForgetReference call in _Py_Dealloc. _Py_ForgetReference performs an integrity check on the object being deallocated (op) to make sure that its neighbors in refchain recognize it. Specifically, _Py_ForgetReference verifies that the _ob_next pointer of the previous object in refchain (op->_ob_prev->_ob_next) points to op, and that the _ob_prev pointer of the next object in refchain (op->_ob_next->_ob_prev) points to op. If either of those conditions is false, the interpreter raises the fatal error I'm seeing. After mxDateTime_New pulls an mxDateTimeObject out of the free list, it calls _Py_NewReference on that object to transform it from a "conceptually deallocated" object to a "conceptually allocated" one. _Py_NewReference inserts the object into refchain. Later, when the object is being "conceptually deallocated", it should be removed from refchain with _Py_ForgetReference. The version of _Py_Dealloc that's active when Py_TRACE_REFS is enabled does this (_Py_Dealloc is the element of Py_DECREF that performs the actual destruction). _Py_Dealloc first calls _Py_ForgetReference to remove the object from refchain, then calls the object's destructor (op->ob_type->tp_dealloc). If WANT_SUBCLASSABLE_TYPES is not defined (it is not in my case), the destructor for mxDateTime_Type is mxDateTime_Free. So, if a DateTime object is deallocated normally, as a result of its reference count falling to zero, _Py_Dealloc is called on the object, which first removes it from refchain, then passes it to mxDateTime_Free. If a DateTime object is destroyed prematurely, as a result of invalid arguments to its destructor, the onError handler calls mxDateTime_Free, so the object is "conceptually deallocated" (placed in the free list), *but* the object is not removed from refchain. So if a refchain-membership-integrity-check is performed on the object in question or one of its immediate neighbors in refchain, that integrity check fails, leading to the fatal error. --- The solution is to 'Py_DECREF(...)' the object in the onError handler of its constructor, instead of passing the object directly to mxDateTime_Free. That change solves two problems: 1) It causes _Py_Dealloc to execute, which in turn executes _Py_ForgetReference, so the object is removed from refchain, as it should be. 2) At present, objects that are created successfully and later deallocated by normal reference count mechanics have a reference count of 0 when they enter the free list, whereas objects whose constructors abort their creation due to invalid arguments have a reference count of 1 when they enter the free list. Although AFAIK this doesn't cause an actual execution problem (because the object's reference count is *explicitly set to 1* rather than *incremented by 1* when the object is later "conceptually allocated" by _Py_NewReference), it is likely to confuse future maintainers and thereby lead to the introduction of an actual execution problem. I assume that if you agree that this is a reasonable solution, you'll want to apply the change not only to mxDateTime_FromDateAndTime, but to all similar constructors in mxDateTime.c. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From rj at maxxian.com Thu May 5 01:57:40 2005 From: rj at maxxian.com (RJ Juneau) Date: Sun Jan 29 12:01:15 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c5512e$f72798c0$6505a8c0@rjlaptop> I'm on the 30 day evaluation for mxodbc_zope_da. I'm getting the following error when I submit some queries: Error Type: KeyError Error Value: 'query' I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 with UCS4. The error seems to be caused by multiple rows being returned. I did see an earlier posting with the same error message. The response suggested a template error, but this is clearly not the case here. The additional evidence I've gathered so far: - I'm running the test directly from the ZSQL method, so there's no template involved. - If I use the same query with an additional "where" clause to ensure that only one row is returned, it works - If I use a value in the 'where' clause with no rows returned, it works - The same ZSQL query is being used on a Windows machine running Zope and the free ZODBC module without a problem - The query has been verified directly in mysql-client-browser Other info: - The database is MySQL 4.1.10A-0 - iODBC is the DB driver RJ Juneau -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050505/68d278bf/attachment-0066.htm From mal at egenix.com Thu May 5 12:37:43 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 29 12:01:15 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c5512e$f72798c0$6505a8c0@rjlaptop> References: <000301c5512e$f72798c0$6505a8c0@rjlaptop> Message-ID: <4279E967.6010904@egenix.com> RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 > with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 09:37:42 2005 From: rj at maxxian.com (RJ Juneau) Date: Sun Jan 29 12:01:16 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000101c5516f$3b96de90$6505a8c0@rjlaptop> More interesting info on the problem: If I execute the query directly in the "test" window of the base eGenix mxODBC Database Connection window, it works fine and returns the 20 lines expected. That could point to a problem in the rendering, which seems to be where the traceback ends. Note that within the same Zope system I also have an ODBC connection to a Sybase database, and I have successfully tested multi-line ZSQL queries there. This is the traceback: Time 2005/05/05 07:55:15.294 GMT-4 Exception Type KeyError Exception Value 'query' Traceback (innermost last): Module ZPublisher.Publish, line 101, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 39, in call_object Module Shared.DC.ZRDB.DA, line 337, in manage_test Module DocumentTemplate.DT_String, line 474, in __call__ Module DocumentTemplate.DT_In, line 602, in renderwb Module DocumentTemplate.DT_Var, line 219, in render KeyError: 'query' I don't think the following is an issue, but I'll include it for completeness.I am also getting the following iODBC warnings and errors in the Zope console log, which are related to the ODBC parameters being passed by iODBC. Note that these errors also appear for all of the successful queries. [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (Setup). [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (UsageCount). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Timeout). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Reuse). As for the ZSQL snippet from the template... Since there's no template involved yet (I'm still testing directly from the ZSQL method), I assume you mean the SQL code? select h.host_name, s.system_name, s.system_handle, count(*) from terminal t, system_map s, host h where t.system_index = s.system_index and s.host_index = h.host_index group by s.system_name order by h.host_name Nothing complicated here. There are no parameters passed to the query. RJ -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: May 5, 2005 5:38 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: Re: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is > 2.3.4 with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ---------------------------------------------------------------------- > -- > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 16:00:32 2005 From: charlie at egenix.com (Charlie Clark) Date: Sun Jan 29 12:01:16 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000101c5516f$3b96de90$6505a8c0@rjlaptop> References: <000101c5516f$3b96de90$6505a8c0@rjlaptop> Message-ID: <20050505150032.644.1@bepc.1115296715.fake> On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base eGenix > mxODBC Database Connection window, it works fine and returns the 20 > lines expected. That could point to a problem in the rendering, which > seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection to > a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 10:22:17 2005 From: rj at maxxian.com (RJ Juneau) Date: Sun Jan 29 12:01:16 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505150032.644.1@bepc.1115296715.fake> Message-ID: <000201c55175$75bcad10$6505a8c0@rjlaptop> At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 11:47:14 2005 From: rj at maxxian.com (RJ Juneau) Date: Sun Jan 29 12:01:16 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c55181$549be0e0$6505a8c0@rjlaptop> Charlie, I found a fix. Here it is in case anyone else runs into this. You were correct - the problem is in another part of Zope. Based on your feedback, I did a bit more searching and found something here: http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. html The problem appears to be in Zope versions after 2.7.0. I'm running 2.7.6, and the post indicates that it also happens in 2.7.4. The solution: Edit file /lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. There are two lines in the file that start with . Edit them as follows: Change first line to: Change second line to: Just to be after, I shut down Zope before I made the changes and restarted it after. Thanks for the help! RJ -----Original Message----- From: RJ Juneau [mailto:rj@maxxian.com] Sent: May 5, 2005 9:22 AM To: 'Charlie Clark' Cc: 'egenix-users@lists.egenix.com' Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 17:57:25 2005 From: charlie at egenix.com (Charlie Clark) Date: Sun Jan 29 12:01:16 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <20050505165725.3380.2@bepc.1115296715.fake> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Thu May 5 09:15:21 2005 From: charlie at egenix.com (Charlie Clark) Date: Sun Jan 29 12:01:16 2006 Subject: [Zope-DB] RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <000001c55185$41477730$6b00a8c0@fonacier.local> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________ Zope-DB mailing list Zope-DB@zope.org http://mail.zope.org/mailman/listinfo/zope-db From rj at maxxian.com Thu May 5 12:38:00 2005 From: rj at maxxian.com (RJ Juneau) Date: Sun Jan 29 12:01:16 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000001c55188$6b841eb0$6505a8c0@rjlaptop> I just double-checked. Zope-2.7.6-final. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 12:49:16 2005 From: rj at maxxian.com (RJ Juneau) Date: Sun Jan 29 12:01:16 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000501c55189$fe149ba0$6505a8c0@rjlaptop> Charlie, The fix has only been applied for 2.7.7, 2.8b2. The info is in the original bug report which is closed and can be found here: http://www.zope.org/Collectors/Zope/1745 RJ -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Fri May 6 11:50:09 2005 From: rj at maxxian.com (RJ Juneau) Date: Sun Jan 29 12:01:16 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC Message-ID: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Still on eval for the product. I cannot get a stable connection to Sybase via the iODBC drivers. - The Sybase ODBC connection - including a query - have been verified at the iODBC level. - The setup is already working well for ODBC connection to MySQL. Symptoms include: - If I click on "Open Connection", it still comes back with "Connection Closed" when I go to a ZSQL method - Using 'Connect on Demand' is not working either. - Clicking "Open Connection" gives me the following error: Connection string: DSN=lixbox_sybase; UID=sa; PWD=XXXXXXX Connection pool entry: 0 Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection rejected by data source', 7952) The odbc.ini definition for DSN "lixbox_sybase" is as follows: [lixbox_sybase] JetFix = No NoRowSetSizeLimit = No Description = Test connection to listbox Options = LIXBOX DSQUERY = SQLSERVER TDSHOST = lixbox TDSPORT = 5000 TDSVER = 5.0 SQLSERVER_CATALOG = N CURSOR_SENSITIVITY = LOW UserName = sa Password = XXXXXXXX ServerType = Sybase 10/11/12 Driver = /opt/openlink/lib/sql_mt_lt.so Database = pubs2 ReadOnly = no NoAutoCommit = No NoLoginBox = No FetchBufferSize = 60 Other relevant data: - Connecting via OpenLink's iODBC - Zope 2.7.6-final - Python 2.3.4 - Connection to Sybase has been successfully tested with iODBC, including issuing a query - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC connection RJ Juneau Chief Technology Officer Maxxian Integration Inc. 155 Westhampton Drive Thornhill, Ontario Canada L4J 7X2 E-mail: rj@maxxian.com Phone: +1 905 482 9429 Cell: +1 416 897 6682 Toll free: +1 866 758 9161 Fax: +1 647 722 2038 -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050506/aef33361/attachment-0066.htm From mal at egenix.com Fri May 6 18:27:37 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 29 12:01:16 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC In-Reply-To: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> References: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Message-ID: <427B8CE9.1010601@egenix.com> RJ Juneau wrote: > Still on eval for the product. > > I cannot get a stable connection to Sybase via the iODBC drivers. > > - The Sybase ODBC connection - including a query - have been verified at > the iODBC level. > - The setup is already working well for ODBC connection to MySQL. > > Symptoms include: > > - If I click on "Open Connection", it still comes back with "Connection > Closed" when I go to a ZSQL method > - Using 'Connect on Demand' is not working either. > - Clicking "Open Connection" gives me the following error: > > Connection string: DSN=lixbox_sybase; > UID=sa; > PWD=XXXXXXX Try writing the connection string on one line and without whitespace. ODBC drivers sometimes have problems with this. > Connection pool entry: 0 > Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection > rejected by data source', 7952) This is a generic error that relates to authentication or firewall problems. It is possible that turning on ODBC tracing the ODBC manager will give more clues as to the real cause of the problem. > The odbc.ini definition for DSN "lixbox_sybase" is as follows: > > [lixbox_sybase] > JetFix = No > NoRowSetSizeLimit = No > Description = Test connection to listbox > Options = LIXBOX > DSQUERY = SQLSERVER > TDSHOST = lixbox > TDSPORT = 5000 > TDSVER = 5.0 > SQLSERVER_CATALOG = N > CURSOR_SENSITIVITY = LOW > UserName = sa > Password = XXXXXXXX > ServerType = Sybase 10/11/12 > Driver = /opt/openlink/lib/sql_mt_lt.so > Database = pubs2 > ReadOnly = no > NoAutoCommit = No > NoLoginBox = No > FetchBufferSize = 60 > > > Other relevant data: > - Connecting via OpenLink's iODBC > - Zope 2.7.6-final > - Python 2.3.4 > - Connection to Sybase has been successfully tested with iODBC, > including issuing a query > - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC > connection > > > > RJ Juneau > Chief Technology Officer > Maxxian Integration Inc. > 155 Westhampton Drive > Thornhill, Ontario > Canada L4J 7X2 > E-mail: rj@maxxian.com > Phone: +1 905 482 9429 > Cell: +1 416 897 6682 > Toll free: +1 866 758 9161 > Fax: +1 647 722 2038 > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 06 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From calisp at gmail.com Sun May 15 23:49:03 2005 From: calisp at gmail.com (calisp@gmail.com) Date: Sun Jan 29 12:01:16 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK Message-ID: Hi, I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the following error... 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the last phase of a two-phase commit. This shouldn't happen. Traceback (most recent call last): File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one jar.tpc_finish(self) File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish try: self._finish() File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could not perform COMMIT or ROLLBACK', 1023) What could be causing this? Can I get the mxODBCZopeDA source from somewhere? It would make debugging this much easier. Thanks, Calisp. From mal at egenix.com Mon May 16 13:52:12 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 29 12:01:16 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK In-Reply-To: References: Message-ID: <42887B5C.4010109@egenix.com> calisp@gmail.com wrote: > Hi, > > I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with > unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the > following error... > > 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the > last phase of a two-phase commit. This shouldn't happen. > Traceback (most recent call last): > File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one > jar.tpc_finish(self) > File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish > try: self._finish() > File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish > File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler > ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could > not perform COMMIT or ROLLBACK', 1023) You should have a look at the database logs to see what prevented the commit from being completed. > What could be causing this? Hard to say: mxODBCZopeDA is trying to commit the transaction, but the driver or database failed to complete the request. The above error was generated by the ODBC driver. This could be network or DNS problems, or be related to a bug in FreeTDS (which is getting more stable with every new release, but should still be considered beta quality software at the moment). > Can I get the mxODBCZopeDA source from > somewhere? It would make debugging this much easier. Getting the source is not an option and won't help much either since the source of the problem is not mxODBCZopeDA. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 16 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Sun May 1 21:29:25 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 29 16:01:03 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <427259F3.4090806@egenix.com> References: <20050427130906.52878.qmail@web30008.mail.mud.yahoo.com> <427259F3.4090806@egenix.com> Message-ID: <42752005.7080904@egenix.com> M.-A. Lemburg wrote: > David Rushby wrote: > >> --- "M.-A. Lemburg" wrote: >> >>> Are you using the standard mxDateTime build or one >>> with WANT_SUBCLASSABLE_TYPES defined... >> >> >> >> Presumably "the standard", since I just built with 'py24d setup.py >> build', making no attempt to enable special directives. >> >> >>> ... (mxDateTime_Deallocate is only used by the latter)? >> >> >> >> That's true in 2.1.0-2005-04-15, but not in 2.1.0b5. >> >> >>> In any case, please try our latest snapshot: >>> >>> >> >> http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-04-15.zip >> >>> to see if that makes any difference. >> >> >> >> I can't build it out of the box: > > > Hmm, looks like distutils' sdist command doesn't like our new > repository layout which uses symlinks (after we've switched to > subversion). > > We'll have to debug distutils first, I guess :-( Ok, we've found the problem and fixed it. Here's the new release (which does build out of the box at least on our boxes ;-): http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 01 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From davidrushby at yahoo.com Mon May 2 15:49:53 2005 From: davidrushby at yahoo.com (David Rushby) Date: Sun Jan 29 16:01:03 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Ok, we've found the problem and fixed it. Here's the new > release (which does build out of the box at least on our > boxes ;-): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip It does build now, but: py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" still behaves as it did when I submitted my original message: Fatal Python error: UNREF invalid object Aborted This is the same debug build of Python 2.4.1 that I was previously using, running the same configuration (CentOS Linux 4.0/i386, everything compiled with GCC 3.4.3). Have you examined my original claim as to the cause of the bug? __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 10:21:55 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 29 16:01:03 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> References: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> Message-ID: <42772693.8050306@egenix.com> David Rushby wrote: > --- "M.-A. Lemburg" wrote: > >>Ok, we've found the problem and fixed it. Here's the new >>release (which does build out of the box at least on our >>boxes ;-): >> >> > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip > > It does build now, but: > py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" > still behaves as it did when I submitted my original message: > Fatal Python error: UNREF invalid object > Aborted > > This is the same debug build of Python 2.4.1 that I was previously > using, running the same configuration (CentOS Linux 4.0/i386, > everything compiled with GCC 3.4.3). > > Have you examined my original claim as to the cause of the bug? No. We haven't had time for looking into it. I'm not sure whether your analysis of the problem is correct: if you don't define WANT_SUBCLASSABLE_TYPES, the API mxDateTime_Deallocate() is neither defined nor used. Furthermore, PyObject_Del() is only called by mxDateTime_Free() if you have explicitely edited mxDateTime.c to disabled the free list #defines. In a standard build, PyObject_Del() is only called at module finalization time. Note that the reason we call mxDateTime_Free() in the constructor is that we don't want the destructor of the object to be called. Py_DECREF() would call the destructor (mxDateTime_Deallocate). It is possible that the debug code in Python complains about the refcount in the object not being 0 at the time the object is finalized (module finalization time), but I don't see any such checks in PyObject_Free() (which is what PyObject_Del() maps to). Again, all of this does not happen in regular non-debug Python builds. Please be aware that we don't support debug builds, so fixing the problem (if there is one - gcc has some serious optimization problems on some combinations of platform and version) will take a while. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 09:27:37 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Sun Jan 29 16:01:03 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 Message-ID: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Hi all- I am trying to build the mx-base package, v.2.0.6. This will be used with postgresql 7.3.9, psycopg 1.1.18, and Roundup 0.8.2. RHEL 3.0 Python 2.3 egenix-mx-base-2.0.6.tar.gz I performed a: /usr/local/bin/python2.3 setup.py install Everything looks proper with the exeception of this series of warning statements: ----------------- gcc -pthread -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fno-strict-aliasing -fPIC -Imx/BeeBase/mxBeeBase -I/usr/local/incl ude/python2.3 -I/usr/local/include -c mx/BeeBase/mxBeeBase/btr.c -o build/temp.linux-i686-2.3/mx/BeeBase/mxBeeBase/mxBeeBa se/mx/BeeBase/mxBeeBase/btr.o mx/BeeBase/mxBeeBase/btr.c: In function `dumpBuf': mx/BeeBase/mxBeeBase/btr.c:249: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:250: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:255: warning: unsigned int format, long unsigned int arg (arg 4) mx/BeeBase/mxBeeBase/btr.c:256: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c: In function `_validateTree': mx/BeeBase/mxBeeBase/btr.c:330: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:337: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:339: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:349: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:351: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 3) creating build/lib.linux-i686-2.3/mx/BeeBase creating build/lib.linux-i686-2.3/mx/BeeBase/mxBeeBase -------------- Would someone be kind enough to let me know whether these messages were expected, and if not, how I might resolve these? Thanks! DC __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 22:06:33 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 29 16:01:03 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> References: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Message-ID: <4277CBB9.8020302@egenix.com> Dianne Chen wrote: > Hi all- > > I am trying to build the mx-base package, v.2.0.6. > This will be used with postgresql 7.3.9, psycopg > 1.1.18, and Roundup 0.8.2. > > RHEL 3.0 > Python 2.3 > egenix-mx-base-2.0.6.tar.gz > > I performed a: > > /usr/local/bin/python2.3 setup.py install > > Everything looks proper with the exeception of this > series of warning statements: > > ----------------- > ... > -------------- > > Would someone be kind enough to let me know whether > these messages were expected, and if not, how I might > resolve these? These warning can safely be ignored. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 13:41:14 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Sun Jan 29 16:01:03 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: 6667 Message-ID: <20050503194114.72091.qmail@web31414.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Dianne Chen wrote: > > Hi all- > > > > I am trying to build the mx-base package, v.2.0.6. > > This will be used with postgresql 7.3.9, psycopg > > 1.1.18, and Roundup 0.8.2. > > > > RHEL 3.0 > > Python 2.3 > > egenix-mx-base-2.0.6.tar.gz > > > > I performed a: > > > > /usr/local/bin/python2.3 setup.py install > > > > Everything looks proper with the exeception of > this > > series of warning statements: > > > > ----------------- > > ... > > -------------- > > > > Would someone be kind enough to let me know > whether > > these messages were expected, and if not, how I > might > > resolve these? > > These warning can safely be ignored. > > -- > Marc-Andre Lemburg > eGenix.com > Marc- Thank you very much for the reply. It helps greatly. With kind regards, DC __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From davidrushby at yahoo.com Tue May 3 17:18:46 2005 From: davidrushby at yahoo.com (David Rushby) Date: Sun Jan 29 16:01:03 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050503231846.35012.qmail@web30009.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > I'm not sure whether your analysis of the problem is correct... Indeed, my original analysis wasn't correct; I think this one is. The fatal error I'm complaining about only arises if the arguments to DateTime.DateTime are invalid, so that the object is deallocated in the onError block of mxDateTime_FromDateAndTime. If the object is created successfully, and later deallocated by Python's garbage collector, the fatal error doesn't arise. Here's my analysis of the problem: --- If the debugging directive Py_TRACE_REFS is enabled, as it is in my case, the Python interpreter maintains a doubly linked list of all Python objects (named refchain) via the _ob_next and _ob_prev pointers added to PyObject via _PyObject_HEAD_EXTRA. Each object is inserted into refchain by the _Py_AddToAllObjects call in _Py_NewReference, and removed from refchain by the _Py_ForgetReference call in _Py_Dealloc. _Py_ForgetReference performs an integrity check on the object being deallocated (op) to make sure that its neighbors in refchain recognize it. Specifically, _Py_ForgetReference verifies that the _ob_next pointer of the previous object in refchain (op->_ob_prev->_ob_next) points to op, and that the _ob_prev pointer of the next object in refchain (op->_ob_next->_ob_prev) points to op. If either of those conditions is false, the interpreter raises the fatal error I'm seeing. After mxDateTime_New pulls an mxDateTimeObject out of the free list, it calls _Py_NewReference on that object to transform it from a "conceptually deallocated" object to a "conceptually allocated" one. _Py_NewReference inserts the object into refchain. Later, when the object is being "conceptually deallocated", it should be removed from refchain with _Py_ForgetReference. The version of _Py_Dealloc that's active when Py_TRACE_REFS is enabled does this (_Py_Dealloc is the element of Py_DECREF that performs the actual destruction). _Py_Dealloc first calls _Py_ForgetReference to remove the object from refchain, then calls the object's destructor (op->ob_type->tp_dealloc). If WANT_SUBCLASSABLE_TYPES is not defined (it is not in my case), the destructor for mxDateTime_Type is mxDateTime_Free. So, if a DateTime object is deallocated normally, as a result of its reference count falling to zero, _Py_Dealloc is called on the object, which first removes it from refchain, then passes it to mxDateTime_Free. If a DateTime object is destroyed prematurely, as a result of invalid arguments to its destructor, the onError handler calls mxDateTime_Free, so the object is "conceptually deallocated" (placed in the free list), *but* the object is not removed from refchain. So if a refchain-membership-integrity-check is performed on the object in question or one of its immediate neighbors in refchain, that integrity check fails, leading to the fatal error. --- The solution is to 'Py_DECREF(...)' the object in the onError handler of its constructor, instead of passing the object directly to mxDateTime_Free. That change solves two problems: 1) It causes _Py_Dealloc to execute, which in turn executes _Py_ForgetReference, so the object is removed from refchain, as it should be. 2) At present, objects that are created successfully and later deallocated by normal reference count mechanics have a reference count of 0 when they enter the free list, whereas objects whose constructors abort their creation due to invalid arguments have a reference count of 1 when they enter the free list. Although AFAIK this doesn't cause an actual execution problem (because the object's reference count is *explicitly set to 1* rather than *incremented by 1* when the object is later "conceptually allocated" by _Py_NewReference), it is likely to confuse future maintainers and thereby lead to the introduction of an actual execution problem. I assume that if you agree that this is a reasonable solution, you'll want to apply the change not only to mxDateTime_FromDateAndTime, but to all similar constructors in mxDateTime.c. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From rj at maxxian.com Thu May 5 01:57:40 2005 From: rj at maxxian.com (RJ Juneau) Date: Sun Jan 29 16:01:03 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c5512e$f72798c0$6505a8c0@rjlaptop> I'm on the 30 day evaluation for mxodbc_zope_da. I'm getting the following error when I submit some queries: Error Type: KeyError Error Value: 'query' I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 with UCS4. The error seems to be caused by multiple rows being returned. I did see an earlier posting with the same error message. The response suggested a template error, but this is clearly not the case here. The additional evidence I've gathered so far: - I'm running the test directly from the ZSQL method, so there's no template involved. - If I use the same query with an additional "where" clause to ensure that only one row is returned, it works - If I use a value in the 'where' clause with no rows returned, it works - The same ZSQL query is being used on a Windows machine running Zope and the free ZODBC module without a problem - The query has been verified directly in mysql-client-browser Other info: - The database is MySQL 4.1.10A-0 - iODBC is the DB driver RJ Juneau -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050505/68d278bf/attachment-0067.htm From mal at egenix.com Thu May 5 12:37:43 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 29 16:01:03 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c5512e$f72798c0$6505a8c0@rjlaptop> References: <000301c5512e$f72798c0$6505a8c0@rjlaptop> Message-ID: <4279E967.6010904@egenix.com> RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 > with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 09:37:42 2005 From: rj at maxxian.com (RJ Juneau) Date: Sun Jan 29 16:01:03 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000101c5516f$3b96de90$6505a8c0@rjlaptop> More interesting info on the problem: If I execute the query directly in the "test" window of the base eGenix mxODBC Database Connection window, it works fine and returns the 20 lines expected. That could point to a problem in the rendering, which seems to be where the traceback ends. Note that within the same Zope system I also have an ODBC connection to a Sybase database, and I have successfully tested multi-line ZSQL queries there. This is the traceback: Time 2005/05/05 07:55:15.294 GMT-4 Exception Type KeyError Exception Value 'query' Traceback (innermost last): Module ZPublisher.Publish, line 101, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 39, in call_object Module Shared.DC.ZRDB.DA, line 337, in manage_test Module DocumentTemplate.DT_String, line 474, in __call__ Module DocumentTemplate.DT_In, line 602, in renderwb Module DocumentTemplate.DT_Var, line 219, in render KeyError: 'query' I don't think the following is an issue, but I'll include it for completeness.I am also getting the following iODBC warnings and errors in the Zope console log, which are related to the ODBC parameters being passed by iODBC. Note that these errors also appear for all of the successful queries. [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (Setup). [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (UsageCount). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Timeout). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Reuse). As for the ZSQL snippet from the template... Since there's no template involved yet (I'm still testing directly from the ZSQL method), I assume you mean the SQL code? select h.host_name, s.system_name, s.system_handle, count(*) from terminal t, system_map s, host h where t.system_index = s.system_index and s.host_index = h.host_index group by s.system_name order by h.host_name Nothing complicated here. There are no parameters passed to the query. RJ -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: May 5, 2005 5:38 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: Re: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is > 2.3.4 with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ---------------------------------------------------------------------- > -- > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 16:00:32 2005 From: charlie at egenix.com (Charlie Clark) Date: Sun Jan 29 16:01:03 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000101c5516f$3b96de90$6505a8c0@rjlaptop> References: <000101c5516f$3b96de90$6505a8c0@rjlaptop> Message-ID: <20050505150032.644.1@bepc.1115296715.fake> On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base eGenix > mxODBC Database Connection window, it works fine and returns the 20 > lines expected. That could point to a problem in the rendering, which > seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection to > a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 10:22:17 2005 From: rj at maxxian.com (RJ Juneau) Date: Sun Jan 29 16:01:03 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505150032.644.1@bepc.1115296715.fake> Message-ID: <000201c55175$75bcad10$6505a8c0@rjlaptop> At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 11:47:14 2005 From: rj at maxxian.com (RJ Juneau) Date: Sun Jan 29 16:01:03 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c55181$549be0e0$6505a8c0@rjlaptop> Charlie, I found a fix. Here it is in case anyone else runs into this. You were correct - the problem is in another part of Zope. Based on your feedback, I did a bit more searching and found something here: http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. html The problem appears to be in Zope versions after 2.7.0. I'm running 2.7.6, and the post indicates that it also happens in 2.7.4. The solution: Edit file /lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. There are two lines in the file that start with . Edit them as follows: Change first line to: Change second line to: Just to be after, I shut down Zope before I made the changes and restarted it after. Thanks for the help! RJ -----Original Message----- From: RJ Juneau [mailto:rj@maxxian.com] Sent: May 5, 2005 9:22 AM To: 'Charlie Clark' Cc: 'egenix-users@lists.egenix.com' Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 17:57:25 2005 From: charlie at egenix.com (Charlie Clark) Date: Sun Jan 29 16:01:03 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <20050505165725.3380.2@bepc.1115296715.fake> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Thu May 5 09:15:21 2005 From: charlie at egenix.com (Charlie Clark) Date: Sun Jan 29 16:01:03 2006 Subject: [Zope-DB] RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <000001c55185$41477730$6b00a8c0@fonacier.local> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________ Zope-DB mailing list Zope-DB@zope.org http://mail.zope.org/mailman/listinfo/zope-db From rj at maxxian.com Thu May 5 12:38:00 2005 From: rj at maxxian.com (RJ Juneau) Date: Sun Jan 29 16:01:03 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000001c55188$6b841eb0$6505a8c0@rjlaptop> I just double-checked. Zope-2.7.6-final. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 12:49:16 2005 From: rj at maxxian.com (RJ Juneau) Date: Sun Jan 29 16:01:03 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000501c55189$fe149ba0$6505a8c0@rjlaptop> Charlie, The fix has only been applied for 2.7.7, 2.8b2. The info is in the original bug report which is closed and can be found here: http://www.zope.org/Collectors/Zope/1745 RJ -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Fri May 6 11:50:09 2005 From: rj at maxxian.com (RJ Juneau) Date: Sun Jan 29 16:01:03 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC Message-ID: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Still on eval for the product. I cannot get a stable connection to Sybase via the iODBC drivers. - The Sybase ODBC connection - including a query - have been verified at the iODBC level. - The setup is already working well for ODBC connection to MySQL. Symptoms include: - If I click on "Open Connection", it still comes back with "Connection Closed" when I go to a ZSQL method - Using 'Connect on Demand' is not working either. - Clicking "Open Connection" gives me the following error: Connection string: DSN=lixbox_sybase; UID=sa; PWD=XXXXXXX Connection pool entry: 0 Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection rejected by data source', 7952) The odbc.ini definition for DSN "lixbox_sybase" is as follows: [lixbox_sybase] JetFix = No NoRowSetSizeLimit = No Description = Test connection to listbox Options = LIXBOX DSQUERY = SQLSERVER TDSHOST = lixbox TDSPORT = 5000 TDSVER = 5.0 SQLSERVER_CATALOG = N CURSOR_SENSITIVITY = LOW UserName = sa Password = XXXXXXXX ServerType = Sybase 10/11/12 Driver = /opt/openlink/lib/sql_mt_lt.so Database = pubs2 ReadOnly = no NoAutoCommit = No NoLoginBox = No FetchBufferSize = 60 Other relevant data: - Connecting via OpenLink's iODBC - Zope 2.7.6-final - Python 2.3.4 - Connection to Sybase has been successfully tested with iODBC, including issuing a query - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC connection RJ Juneau Chief Technology Officer Maxxian Integration Inc. 155 Westhampton Drive Thornhill, Ontario Canada L4J 7X2 E-mail: rj@maxxian.com Phone: +1 905 482 9429 Cell: +1 416 897 6682 Toll free: +1 866 758 9161 Fax: +1 647 722 2038 -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050506/aef33361/attachment-0067.htm From mal at egenix.com Fri May 6 18:27:37 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 29 16:01:03 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC In-Reply-To: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> References: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Message-ID: <427B8CE9.1010601@egenix.com> RJ Juneau wrote: > Still on eval for the product. > > I cannot get a stable connection to Sybase via the iODBC drivers. > > - The Sybase ODBC connection - including a query - have been verified at > the iODBC level. > - The setup is already working well for ODBC connection to MySQL. > > Symptoms include: > > - If I click on "Open Connection", it still comes back with "Connection > Closed" when I go to a ZSQL method > - Using 'Connect on Demand' is not working either. > - Clicking "Open Connection" gives me the following error: > > Connection string: DSN=lixbox_sybase; > UID=sa; > PWD=XXXXXXX Try writing the connection string on one line and without whitespace. ODBC drivers sometimes have problems with this. > Connection pool entry: 0 > Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection > rejected by data source', 7952) This is a generic error that relates to authentication or firewall problems. It is possible that turning on ODBC tracing the ODBC manager will give more clues as to the real cause of the problem. > The odbc.ini definition for DSN "lixbox_sybase" is as follows: > > [lixbox_sybase] > JetFix = No > NoRowSetSizeLimit = No > Description = Test connection to listbox > Options = LIXBOX > DSQUERY = SQLSERVER > TDSHOST = lixbox > TDSPORT = 5000 > TDSVER = 5.0 > SQLSERVER_CATALOG = N > CURSOR_SENSITIVITY = LOW > UserName = sa > Password = XXXXXXXX > ServerType = Sybase 10/11/12 > Driver = /opt/openlink/lib/sql_mt_lt.so > Database = pubs2 > ReadOnly = no > NoAutoCommit = No > NoLoginBox = No > FetchBufferSize = 60 > > > Other relevant data: > - Connecting via OpenLink's iODBC > - Zope 2.7.6-final > - Python 2.3.4 > - Connection to Sybase has been successfully tested with iODBC, > including issuing a query > - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC > connection > > > > RJ Juneau > Chief Technology Officer > Maxxian Integration Inc. > 155 Westhampton Drive > Thornhill, Ontario > Canada L4J 7X2 > E-mail: rj@maxxian.com > Phone: +1 905 482 9429 > Cell: +1 416 897 6682 > Toll free: +1 866 758 9161 > Fax: +1 647 722 2038 > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 06 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From calisp at gmail.com Sun May 15 23:49:03 2005 From: calisp at gmail.com (calisp@gmail.com) Date: Sun Jan 29 16:01:03 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK Message-ID: Hi, I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the following error... 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the last phase of a two-phase commit. This shouldn't happen. Traceback (most recent call last): File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one jar.tpc_finish(self) File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish try: self._finish() File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could not perform COMMIT or ROLLBACK', 1023) What could be causing this? Can I get the mxODBCZopeDA source from somewhere? It would make debugging this much easier. Thanks, Calisp. From mal at egenix.com Mon May 16 13:52:12 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 29 16:01:05 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK In-Reply-To: References: Message-ID: <42887B5C.4010109@egenix.com> calisp@gmail.com wrote: > Hi, > > I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with > unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the > following error... > > 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the > last phase of a two-phase commit. This shouldn't happen. > Traceback (most recent call last): > File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one > jar.tpc_finish(self) > File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish > try: self._finish() > File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish > File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler > ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could > not perform COMMIT or ROLLBACK', 1023) You should have a look at the database logs to see what prevented the commit from being completed. > What could be causing this? Hard to say: mxODBCZopeDA is trying to commit the transaction, but the driver or database failed to complete the request. The above error was generated by the ODBC driver. This could be network or DNS problems, or be related to a bug in FreeTDS (which is getting more stable with every new release, but should still be considered beta quality software at the moment). > Can I get the mxODBCZopeDA source from > somewhere? It would make debugging this much easier. Getting the source is not an option and won't help much either since the source of the problem is not mxODBCZopeDA. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 16 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Sun May 1 21:29:25 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 29 20:01:07 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <427259F3.4090806@egenix.com> References: <20050427130906.52878.qmail@web30008.mail.mud.yahoo.com> <427259F3.4090806@egenix.com> Message-ID: <42752005.7080904@egenix.com> M.-A. Lemburg wrote: > David Rushby wrote: > >> --- "M.-A. Lemburg" wrote: >> >>> Are you using the standard mxDateTime build or one >>> with WANT_SUBCLASSABLE_TYPES defined... >> >> >> >> Presumably "the standard", since I just built with 'py24d setup.py >> build', making no attempt to enable special directives. >> >> >>> ... (mxDateTime_Deallocate is only used by the latter)? >> >> >> >> That's true in 2.1.0-2005-04-15, but not in 2.1.0b5. >> >> >>> In any case, please try our latest snapshot: >>> >>> >> >> http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-04-15.zip >> >>> to see if that makes any difference. >> >> >> >> I can't build it out of the box: > > > Hmm, looks like distutils' sdist command doesn't like our new > repository layout which uses symlinks (after we've switched to > subversion). > > We'll have to debug distutils first, I guess :-( Ok, we've found the problem and fixed it. Here's the new release (which does build out of the box at least on our boxes ;-): http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 01 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From davidrushby at yahoo.com Mon May 2 15:49:53 2005 From: davidrushby at yahoo.com (David Rushby) Date: Sun Jan 29 20:01:07 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Ok, we've found the problem and fixed it. Here's the new > release (which does build out of the box at least on our > boxes ;-): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip It does build now, but: py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" still behaves as it did when I submitted my original message: Fatal Python error: UNREF invalid object Aborted This is the same debug build of Python 2.4.1 that I was previously using, running the same configuration (CentOS Linux 4.0/i386, everything compiled with GCC 3.4.3). Have you examined my original claim as to the cause of the bug? __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 10:21:55 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 29 20:01:07 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> References: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> Message-ID: <42772693.8050306@egenix.com> David Rushby wrote: > --- "M.-A. Lemburg" wrote: > >>Ok, we've found the problem and fixed it. Here's the new >>release (which does build out of the box at least on our >>boxes ;-): >> >> > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip > > It does build now, but: > py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" > still behaves as it did when I submitted my original message: > Fatal Python error: UNREF invalid object > Aborted > > This is the same debug build of Python 2.4.1 that I was previously > using, running the same configuration (CentOS Linux 4.0/i386, > everything compiled with GCC 3.4.3). > > Have you examined my original claim as to the cause of the bug? No. We haven't had time for looking into it. I'm not sure whether your analysis of the problem is correct: if you don't define WANT_SUBCLASSABLE_TYPES, the API mxDateTime_Deallocate() is neither defined nor used. Furthermore, PyObject_Del() is only called by mxDateTime_Free() if you have explicitely edited mxDateTime.c to disabled the free list #defines. In a standard build, PyObject_Del() is only called at module finalization time. Note that the reason we call mxDateTime_Free() in the constructor is that we don't want the destructor of the object to be called. Py_DECREF() would call the destructor (mxDateTime_Deallocate). It is possible that the debug code in Python complains about the refcount in the object not being 0 at the time the object is finalized (module finalization time), but I don't see any such checks in PyObject_Free() (which is what PyObject_Del() maps to). Again, all of this does not happen in regular non-debug Python builds. Please be aware that we don't support debug builds, so fixing the problem (if there is one - gcc has some serious optimization problems on some combinations of platform and version) will take a while. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 09:27:37 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Sun Jan 29 20:01:07 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 Message-ID: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Hi all- I am trying to build the mx-base package, v.2.0.6. This will be used with postgresql 7.3.9, psycopg 1.1.18, and Roundup 0.8.2. RHEL 3.0 Python 2.3 egenix-mx-base-2.0.6.tar.gz I performed a: /usr/local/bin/python2.3 setup.py install Everything looks proper with the exeception of this series of warning statements: ----------------- gcc -pthread -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fno-strict-aliasing -fPIC -Imx/BeeBase/mxBeeBase -I/usr/local/incl ude/python2.3 -I/usr/local/include -c mx/BeeBase/mxBeeBase/btr.c -o build/temp.linux-i686-2.3/mx/BeeBase/mxBeeBase/mxBeeBa se/mx/BeeBase/mxBeeBase/btr.o mx/BeeBase/mxBeeBase/btr.c: In function `dumpBuf': mx/BeeBase/mxBeeBase/btr.c:249: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:250: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:255: warning: unsigned int format, long unsigned int arg (arg 4) mx/BeeBase/mxBeeBase/btr.c:256: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c: In function `_validateTree': mx/BeeBase/mxBeeBase/btr.c:330: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:337: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:339: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:349: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:351: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 3) creating build/lib.linux-i686-2.3/mx/BeeBase creating build/lib.linux-i686-2.3/mx/BeeBase/mxBeeBase -------------- Would someone be kind enough to let me know whether these messages were expected, and if not, how I might resolve these? Thanks! DC __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 22:06:33 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 29 20:01:07 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> References: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Message-ID: <4277CBB9.8020302@egenix.com> Dianne Chen wrote: > Hi all- > > I am trying to build the mx-base package, v.2.0.6. > This will be used with postgresql 7.3.9, psycopg > 1.1.18, and Roundup 0.8.2. > > RHEL 3.0 > Python 2.3 > egenix-mx-base-2.0.6.tar.gz > > I performed a: > > /usr/local/bin/python2.3 setup.py install > > Everything looks proper with the exeception of this > series of warning statements: > > ----------------- > ... > -------------- > > Would someone be kind enough to let me know whether > these messages were expected, and if not, how I might > resolve these? These warning can safely be ignored. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 13:41:14 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Sun Jan 29 20:01:07 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: 6667 Message-ID: <20050503194114.72091.qmail@web31414.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Dianne Chen wrote: > > Hi all- > > > > I am trying to build the mx-base package, v.2.0.6. > > This will be used with postgresql 7.3.9, psycopg > > 1.1.18, and Roundup 0.8.2. > > > > RHEL 3.0 > > Python 2.3 > > egenix-mx-base-2.0.6.tar.gz > > > > I performed a: > > > > /usr/local/bin/python2.3 setup.py install > > > > Everything looks proper with the exeception of > this > > series of warning statements: > > > > ----------------- > > ... > > -------------- > > > > Would someone be kind enough to let me know > whether > > these messages were expected, and if not, how I > might > > resolve these? > > These warning can safely be ignored. > > -- > Marc-Andre Lemburg > eGenix.com > Marc- Thank you very much for the reply. It helps greatly. With kind regards, DC __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From davidrushby at yahoo.com Tue May 3 17:18:46 2005 From: davidrushby at yahoo.com (David Rushby) Date: Sun Jan 29 20:01:07 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050503231846.35012.qmail@web30009.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > I'm not sure whether your analysis of the problem is correct... Indeed, my original analysis wasn't correct; I think this one is. The fatal error I'm complaining about only arises if the arguments to DateTime.DateTime are invalid, so that the object is deallocated in the onError block of mxDateTime_FromDateAndTime. If the object is created successfully, and later deallocated by Python's garbage collector, the fatal error doesn't arise. Here's my analysis of the problem: --- If the debugging directive Py_TRACE_REFS is enabled, as it is in my case, the Python interpreter maintains a doubly linked list of all Python objects (named refchain) via the _ob_next and _ob_prev pointers added to PyObject via _PyObject_HEAD_EXTRA. Each object is inserted into refchain by the _Py_AddToAllObjects call in _Py_NewReference, and removed from refchain by the _Py_ForgetReference call in _Py_Dealloc. _Py_ForgetReference performs an integrity check on the object being deallocated (op) to make sure that its neighbors in refchain recognize it. Specifically, _Py_ForgetReference verifies that the _ob_next pointer of the previous object in refchain (op->_ob_prev->_ob_next) points to op, and that the _ob_prev pointer of the next object in refchain (op->_ob_next->_ob_prev) points to op. If either of those conditions is false, the interpreter raises the fatal error I'm seeing. After mxDateTime_New pulls an mxDateTimeObject out of the free list, it calls _Py_NewReference on that object to transform it from a "conceptually deallocated" object to a "conceptually allocated" one. _Py_NewReference inserts the object into refchain. Later, when the object is being "conceptually deallocated", it should be removed from refchain with _Py_ForgetReference. The version of _Py_Dealloc that's active when Py_TRACE_REFS is enabled does this (_Py_Dealloc is the element of Py_DECREF that performs the actual destruction). _Py_Dealloc first calls _Py_ForgetReference to remove the object from refchain, then calls the object's destructor (op->ob_type->tp_dealloc). If WANT_SUBCLASSABLE_TYPES is not defined (it is not in my case), the destructor for mxDateTime_Type is mxDateTime_Free. So, if a DateTime object is deallocated normally, as a result of its reference count falling to zero, _Py_Dealloc is called on the object, which first removes it from refchain, then passes it to mxDateTime_Free. If a DateTime object is destroyed prematurely, as a result of invalid arguments to its destructor, the onError handler calls mxDateTime_Free, so the object is "conceptually deallocated" (placed in the free list), *but* the object is not removed from refchain. So if a refchain-membership-integrity-check is performed on the object in question or one of its immediate neighbors in refchain, that integrity check fails, leading to the fatal error. --- The solution is to 'Py_DECREF(...)' the object in the onError handler of its constructor, instead of passing the object directly to mxDateTime_Free. That change solves two problems: 1) It causes _Py_Dealloc to execute, which in turn executes _Py_ForgetReference, so the object is removed from refchain, as it should be. 2) At present, objects that are created successfully and later deallocated by normal reference count mechanics have a reference count of 0 when they enter the free list, whereas objects whose constructors abort their creation due to invalid arguments have a reference count of 1 when they enter the free list. Although AFAIK this doesn't cause an actual execution problem (because the object's reference count is *explicitly set to 1* rather than *incremented by 1* when the object is later "conceptually allocated" by _Py_NewReference), it is likely to confuse future maintainers and thereby lead to the introduction of an actual execution problem. I assume that if you agree that this is a reasonable solution, you'll want to apply the change not only to mxDateTime_FromDateAndTime, but to all similar constructors in mxDateTime.c. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From rj at maxxian.com Thu May 5 01:57:40 2005 From: rj at maxxian.com (RJ Juneau) Date: Sun Jan 29 20:01:07 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c5512e$f72798c0$6505a8c0@rjlaptop> I'm on the 30 day evaluation for mxodbc_zope_da. I'm getting the following error when I submit some queries: Error Type: KeyError Error Value: 'query' I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 with UCS4. The error seems to be caused by multiple rows being returned. I did see an earlier posting with the same error message. The response suggested a template error, but this is clearly not the case here. The additional evidence I've gathered so far: - I'm running the test directly from the ZSQL method, so there's no template involved. - If I use the same query with an additional "where" clause to ensure that only one row is returned, it works - If I use a value in the 'where' clause with no rows returned, it works - The same ZSQL query is being used on a Windows machine running Zope and the free ZODBC module without a problem - The query has been verified directly in mysql-client-browser Other info: - The database is MySQL 4.1.10A-0 - iODBC is the DB driver RJ Juneau -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050505/68d278bf/attachment-0068.htm From mal at egenix.com Thu May 5 12:37:43 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 29 20:01:07 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c5512e$f72798c0$6505a8c0@rjlaptop> References: <000301c5512e$f72798c0$6505a8c0@rjlaptop> Message-ID: <4279E967.6010904@egenix.com> RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 > with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 09:37:42 2005 From: rj at maxxian.com (RJ Juneau) Date: Sun Jan 29 20:01:07 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000101c5516f$3b96de90$6505a8c0@rjlaptop> More interesting info on the problem: If I execute the query directly in the "test" window of the base eGenix mxODBC Database Connection window, it works fine and returns the 20 lines expected. That could point to a problem in the rendering, which seems to be where the traceback ends. Note that within the same Zope system I also have an ODBC connection to a Sybase database, and I have successfully tested multi-line ZSQL queries there. This is the traceback: Time 2005/05/05 07:55:15.294 GMT-4 Exception Type KeyError Exception Value 'query' Traceback (innermost last): Module ZPublisher.Publish, line 101, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 39, in call_object Module Shared.DC.ZRDB.DA, line 337, in manage_test Module DocumentTemplate.DT_String, line 474, in __call__ Module DocumentTemplate.DT_In, line 602, in renderwb Module DocumentTemplate.DT_Var, line 219, in render KeyError: 'query' I don't think the following is an issue, but I'll include it for completeness.I am also getting the following iODBC warnings and errors in the Zope console log, which are related to the ODBC parameters being passed by iODBC. Note that these errors also appear for all of the successful queries. [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (Setup). [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (UsageCount). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Timeout). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Reuse). As for the ZSQL snippet from the template... Since there's no template involved yet (I'm still testing directly from the ZSQL method), I assume you mean the SQL code? select h.host_name, s.system_name, s.system_handle, count(*) from terminal t, system_map s, host h where t.system_index = s.system_index and s.host_index = h.host_index group by s.system_name order by h.host_name Nothing complicated here. There are no parameters passed to the query. RJ -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: May 5, 2005 5:38 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: Re: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is > 2.3.4 with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ---------------------------------------------------------------------- > -- > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 16:00:32 2005 From: charlie at egenix.com (Charlie Clark) Date: Sun Jan 29 20:01:07 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000101c5516f$3b96de90$6505a8c0@rjlaptop> References: <000101c5516f$3b96de90$6505a8c0@rjlaptop> Message-ID: <20050505150032.644.1@bepc.1115296715.fake> On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base eGenix > mxODBC Database Connection window, it works fine and returns the 20 > lines expected. That could point to a problem in the rendering, which > seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection to > a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 10:22:17 2005 From: rj at maxxian.com (RJ Juneau) Date: Sun Jan 29 20:01:07 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505150032.644.1@bepc.1115296715.fake> Message-ID: <000201c55175$75bcad10$6505a8c0@rjlaptop> At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 11:47:14 2005 From: rj at maxxian.com (RJ Juneau) Date: Sun Jan 29 20:01:07 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c55181$549be0e0$6505a8c0@rjlaptop> Charlie, I found a fix. Here it is in case anyone else runs into this. You were correct - the problem is in another part of Zope. Based on your feedback, I did a bit more searching and found something here: http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. html The problem appears to be in Zope versions after 2.7.0. I'm running 2.7.6, and the post indicates that it also happens in 2.7.4. The solution: Edit file /lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. There are two lines in the file that start with . Edit them as follows: Change first line to: Change second line to: Just to be after, I shut down Zope before I made the changes and restarted it after. Thanks for the help! RJ -----Original Message----- From: RJ Juneau [mailto:rj@maxxian.com] Sent: May 5, 2005 9:22 AM To: 'Charlie Clark' Cc: 'egenix-users@lists.egenix.com' Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 17:57:25 2005 From: charlie at egenix.com (Charlie Clark) Date: Sun Jan 29 20:01:07 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <20050505165725.3380.2@bepc.1115296715.fake> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Thu May 5 09:15:21 2005 From: charlie at egenix.com (Charlie Clark) Date: Sun Jan 29 20:01:07 2006 Subject: [Zope-DB] RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <000001c55185$41477730$6b00a8c0@fonacier.local> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________ Zope-DB mailing list Zope-DB@zope.org http://mail.zope.org/mailman/listinfo/zope-db From rj at maxxian.com Thu May 5 12:38:00 2005 From: rj at maxxian.com (RJ Juneau) Date: Sun Jan 29 20:01:07 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000001c55188$6b841eb0$6505a8c0@rjlaptop> I just double-checked. Zope-2.7.6-final. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 12:49:16 2005 From: rj at maxxian.com (RJ Juneau) Date: Sun Jan 29 20:01:07 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000501c55189$fe149ba0$6505a8c0@rjlaptop> Charlie, The fix has only been applied for 2.7.7, 2.8b2. The info is in the original bug report which is closed and can be found here: http://www.zope.org/Collectors/Zope/1745 RJ -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Fri May 6 11:50:09 2005 From: rj at maxxian.com (RJ Juneau) Date: Sun Jan 29 20:01:07 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC Message-ID: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Still on eval for the product. I cannot get a stable connection to Sybase via the iODBC drivers. - The Sybase ODBC connection - including a query - have been verified at the iODBC level. - The setup is already working well for ODBC connection to MySQL. Symptoms include: - If I click on "Open Connection", it still comes back with "Connection Closed" when I go to a ZSQL method - Using 'Connect on Demand' is not working either. - Clicking "Open Connection" gives me the following error: Connection string: DSN=lixbox_sybase; UID=sa; PWD=XXXXXXX Connection pool entry: 0 Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection rejected by data source', 7952) The odbc.ini definition for DSN "lixbox_sybase" is as follows: [lixbox_sybase] JetFix = No NoRowSetSizeLimit = No Description = Test connection to listbox Options = LIXBOX DSQUERY = SQLSERVER TDSHOST = lixbox TDSPORT = 5000 TDSVER = 5.0 SQLSERVER_CATALOG = N CURSOR_SENSITIVITY = LOW UserName = sa Password = XXXXXXXX ServerType = Sybase 10/11/12 Driver = /opt/openlink/lib/sql_mt_lt.so Database = pubs2 ReadOnly = no NoAutoCommit = No NoLoginBox = No FetchBufferSize = 60 Other relevant data: - Connecting via OpenLink's iODBC - Zope 2.7.6-final - Python 2.3.4 - Connection to Sybase has been successfully tested with iODBC, including issuing a query - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC connection RJ Juneau Chief Technology Officer Maxxian Integration Inc. 155 Westhampton Drive Thornhill, Ontario Canada L4J 7X2 E-mail: rj@maxxian.com Phone: +1 905 482 9429 Cell: +1 416 897 6682 Toll free: +1 866 758 9161 Fax: +1 647 722 2038 -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050506/aef33361/attachment-0068.htm From mal at egenix.com Fri May 6 18:27:37 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 29 20:01:07 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC In-Reply-To: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> References: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Message-ID: <427B8CE9.1010601@egenix.com> RJ Juneau wrote: > Still on eval for the product. > > I cannot get a stable connection to Sybase via the iODBC drivers. > > - The Sybase ODBC connection - including a query - have been verified at > the iODBC level. > - The setup is already working well for ODBC connection to MySQL. > > Symptoms include: > > - If I click on "Open Connection", it still comes back with "Connection > Closed" when I go to a ZSQL method > - Using 'Connect on Demand' is not working either. > - Clicking "Open Connection" gives me the following error: > > Connection string: DSN=lixbox_sybase; > UID=sa; > PWD=XXXXXXX Try writing the connection string on one line and without whitespace. ODBC drivers sometimes have problems with this. > Connection pool entry: 0 > Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection > rejected by data source', 7952) This is a generic error that relates to authentication or firewall problems. It is possible that turning on ODBC tracing the ODBC manager will give more clues as to the real cause of the problem. > The odbc.ini definition for DSN "lixbox_sybase" is as follows: > > [lixbox_sybase] > JetFix = No > NoRowSetSizeLimit = No > Description = Test connection to listbox > Options = LIXBOX > DSQUERY = SQLSERVER > TDSHOST = lixbox > TDSPORT = 5000 > TDSVER = 5.0 > SQLSERVER_CATALOG = N > CURSOR_SENSITIVITY = LOW > UserName = sa > Password = XXXXXXXX > ServerType = Sybase 10/11/12 > Driver = /opt/openlink/lib/sql_mt_lt.so > Database = pubs2 > ReadOnly = no > NoAutoCommit = No > NoLoginBox = No > FetchBufferSize = 60 > > > Other relevant data: > - Connecting via OpenLink's iODBC > - Zope 2.7.6-final > - Python 2.3.4 > - Connection to Sybase has been successfully tested with iODBC, > including issuing a query > - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC > connection > > > > RJ Juneau > Chief Technology Officer > Maxxian Integration Inc. > 155 Westhampton Drive > Thornhill, Ontario > Canada L4J 7X2 > E-mail: rj@maxxian.com > Phone: +1 905 482 9429 > Cell: +1 416 897 6682 > Toll free: +1 866 758 9161 > Fax: +1 647 722 2038 > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 06 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From calisp at gmail.com Sun May 15 23:49:03 2005 From: calisp at gmail.com (calisp@gmail.com) Date: Sun Jan 29 20:01:07 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK Message-ID: Hi, I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the following error... 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the last phase of a two-phase commit. This shouldn't happen. Traceback (most recent call last): File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one jar.tpc_finish(self) File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish try: self._finish() File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could not perform COMMIT or ROLLBACK', 1023) What could be causing this? Can I get the mxODBCZopeDA source from somewhere? It would make debugging this much easier. Thanks, Calisp. From mal at egenix.com Mon May 16 13:52:12 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Jan 29 20:01:07 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK In-Reply-To: References: Message-ID: <42887B5C.4010109@egenix.com> calisp@gmail.com wrote: > Hi, > > I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with > unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the > following error... > > 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the > last phase of a two-phase commit. This shouldn't happen. > Traceback (most recent call last): > File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one > jar.tpc_finish(self) > File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish > try: self._finish() > File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish > File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler > ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could > not perform COMMIT or ROLLBACK', 1023) You should have a look at the database logs to see what prevented the commit from being completed. > What could be causing this? Hard to say: mxODBCZopeDA is trying to commit the transaction, but the driver or database failed to complete the request. The above error was generated by the ODBC driver. This could be network or DNS problems, or be related to a bug in FreeTDS (which is getting more stable with every new release, but should still be considered beta quality software at the moment). > Can I get the mxODBCZopeDA source from > somewhere? It would make debugging this much easier. Getting the source is not an option and won't help much either since the source of the problem is not mxODBCZopeDA. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 16 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Sun May 1 21:29:25 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 30 08:10:19 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <427259F3.4090806@egenix.com> References: <20050427130906.52878.qmail@web30008.mail.mud.yahoo.com> <427259F3.4090806@egenix.com> Message-ID: <42752005.7080904@egenix.com> M.-A. Lemburg wrote: > David Rushby wrote: > >> --- "M.-A. Lemburg" wrote: >> >>> Are you using the standard mxDateTime build or one >>> with WANT_SUBCLASSABLE_TYPES defined... >> >> >> >> Presumably "the standard", since I just built with 'py24d setup.py >> build', making no attempt to enable special directives. >> >> >>> ... (mxDateTime_Deallocate is only used by the latter)? >> >> >> >> That's true in 2.1.0-2005-04-15, but not in 2.1.0b5. >> >> >>> In any case, please try our latest snapshot: >>> >>> >> >> http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-04-15.zip >> >>> to see if that makes any difference. >> >> >> >> I can't build it out of the box: > > > Hmm, looks like distutils' sdist command doesn't like our new > repository layout which uses symlinks (after we've switched to > subversion). > > We'll have to debug distutils first, I guess :-( Ok, we've found the problem and fixed it. Here's the new release (which does build out of the box at least on our boxes ;-): http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 01 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From davidrushby at yahoo.com Mon May 2 15:49:53 2005 From: davidrushby at yahoo.com (David Rushby) Date: Mon Jan 30 08:10:21 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Ok, we've found the problem and fixed it. Here's the new > release (which does build out of the box at least on our > boxes ;-): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip It does build now, but: py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" still behaves as it did when I submitted my original message: Fatal Python error: UNREF invalid object Aborted This is the same debug build of Python 2.4.1 that I was previously using, running the same configuration (CentOS Linux 4.0/i386, everything compiled with GCC 3.4.3). Have you examined my original claim as to the cause of the bug? __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 10:21:55 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 30 08:10:21 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> References: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> Message-ID: <42772693.8050306@egenix.com> David Rushby wrote: > --- "M.-A. Lemburg" wrote: > >>Ok, we've found the problem and fixed it. Here's the new >>release (which does build out of the box at least on our >>boxes ;-): >> >> > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip > > It does build now, but: > py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" > still behaves as it did when I submitted my original message: > Fatal Python error: UNREF invalid object > Aborted > > This is the same debug build of Python 2.4.1 that I was previously > using, running the same configuration (CentOS Linux 4.0/i386, > everything compiled with GCC 3.4.3). > > Have you examined my original claim as to the cause of the bug? No. We haven't had time for looking into it. I'm not sure whether your analysis of the problem is correct: if you don't define WANT_SUBCLASSABLE_TYPES, the API mxDateTime_Deallocate() is neither defined nor used. Furthermore, PyObject_Del() is only called by mxDateTime_Free() if you have explicitely edited mxDateTime.c to disabled the free list #defines. In a standard build, PyObject_Del() is only called at module finalization time. Note that the reason we call mxDateTime_Free() in the constructor is that we don't want the destructor of the object to be called. Py_DECREF() would call the destructor (mxDateTime_Deallocate). It is possible that the debug code in Python complains about the refcount in the object not being 0 at the time the object is finalized (module finalization time), but I don't see any such checks in PyObject_Free() (which is what PyObject_Del() maps to). Again, all of this does not happen in regular non-debug Python builds. Please be aware that we don't support debug builds, so fixing the problem (if there is one - gcc has some serious optimization problems on some combinations of platform and version) will take a while. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 09:27:37 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Mon Jan 30 08:10:21 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 Message-ID: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Hi all- I am trying to build the mx-base package, v.2.0.6. This will be used with postgresql 7.3.9, psycopg 1.1.18, and Roundup 0.8.2. RHEL 3.0 Python 2.3 egenix-mx-base-2.0.6.tar.gz I performed a: /usr/local/bin/python2.3 setup.py install Everything looks proper with the exeception of this series of warning statements: ----------------- gcc -pthread -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fno-strict-aliasing -fPIC -Imx/BeeBase/mxBeeBase -I/usr/local/incl ude/python2.3 -I/usr/local/include -c mx/BeeBase/mxBeeBase/btr.c -o build/temp.linux-i686-2.3/mx/BeeBase/mxBeeBase/mxBeeBa se/mx/BeeBase/mxBeeBase/btr.o mx/BeeBase/mxBeeBase/btr.c: In function `dumpBuf': mx/BeeBase/mxBeeBase/btr.c:249: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:250: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:255: warning: unsigned int format, long unsigned int arg (arg 4) mx/BeeBase/mxBeeBase/btr.c:256: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c: In function `_validateTree': mx/BeeBase/mxBeeBase/btr.c:330: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:337: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:339: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:349: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:351: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 3) creating build/lib.linux-i686-2.3/mx/BeeBase creating build/lib.linux-i686-2.3/mx/BeeBase/mxBeeBase -------------- Would someone be kind enough to let me know whether these messages were expected, and if not, how I might resolve these? Thanks! DC __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 22:06:33 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 30 08:10:21 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> References: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Message-ID: <4277CBB9.8020302@egenix.com> Dianne Chen wrote: > Hi all- > > I am trying to build the mx-base package, v.2.0.6. > This will be used with postgresql 7.3.9, psycopg > 1.1.18, and Roundup 0.8.2. > > RHEL 3.0 > Python 2.3 > egenix-mx-base-2.0.6.tar.gz > > I performed a: > > /usr/local/bin/python2.3 setup.py install > > Everything looks proper with the exeception of this > series of warning statements: > > ----------------- > ... > -------------- > > Would someone be kind enough to let me know whether > these messages were expected, and if not, how I might > resolve these? These warning can safely be ignored. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 13:41:14 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Mon Jan 30 08:10:22 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: 6667 Message-ID: <20050503194114.72091.qmail@web31414.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Dianne Chen wrote: > > Hi all- > > > > I am trying to build the mx-base package, v.2.0.6. > > This will be used with postgresql 7.3.9, psycopg > > 1.1.18, and Roundup 0.8.2. > > > > RHEL 3.0 > > Python 2.3 > > egenix-mx-base-2.0.6.tar.gz > > > > I performed a: > > > > /usr/local/bin/python2.3 setup.py install > > > > Everything looks proper with the exeception of > this > > series of warning statements: > > > > ----------------- > > ... > > -------------- > > > > Would someone be kind enough to let me know > whether > > these messages were expected, and if not, how I > might > > resolve these? > > These warning can safely be ignored. > > -- > Marc-Andre Lemburg > eGenix.com > Marc- Thank you very much for the reply. It helps greatly. With kind regards, DC __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From davidrushby at yahoo.com Tue May 3 17:18:46 2005 From: davidrushby at yahoo.com (David Rushby) Date: Mon Jan 30 08:10:22 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050503231846.35012.qmail@web30009.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > I'm not sure whether your analysis of the problem is correct... Indeed, my original analysis wasn't correct; I think this one is. The fatal error I'm complaining about only arises if the arguments to DateTime.DateTime are invalid, so that the object is deallocated in the onError block of mxDateTime_FromDateAndTime. If the object is created successfully, and later deallocated by Python's garbage collector, the fatal error doesn't arise. Here's my analysis of the problem: --- If the debugging directive Py_TRACE_REFS is enabled, as it is in my case, the Python interpreter maintains a doubly linked list of all Python objects (named refchain) via the _ob_next and _ob_prev pointers added to PyObject via _PyObject_HEAD_EXTRA. Each object is inserted into refchain by the _Py_AddToAllObjects call in _Py_NewReference, and removed from refchain by the _Py_ForgetReference call in _Py_Dealloc. _Py_ForgetReference performs an integrity check on the object being deallocated (op) to make sure that its neighbors in refchain recognize it. Specifically, _Py_ForgetReference verifies that the _ob_next pointer of the previous object in refchain (op->_ob_prev->_ob_next) points to op, and that the _ob_prev pointer of the next object in refchain (op->_ob_next->_ob_prev) points to op. If either of those conditions is false, the interpreter raises the fatal error I'm seeing. After mxDateTime_New pulls an mxDateTimeObject out of the free list, it calls _Py_NewReference on that object to transform it from a "conceptually deallocated" object to a "conceptually allocated" one. _Py_NewReference inserts the object into refchain. Later, when the object is being "conceptually deallocated", it should be removed from refchain with _Py_ForgetReference. The version of _Py_Dealloc that's active when Py_TRACE_REFS is enabled does this (_Py_Dealloc is the element of Py_DECREF that performs the actual destruction). _Py_Dealloc first calls _Py_ForgetReference to remove the object from refchain, then calls the object's destructor (op->ob_type->tp_dealloc). If WANT_SUBCLASSABLE_TYPES is not defined (it is not in my case), the destructor for mxDateTime_Type is mxDateTime_Free. So, if a DateTime object is deallocated normally, as a result of its reference count falling to zero, _Py_Dealloc is called on the object, which first removes it from refchain, then passes it to mxDateTime_Free. If a DateTime object is destroyed prematurely, as a result of invalid arguments to its destructor, the onError handler calls mxDateTime_Free, so the object is "conceptually deallocated" (placed in the free list), *but* the object is not removed from refchain. So if a refchain-membership-integrity-check is performed on the object in question or one of its immediate neighbors in refchain, that integrity check fails, leading to the fatal error. --- The solution is to 'Py_DECREF(...)' the object in the onError handler of its constructor, instead of passing the object directly to mxDateTime_Free. That change solves two problems: 1) It causes _Py_Dealloc to execute, which in turn executes _Py_ForgetReference, so the object is removed from refchain, as it should be. 2) At present, objects that are created successfully and later deallocated by normal reference count mechanics have a reference count of 0 when they enter the free list, whereas objects whose constructors abort their creation due to invalid arguments have a reference count of 1 when they enter the free list. Although AFAIK this doesn't cause an actual execution problem (because the object's reference count is *explicitly set to 1* rather than *incremented by 1* when the object is later "conceptually allocated" by _Py_NewReference), it is likely to confuse future maintainers and thereby lead to the introduction of an actual execution problem. I assume that if you agree that this is a reasonable solution, you'll want to apply the change not only to mxDateTime_FromDateAndTime, but to all similar constructors in mxDateTime.c. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From rj at maxxian.com Thu May 5 01:57:40 2005 From: rj at maxxian.com (RJ Juneau) Date: Mon Jan 30 08:10:27 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c5512e$f72798c0$6505a8c0@rjlaptop> I'm on the 30 day evaluation for mxodbc_zope_da. I'm getting the following error when I submit some queries: Error Type: KeyError Error Value: 'query' I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 with UCS4. The error seems to be caused by multiple rows being returned. I did see an earlier posting with the same error message. The response suggested a template error, but this is clearly not the case here. The additional evidence I've gathered so far: - I'm running the test directly from the ZSQL method, so there's no template involved. - If I use the same query with an additional "where" clause to ensure that only one row is returned, it works - If I use a value in the 'where' clause with no rows returned, it works - The same ZSQL query is being used on a Windows machine running Zope and the free ZODBC module without a problem - The query has been verified directly in mysql-client-browser Other info: - The database is MySQL 4.1.10A-0 - iODBC is the DB driver RJ Juneau -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050505/68d278bf/attachment-0069.htm From mal at egenix.com Thu May 5 12:37:43 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 30 08:10:27 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c5512e$f72798c0$6505a8c0@rjlaptop> References: <000301c5512e$f72798c0$6505a8c0@rjlaptop> Message-ID: <4279E967.6010904@egenix.com> RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 > with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 09:37:42 2005 From: rj at maxxian.com (RJ Juneau) Date: Mon Jan 30 08:10:27 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000101c5516f$3b96de90$6505a8c0@rjlaptop> More interesting info on the problem: If I execute the query directly in the "test" window of the base eGenix mxODBC Database Connection window, it works fine and returns the 20 lines expected. That could point to a problem in the rendering, which seems to be where the traceback ends. Note that within the same Zope system I also have an ODBC connection to a Sybase database, and I have successfully tested multi-line ZSQL queries there. This is the traceback: Time 2005/05/05 07:55:15.294 GMT-4 Exception Type KeyError Exception Value 'query' Traceback (innermost last): Module ZPublisher.Publish, line 101, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 39, in call_object Module Shared.DC.ZRDB.DA, line 337, in manage_test Module DocumentTemplate.DT_String, line 474, in __call__ Module DocumentTemplate.DT_In, line 602, in renderwb Module DocumentTemplate.DT_Var, line 219, in render KeyError: 'query' I don't think the following is an issue, but I'll include it for completeness.I am also getting the following iODBC warnings and errors in the Zope console log, which are related to the ODBC parameters being passed by iODBC. Note that these errors also appear for all of the successful queries. [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (Setup). [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (UsageCount). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Timeout). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Reuse). As for the ZSQL snippet from the template... Since there's no template involved yet (I'm still testing directly from the ZSQL method), I assume you mean the SQL code? select h.host_name, s.system_name, s.system_handle, count(*) from terminal t, system_map s, host h where t.system_index = s.system_index and s.host_index = h.host_index group by s.system_name order by h.host_name Nothing complicated here. There are no parameters passed to the query. RJ -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: May 5, 2005 5:38 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: Re: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is > 2.3.4 with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ---------------------------------------------------------------------- > -- > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 16:00:32 2005 From: charlie at egenix.com (Charlie Clark) Date: Mon Jan 30 08:10:27 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000101c5516f$3b96de90$6505a8c0@rjlaptop> References: <000101c5516f$3b96de90$6505a8c0@rjlaptop> Message-ID: <20050505150032.644.1@bepc.1115296715.fake> On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base eGenix > mxODBC Database Connection window, it works fine and returns the 20 > lines expected. That could point to a problem in the rendering, which > seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection to > a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 10:22:17 2005 From: rj at maxxian.com (RJ Juneau) Date: Mon Jan 30 08:10:27 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505150032.644.1@bepc.1115296715.fake> Message-ID: <000201c55175$75bcad10$6505a8c0@rjlaptop> At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 11:47:14 2005 From: rj at maxxian.com (RJ Juneau) Date: Mon Jan 30 08:10:27 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c55181$549be0e0$6505a8c0@rjlaptop> Charlie, I found a fix. Here it is in case anyone else runs into this. You were correct - the problem is in another part of Zope. Based on your feedback, I did a bit more searching and found something here: http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. html The problem appears to be in Zope versions after 2.7.0. I'm running 2.7.6, and the post indicates that it also happens in 2.7.4. The solution: Edit file /lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. There are two lines in the file that start with . Edit them as follows: Change first line to: Change second line to: Just to be after, I shut down Zope before I made the changes and restarted it after. Thanks for the help! RJ -----Original Message----- From: RJ Juneau [mailto:rj@maxxian.com] Sent: May 5, 2005 9:22 AM To: 'Charlie Clark' Cc: 'egenix-users@lists.egenix.com' Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 17:57:25 2005 From: charlie at egenix.com (Charlie Clark) Date: Mon Jan 30 08:10:28 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <20050505165725.3380.2@bepc.1115296715.fake> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Thu May 5 09:15:21 2005 From: charlie at egenix.com (Charlie Clark) Date: Mon Jan 30 08:10:28 2006 Subject: [Zope-DB] RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <000001c55185$41477730$6b00a8c0@fonacier.local> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________ Zope-DB mailing list Zope-DB@zope.org http://mail.zope.org/mailman/listinfo/zope-db From rj at maxxian.com Thu May 5 12:38:00 2005 From: rj at maxxian.com (RJ Juneau) Date: Mon Jan 30 08:10:28 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000001c55188$6b841eb0$6505a8c0@rjlaptop> I just double-checked. Zope-2.7.6-final. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 12:49:16 2005 From: rj at maxxian.com (RJ Juneau) Date: Mon Jan 30 08:10:28 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000501c55189$fe149ba0$6505a8c0@rjlaptop> Charlie, The fix has only been applied for 2.7.7, 2.8b2. The info is in the original bug report which is closed and can be found here: http://www.zope.org/Collectors/Zope/1745 RJ -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Fri May 6 11:50:09 2005 From: rj at maxxian.com (RJ Juneau) Date: Mon Jan 30 08:10:28 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC Message-ID: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Still on eval for the product. I cannot get a stable connection to Sybase via the iODBC drivers. - The Sybase ODBC connection - including a query - have been verified at the iODBC level. - The setup is already working well for ODBC connection to MySQL. Symptoms include: - If I click on "Open Connection", it still comes back with "Connection Closed" when I go to a ZSQL method - Using 'Connect on Demand' is not working either. - Clicking "Open Connection" gives me the following error: Connection string: DSN=lixbox_sybase; UID=sa; PWD=XXXXXXX Connection pool entry: 0 Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection rejected by data source', 7952) The odbc.ini definition for DSN "lixbox_sybase" is as follows: [lixbox_sybase] JetFix = No NoRowSetSizeLimit = No Description = Test connection to listbox Options = LIXBOX DSQUERY = SQLSERVER TDSHOST = lixbox TDSPORT = 5000 TDSVER = 5.0 SQLSERVER_CATALOG = N CURSOR_SENSITIVITY = LOW UserName = sa Password = XXXXXXXX ServerType = Sybase 10/11/12 Driver = /opt/openlink/lib/sql_mt_lt.so Database = pubs2 ReadOnly = no NoAutoCommit = No NoLoginBox = No FetchBufferSize = 60 Other relevant data: - Connecting via OpenLink's iODBC - Zope 2.7.6-final - Python 2.3.4 - Connection to Sybase has been successfully tested with iODBC, including issuing a query - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC connection RJ Juneau Chief Technology Officer Maxxian Integration Inc. 155 Westhampton Drive Thornhill, Ontario Canada L4J 7X2 E-mail: rj@maxxian.com Phone: +1 905 482 9429 Cell: +1 416 897 6682 Toll free: +1 866 758 9161 Fax: +1 647 722 2038 -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050506/aef33361/attachment-0069.htm From mal at egenix.com Fri May 6 18:27:37 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 30 08:10:28 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC In-Reply-To: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> References: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Message-ID: <427B8CE9.1010601@egenix.com> RJ Juneau wrote: > Still on eval for the product. > > I cannot get a stable connection to Sybase via the iODBC drivers. > > - The Sybase ODBC connection - including a query - have been verified at > the iODBC level. > - The setup is already working well for ODBC connection to MySQL. > > Symptoms include: > > - If I click on "Open Connection", it still comes back with "Connection > Closed" when I go to a ZSQL method > - Using 'Connect on Demand' is not working either. > - Clicking "Open Connection" gives me the following error: > > Connection string: DSN=lixbox_sybase; > UID=sa; > PWD=XXXXXXX Try writing the connection string on one line and without whitespace. ODBC drivers sometimes have problems with this. > Connection pool entry: 0 > Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection > rejected by data source', 7952) This is a generic error that relates to authentication or firewall problems. It is possible that turning on ODBC tracing the ODBC manager will give more clues as to the real cause of the problem. > The odbc.ini definition for DSN "lixbox_sybase" is as follows: > > [lixbox_sybase] > JetFix = No > NoRowSetSizeLimit = No > Description = Test connection to listbox > Options = LIXBOX > DSQUERY = SQLSERVER > TDSHOST = lixbox > TDSPORT = 5000 > TDSVER = 5.0 > SQLSERVER_CATALOG = N > CURSOR_SENSITIVITY = LOW > UserName = sa > Password = XXXXXXXX > ServerType = Sybase 10/11/12 > Driver = /opt/openlink/lib/sql_mt_lt.so > Database = pubs2 > ReadOnly = no > NoAutoCommit = No > NoLoginBox = No > FetchBufferSize = 60 > > > Other relevant data: > - Connecting via OpenLink's iODBC > - Zope 2.7.6-final > - Python 2.3.4 > - Connection to Sybase has been successfully tested with iODBC, > including issuing a query > - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC > connection > > > > RJ Juneau > Chief Technology Officer > Maxxian Integration Inc. > 155 Westhampton Drive > Thornhill, Ontario > Canada L4J 7X2 > E-mail: rj@maxxian.com > Phone: +1 905 482 9429 > Cell: +1 416 897 6682 > Toll free: +1 866 758 9161 > Fax: +1 647 722 2038 > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 06 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From calisp at gmail.com Sun May 15 23:49:03 2005 From: calisp at gmail.com (calisp@gmail.com) Date: Mon Jan 30 08:10:28 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK Message-ID: Hi, I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the following error... 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the last phase of a two-phase commit. This shouldn't happen. Traceback (most recent call last): File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one jar.tpc_finish(self) File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish try: self._finish() File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could not perform COMMIT or ROLLBACK', 1023) What could be causing this? Can I get the mxODBCZopeDA source from somewhere? It would make debugging this much easier. Thanks, Calisp. From mal at egenix.com Mon May 16 13:52:12 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 30 08:10:28 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK In-Reply-To: References: Message-ID: <42887B5C.4010109@egenix.com> calisp@gmail.com wrote: > Hi, > > I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with > unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the > following error... > > 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the > last phase of a two-phase commit. This shouldn't happen. > Traceback (most recent call last): > File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one > jar.tpc_finish(self) > File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish > try: self._finish() > File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish > File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler > ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could > not perform COMMIT or ROLLBACK', 1023) You should have a look at the database logs to see what prevented the commit from being completed. > What could be causing this? Hard to say: mxODBCZopeDA is trying to commit the transaction, but the driver or database failed to complete the request. The above error was generated by the ODBC driver. This could be network or DNS problems, or be related to a bug in FreeTDS (which is getting more stable with every new release, but should still be considered beta quality software at the moment). > Can I get the mxODBCZopeDA source from > somewhere? It would make debugging this much easier. Getting the source is not an option and won't help much either since the source of the problem is not mxODBCZopeDA. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 16 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Sun May 1 21:29:25 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 30 12:04:19 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <427259F3.4090806@egenix.com> References: <20050427130906.52878.qmail@web30008.mail.mud.yahoo.com> <427259F3.4090806@egenix.com> Message-ID: <42752005.7080904@egenix.com> M.-A. Lemburg wrote: > David Rushby wrote: > >> --- "M.-A. Lemburg" wrote: >> >>> Are you using the standard mxDateTime build or one >>> with WANT_SUBCLASSABLE_TYPES defined... >> >> >> >> Presumably "the standard", since I just built with 'py24d setup.py >> build', making no attempt to enable special directives. >> >> >>> ... (mxDateTime_Deallocate is only used by the latter)? >> >> >> >> That's true in 2.1.0-2005-04-15, but not in 2.1.0b5. >> >> >>> In any case, please try our latest snapshot: >>> >>> >> >> http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-04-15.zip >> >>> to see if that makes any difference. >> >> >> >> I can't build it out of the box: > > > Hmm, looks like distutils' sdist command doesn't like our new > repository layout which uses symlinks (after we've switched to > subversion). > > We'll have to debug distutils first, I guess :-( Ok, we've found the problem and fixed it. Here's the new release (which does build out of the box at least on our boxes ;-): http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 01 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From davidrushby at yahoo.com Mon May 2 15:49:53 2005 From: davidrushby at yahoo.com (David Rushby) Date: Mon Jan 30 12:04:19 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Ok, we've found the problem and fixed it. Here's the new > release (which does build out of the box at least on our > boxes ;-): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip It does build now, but: py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" still behaves as it did when I submitted my original message: Fatal Python error: UNREF invalid object Aborted This is the same debug build of Python 2.4.1 that I was previously using, running the same configuration (CentOS Linux 4.0/i386, everything compiled with GCC 3.4.3). Have you examined my original claim as to the cause of the bug? __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 10:21:55 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 30 12:04:19 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> References: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> Message-ID: <42772693.8050306@egenix.com> David Rushby wrote: > --- "M.-A. Lemburg" wrote: > >>Ok, we've found the problem and fixed it. Here's the new >>release (which does build out of the box at least on our >>boxes ;-): >> >> > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip > > It does build now, but: > py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" > still behaves as it did when I submitted my original message: > Fatal Python error: UNREF invalid object > Aborted > > This is the same debug build of Python 2.4.1 that I was previously > using, running the same configuration (CentOS Linux 4.0/i386, > everything compiled with GCC 3.4.3). > > Have you examined my original claim as to the cause of the bug? No. We haven't had time for looking into it. I'm not sure whether your analysis of the problem is correct: if you don't define WANT_SUBCLASSABLE_TYPES, the API mxDateTime_Deallocate() is neither defined nor used. Furthermore, PyObject_Del() is only called by mxDateTime_Free() if you have explicitely edited mxDateTime.c to disabled the free list #defines. In a standard build, PyObject_Del() is only called at module finalization time. Note that the reason we call mxDateTime_Free() in the constructor is that we don't want the destructor of the object to be called. Py_DECREF() would call the destructor (mxDateTime_Deallocate). It is possible that the debug code in Python complains about the refcount in the object not being 0 at the time the object is finalized (module finalization time), but I don't see any such checks in PyObject_Free() (which is what PyObject_Del() maps to). Again, all of this does not happen in regular non-debug Python builds. Please be aware that we don't support debug builds, so fixing the problem (if there is one - gcc has some serious optimization problems on some combinations of platform and version) will take a while. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 09:27:37 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Mon Jan 30 12:04:20 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 Message-ID: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Hi all- I am trying to build the mx-base package, v.2.0.6. This will be used with postgresql 7.3.9, psycopg 1.1.18, and Roundup 0.8.2. RHEL 3.0 Python 2.3 egenix-mx-base-2.0.6.tar.gz I performed a: /usr/local/bin/python2.3 setup.py install Everything looks proper with the exeception of this series of warning statements: ----------------- gcc -pthread -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fno-strict-aliasing -fPIC -Imx/BeeBase/mxBeeBase -I/usr/local/incl ude/python2.3 -I/usr/local/include -c mx/BeeBase/mxBeeBase/btr.c -o build/temp.linux-i686-2.3/mx/BeeBase/mxBeeBase/mxBeeBa se/mx/BeeBase/mxBeeBase/btr.o mx/BeeBase/mxBeeBase/btr.c: In function `dumpBuf': mx/BeeBase/mxBeeBase/btr.c:249: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:250: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:255: warning: unsigned int format, long unsigned int arg (arg 4) mx/BeeBase/mxBeeBase/btr.c:256: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c: In function `_validateTree': mx/BeeBase/mxBeeBase/btr.c:330: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:337: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:339: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:349: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:351: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 3) creating build/lib.linux-i686-2.3/mx/BeeBase creating build/lib.linux-i686-2.3/mx/BeeBase/mxBeeBase -------------- Would someone be kind enough to let me know whether these messages were expected, and if not, how I might resolve these? Thanks! DC __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 22:06:33 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 30 12:04:20 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> References: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Message-ID: <4277CBB9.8020302@egenix.com> Dianne Chen wrote: > Hi all- > > I am trying to build the mx-base package, v.2.0.6. > This will be used with postgresql 7.3.9, psycopg > 1.1.18, and Roundup 0.8.2. > > RHEL 3.0 > Python 2.3 > egenix-mx-base-2.0.6.tar.gz > > I performed a: > > /usr/local/bin/python2.3 setup.py install > > Everything looks proper with the exeception of this > series of warning statements: > > ----------------- > ... > -------------- > > Would someone be kind enough to let me know whether > these messages were expected, and if not, how I might > resolve these? These warning can safely be ignored. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 13:41:14 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Mon Jan 30 12:04:20 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: 6667 Message-ID: <20050503194114.72091.qmail@web31414.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Dianne Chen wrote: > > Hi all- > > > > I am trying to build the mx-base package, v.2.0.6. > > This will be used with postgresql 7.3.9, psycopg > > 1.1.18, and Roundup 0.8.2. > > > > RHEL 3.0 > > Python 2.3 > > egenix-mx-base-2.0.6.tar.gz > > > > I performed a: > > > > /usr/local/bin/python2.3 setup.py install > > > > Everything looks proper with the exeception of > this > > series of warning statements: > > > > ----------------- > > ... > > -------------- > > > > Would someone be kind enough to let me know > whether > > these messages were expected, and if not, how I > might > > resolve these? > > These warning can safely be ignored. > > -- > Marc-Andre Lemburg > eGenix.com > Marc- Thank you very much for the reply. It helps greatly. With kind regards, DC __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From davidrushby at yahoo.com Tue May 3 17:18:46 2005 From: davidrushby at yahoo.com (David Rushby) Date: Mon Jan 30 12:04:20 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050503231846.35012.qmail@web30009.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > I'm not sure whether your analysis of the problem is correct... Indeed, my original analysis wasn't correct; I think this one is. The fatal error I'm complaining about only arises if the arguments to DateTime.DateTime are invalid, so that the object is deallocated in the onError block of mxDateTime_FromDateAndTime. If the object is created successfully, and later deallocated by Python's garbage collector, the fatal error doesn't arise. Here's my analysis of the problem: --- If the debugging directive Py_TRACE_REFS is enabled, as it is in my case, the Python interpreter maintains a doubly linked list of all Python objects (named refchain) via the _ob_next and _ob_prev pointers added to PyObject via _PyObject_HEAD_EXTRA. Each object is inserted into refchain by the _Py_AddToAllObjects call in _Py_NewReference, and removed from refchain by the _Py_ForgetReference call in _Py_Dealloc. _Py_ForgetReference performs an integrity check on the object being deallocated (op) to make sure that its neighbors in refchain recognize it. Specifically, _Py_ForgetReference verifies that the _ob_next pointer of the previous object in refchain (op->_ob_prev->_ob_next) points to op, and that the _ob_prev pointer of the next object in refchain (op->_ob_next->_ob_prev) points to op. If either of those conditions is false, the interpreter raises the fatal error I'm seeing. After mxDateTime_New pulls an mxDateTimeObject out of the free list, it calls _Py_NewReference on that object to transform it from a "conceptually deallocated" object to a "conceptually allocated" one. _Py_NewReference inserts the object into refchain. Later, when the object is being "conceptually deallocated", it should be removed from refchain with _Py_ForgetReference. The version of _Py_Dealloc that's active when Py_TRACE_REFS is enabled does this (_Py_Dealloc is the element of Py_DECREF that performs the actual destruction). _Py_Dealloc first calls _Py_ForgetReference to remove the object from refchain, then calls the object's destructor (op->ob_type->tp_dealloc). If WANT_SUBCLASSABLE_TYPES is not defined (it is not in my case), the destructor for mxDateTime_Type is mxDateTime_Free. So, if a DateTime object is deallocated normally, as a result of its reference count falling to zero, _Py_Dealloc is called on the object, which first removes it from refchain, then passes it to mxDateTime_Free. If a DateTime object is destroyed prematurely, as a result of invalid arguments to its destructor, the onError handler calls mxDateTime_Free, so the object is "conceptually deallocated" (placed in the free list), *but* the object is not removed from refchain. So if a refchain-membership-integrity-check is performed on the object in question or one of its immediate neighbors in refchain, that integrity check fails, leading to the fatal error. --- The solution is to 'Py_DECREF(...)' the object in the onError handler of its constructor, instead of passing the object directly to mxDateTime_Free. That change solves two problems: 1) It causes _Py_Dealloc to execute, which in turn executes _Py_ForgetReference, so the object is removed from refchain, as it should be. 2) At present, objects that are created successfully and later deallocated by normal reference count mechanics have a reference count of 0 when they enter the free list, whereas objects whose constructors abort their creation due to invalid arguments have a reference count of 1 when they enter the free list. Although AFAIK this doesn't cause an actual execution problem (because the object's reference count is *explicitly set to 1* rather than *incremented by 1* when the object is later "conceptually allocated" by _Py_NewReference), it is likely to confuse future maintainers and thereby lead to the introduction of an actual execution problem. I assume that if you agree that this is a reasonable solution, you'll want to apply the change not only to mxDateTime_FromDateAndTime, but to all similar constructors in mxDateTime.c. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From rj at maxxian.com Thu May 5 01:57:40 2005 From: rj at maxxian.com (RJ Juneau) Date: Mon Jan 30 12:04:20 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c5512e$f72798c0$6505a8c0@rjlaptop> I'm on the 30 day evaluation for mxodbc_zope_da. I'm getting the following error when I submit some queries: Error Type: KeyError Error Value: 'query' I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 with UCS4. The error seems to be caused by multiple rows being returned. I did see an earlier posting with the same error message. The response suggested a template error, but this is clearly not the case here. The additional evidence I've gathered so far: - I'm running the test directly from the ZSQL method, so there's no template involved. - If I use the same query with an additional "where" clause to ensure that only one row is returned, it works - If I use a value in the 'where' clause with no rows returned, it works - The same ZSQL query is being used on a Windows machine running Zope and the free ZODBC module without a problem - The query has been verified directly in mysql-client-browser Other info: - The database is MySQL 4.1.10A-0 - iODBC is the DB driver RJ Juneau -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050505/68d278bf/attachment-0070.htm From mal at egenix.com Thu May 5 12:37:43 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 30 12:04:20 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c5512e$f72798c0$6505a8c0@rjlaptop> References: <000301c5512e$f72798c0$6505a8c0@rjlaptop> Message-ID: <4279E967.6010904@egenix.com> RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 > with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 09:37:42 2005 From: rj at maxxian.com (RJ Juneau) Date: Mon Jan 30 12:04:20 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000101c5516f$3b96de90$6505a8c0@rjlaptop> More interesting info on the problem: If I execute the query directly in the "test" window of the base eGenix mxODBC Database Connection window, it works fine and returns the 20 lines expected. That could point to a problem in the rendering, which seems to be where the traceback ends. Note that within the same Zope system I also have an ODBC connection to a Sybase database, and I have successfully tested multi-line ZSQL queries there. This is the traceback: Time 2005/05/05 07:55:15.294 GMT-4 Exception Type KeyError Exception Value 'query' Traceback (innermost last): Module ZPublisher.Publish, line 101, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 39, in call_object Module Shared.DC.ZRDB.DA, line 337, in manage_test Module DocumentTemplate.DT_String, line 474, in __call__ Module DocumentTemplate.DT_In, line 602, in renderwb Module DocumentTemplate.DT_Var, line 219, in render KeyError: 'query' I don't think the following is an issue, but I'll include it for completeness.I am also getting the following iODBC warnings and errors in the Zope console log, which are related to the ODBC parameters being passed by iODBC. Note that these errors also appear for all of the successful queries. [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (Setup). [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (UsageCount). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Timeout). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Reuse). As for the ZSQL snippet from the template... Since there's no template involved yet (I'm still testing directly from the ZSQL method), I assume you mean the SQL code? select h.host_name, s.system_name, s.system_handle, count(*) from terminal t, system_map s, host h where t.system_index = s.system_index and s.host_index = h.host_index group by s.system_name order by h.host_name Nothing complicated here. There are no parameters passed to the query. RJ -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: May 5, 2005 5:38 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: Re: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is > 2.3.4 with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ---------------------------------------------------------------------- > -- > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 16:00:32 2005 From: charlie at egenix.com (Charlie Clark) Date: Mon Jan 30 12:04:20 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000101c5516f$3b96de90$6505a8c0@rjlaptop> References: <000101c5516f$3b96de90$6505a8c0@rjlaptop> Message-ID: <20050505150032.644.1@bepc.1115296715.fake> On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base eGenix > mxODBC Database Connection window, it works fine and returns the 20 > lines expected. That could point to a problem in the rendering, which > seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection to > a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 10:22:17 2005 From: rj at maxxian.com (RJ Juneau) Date: Mon Jan 30 12:04:20 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505150032.644.1@bepc.1115296715.fake> Message-ID: <000201c55175$75bcad10$6505a8c0@rjlaptop> At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 11:47:14 2005 From: rj at maxxian.com (RJ Juneau) Date: Mon Jan 30 12:04:20 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c55181$549be0e0$6505a8c0@rjlaptop> Charlie, I found a fix. Here it is in case anyone else runs into this. You were correct - the problem is in another part of Zope. Based on your feedback, I did a bit more searching and found something here: http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. html The problem appears to be in Zope versions after 2.7.0. I'm running 2.7.6, and the post indicates that it also happens in 2.7.4. The solution: Edit file /lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. There are two lines in the file that start with . Edit them as follows: Change first line to: Change second line to: Just to be after, I shut down Zope before I made the changes and restarted it after. Thanks for the help! RJ -----Original Message----- From: RJ Juneau [mailto:rj@maxxian.com] Sent: May 5, 2005 9:22 AM To: 'Charlie Clark' Cc: 'egenix-users@lists.egenix.com' Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 17:57:25 2005 From: charlie at egenix.com (Charlie Clark) Date: Mon Jan 30 12:04:20 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <20050505165725.3380.2@bepc.1115296715.fake> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Thu May 5 09:15:21 2005 From: charlie at egenix.com (Charlie Clark) Date: Mon Jan 30 12:04:20 2006 Subject: [Zope-DB] RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <000001c55185$41477730$6b00a8c0@fonacier.local> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________ Zope-DB mailing list Zope-DB@zope.org http://mail.zope.org/mailman/listinfo/zope-db From rj at maxxian.com Thu May 5 12:38:00 2005 From: rj at maxxian.com (RJ Juneau) Date: Mon Jan 30 12:04:20 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000001c55188$6b841eb0$6505a8c0@rjlaptop> I just double-checked. Zope-2.7.6-final. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 12:49:16 2005 From: rj at maxxian.com (RJ Juneau) Date: Mon Jan 30 12:04:20 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000501c55189$fe149ba0$6505a8c0@rjlaptop> Charlie, The fix has only been applied for 2.7.7, 2.8b2. The info is in the original bug report which is closed and can be found here: http://www.zope.org/Collectors/Zope/1745 RJ -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Fri May 6 11:50:09 2005 From: rj at maxxian.com (RJ Juneau) Date: Mon Jan 30 12:04:20 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC Message-ID: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Still on eval for the product. I cannot get a stable connection to Sybase via the iODBC drivers. - The Sybase ODBC connection - including a query - have been verified at the iODBC level. - The setup is already working well for ODBC connection to MySQL. Symptoms include: - If I click on "Open Connection", it still comes back with "Connection Closed" when I go to a ZSQL method - Using 'Connect on Demand' is not working either. - Clicking "Open Connection" gives me the following error: Connection string: DSN=lixbox_sybase; UID=sa; PWD=XXXXXXX Connection pool entry: 0 Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection rejected by data source', 7952) The odbc.ini definition for DSN "lixbox_sybase" is as follows: [lixbox_sybase] JetFix = No NoRowSetSizeLimit = No Description = Test connection to listbox Options = LIXBOX DSQUERY = SQLSERVER TDSHOST = lixbox TDSPORT = 5000 TDSVER = 5.0 SQLSERVER_CATALOG = N CURSOR_SENSITIVITY = LOW UserName = sa Password = XXXXXXXX ServerType = Sybase 10/11/12 Driver = /opt/openlink/lib/sql_mt_lt.so Database = pubs2 ReadOnly = no NoAutoCommit = No NoLoginBox = No FetchBufferSize = 60 Other relevant data: - Connecting via OpenLink's iODBC - Zope 2.7.6-final - Python 2.3.4 - Connection to Sybase has been successfully tested with iODBC, including issuing a query - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC connection RJ Juneau Chief Technology Officer Maxxian Integration Inc. 155 Westhampton Drive Thornhill, Ontario Canada L4J 7X2 E-mail: rj@maxxian.com Phone: +1 905 482 9429 Cell: +1 416 897 6682 Toll free: +1 866 758 9161 Fax: +1 647 722 2038 -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050506/aef33361/attachment-0070.htm From mal at egenix.com Fri May 6 18:27:37 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 30 12:04:20 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC In-Reply-To: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> References: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Message-ID: <427B8CE9.1010601@egenix.com> RJ Juneau wrote: > Still on eval for the product. > > I cannot get a stable connection to Sybase via the iODBC drivers. > > - The Sybase ODBC connection - including a query - have been verified at > the iODBC level. > - The setup is already working well for ODBC connection to MySQL. > > Symptoms include: > > - If I click on "Open Connection", it still comes back with "Connection > Closed" when I go to a ZSQL method > - Using 'Connect on Demand' is not working either. > - Clicking "Open Connection" gives me the following error: > > Connection string: DSN=lixbox_sybase; > UID=sa; > PWD=XXXXXXX Try writing the connection string on one line and without whitespace. ODBC drivers sometimes have problems with this. > Connection pool entry: 0 > Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection > rejected by data source', 7952) This is a generic error that relates to authentication or firewall problems. It is possible that turning on ODBC tracing the ODBC manager will give more clues as to the real cause of the problem. > The odbc.ini definition for DSN "lixbox_sybase" is as follows: > > [lixbox_sybase] > JetFix = No > NoRowSetSizeLimit = No > Description = Test connection to listbox > Options = LIXBOX > DSQUERY = SQLSERVER > TDSHOST = lixbox > TDSPORT = 5000 > TDSVER = 5.0 > SQLSERVER_CATALOG = N > CURSOR_SENSITIVITY = LOW > UserName = sa > Password = XXXXXXXX > ServerType = Sybase 10/11/12 > Driver = /opt/openlink/lib/sql_mt_lt.so > Database = pubs2 > ReadOnly = no > NoAutoCommit = No > NoLoginBox = No > FetchBufferSize = 60 > > > Other relevant data: > - Connecting via OpenLink's iODBC > - Zope 2.7.6-final > - Python 2.3.4 > - Connection to Sybase has been successfully tested with iODBC, > including issuing a query > - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC > connection > > > > RJ Juneau > Chief Technology Officer > Maxxian Integration Inc. > 155 Westhampton Drive > Thornhill, Ontario > Canada L4J 7X2 > E-mail: rj@maxxian.com > Phone: +1 905 482 9429 > Cell: +1 416 897 6682 > Toll free: +1 866 758 9161 > Fax: +1 647 722 2038 > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 06 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From calisp at gmail.com Sun May 15 23:49:03 2005 From: calisp at gmail.com (calisp@gmail.com) Date: Mon Jan 30 12:04:20 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK Message-ID: Hi, I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the following error... 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the last phase of a two-phase commit. This shouldn't happen. Traceback (most recent call last): File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one jar.tpc_finish(self) File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish try: self._finish() File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could not perform COMMIT or ROLLBACK', 1023) What could be causing this? Can I get the mxODBCZopeDA source from somewhere? It would make debugging this much easier. Thanks, Calisp. From mal at egenix.com Mon May 16 13:52:12 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 30 12:04:20 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK In-Reply-To: References: Message-ID: <42887B5C.4010109@egenix.com> calisp@gmail.com wrote: > Hi, > > I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with > unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the > following error... > > 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the > last phase of a two-phase commit. This shouldn't happen. > Traceback (most recent call last): > File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one > jar.tpc_finish(self) > File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish > try: self._finish() > File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish > File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler > ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could > not perform COMMIT or ROLLBACK', 1023) You should have a look at the database logs to see what prevented the commit from being completed. > What could be causing this? Hard to say: mxODBCZopeDA is trying to commit the transaction, but the driver or database failed to complete the request. The above error was generated by the ODBC driver. This could be network or DNS problems, or be related to a bug in FreeTDS (which is getting more stable with every new release, but should still be considered beta quality software at the moment). > Can I get the mxODBCZopeDA source from > somewhere? It would make debugging this much easier. Getting the source is not an option and won't help much either since the source of the problem is not mxODBCZopeDA. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 16 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Sun May 1 21:29:25 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 30 16:04:36 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <427259F3.4090806@egenix.com> References: <20050427130906.52878.qmail@web30008.mail.mud.yahoo.com> <427259F3.4090806@egenix.com> Message-ID: <42752005.7080904@egenix.com> M.-A. Lemburg wrote: > David Rushby wrote: > >> --- "M.-A. Lemburg" wrote: >> >>> Are you using the standard mxDateTime build or one >>> with WANT_SUBCLASSABLE_TYPES defined... >> >> >> >> Presumably "the standard", since I just built with 'py24d setup.py >> build', making no attempt to enable special directives. >> >> >>> ... (mxDateTime_Deallocate is only used by the latter)? >> >> >> >> That's true in 2.1.0-2005-04-15, but not in 2.1.0b5. >> >> >>> In any case, please try our latest snapshot: >>> >>> >> >> http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-04-15.zip >> >>> to see if that makes any difference. >> >> >> >> I can't build it out of the box: > > > Hmm, looks like distutils' sdist command doesn't like our new > repository layout which uses symlinks (after we've switched to > subversion). > > We'll have to debug distutils first, I guess :-( Ok, we've found the problem and fixed it. Here's the new release (which does build out of the box at least on our boxes ;-): http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 01 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From davidrushby at yahoo.com Mon May 2 15:49:53 2005 From: davidrushby at yahoo.com (David Rushby) Date: Mon Jan 30 16:04:37 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Ok, we've found the problem and fixed it. Here's the new > release (which does build out of the box at least on our > boxes ;-): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip It does build now, but: py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" still behaves as it did when I submitted my original message: Fatal Python error: UNREF invalid object Aborted This is the same debug build of Python 2.4.1 that I was previously using, running the same configuration (CentOS Linux 4.0/i386, everything compiled with GCC 3.4.3). Have you examined my original claim as to the cause of the bug? __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 10:21:55 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 30 16:04:37 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> References: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> Message-ID: <42772693.8050306@egenix.com> David Rushby wrote: > --- "M.-A. Lemburg" wrote: > >>Ok, we've found the problem and fixed it. Here's the new >>release (which does build out of the box at least on our >>boxes ;-): >> >> > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip > > It does build now, but: > py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" > still behaves as it did when I submitted my original message: > Fatal Python error: UNREF invalid object > Aborted > > This is the same debug build of Python 2.4.1 that I was previously > using, running the same configuration (CentOS Linux 4.0/i386, > everything compiled with GCC 3.4.3). > > Have you examined my original claim as to the cause of the bug? No. We haven't had time for looking into it. I'm not sure whether your analysis of the problem is correct: if you don't define WANT_SUBCLASSABLE_TYPES, the API mxDateTime_Deallocate() is neither defined nor used. Furthermore, PyObject_Del() is only called by mxDateTime_Free() if you have explicitely edited mxDateTime.c to disabled the free list #defines. In a standard build, PyObject_Del() is only called at module finalization time. Note that the reason we call mxDateTime_Free() in the constructor is that we don't want the destructor of the object to be called. Py_DECREF() would call the destructor (mxDateTime_Deallocate). It is possible that the debug code in Python complains about the refcount in the object not being 0 at the time the object is finalized (module finalization time), but I don't see any such checks in PyObject_Free() (which is what PyObject_Del() maps to). Again, all of this does not happen in regular non-debug Python builds. Please be aware that we don't support debug builds, so fixing the problem (if there is one - gcc has some serious optimization problems on some combinations of platform and version) will take a while. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 09:27:37 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Mon Jan 30 16:04:37 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 Message-ID: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Hi all- I am trying to build the mx-base package, v.2.0.6. This will be used with postgresql 7.3.9, psycopg 1.1.18, and Roundup 0.8.2. RHEL 3.0 Python 2.3 egenix-mx-base-2.0.6.tar.gz I performed a: /usr/local/bin/python2.3 setup.py install Everything looks proper with the exeception of this series of warning statements: ----------------- gcc -pthread -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fno-strict-aliasing -fPIC -Imx/BeeBase/mxBeeBase -I/usr/local/incl ude/python2.3 -I/usr/local/include -c mx/BeeBase/mxBeeBase/btr.c -o build/temp.linux-i686-2.3/mx/BeeBase/mxBeeBase/mxBeeBa se/mx/BeeBase/mxBeeBase/btr.o mx/BeeBase/mxBeeBase/btr.c: In function `dumpBuf': mx/BeeBase/mxBeeBase/btr.c:249: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:250: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:255: warning: unsigned int format, long unsigned int arg (arg 4) mx/BeeBase/mxBeeBase/btr.c:256: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c: In function `_validateTree': mx/BeeBase/mxBeeBase/btr.c:330: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:337: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:339: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:349: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:351: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 3) creating build/lib.linux-i686-2.3/mx/BeeBase creating build/lib.linux-i686-2.3/mx/BeeBase/mxBeeBase -------------- Would someone be kind enough to let me know whether these messages were expected, and if not, how I might resolve these? Thanks! DC __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 22:06:33 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 30 16:04:37 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> References: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Message-ID: <4277CBB9.8020302@egenix.com> Dianne Chen wrote: > Hi all- > > I am trying to build the mx-base package, v.2.0.6. > This will be used with postgresql 7.3.9, psycopg > 1.1.18, and Roundup 0.8.2. > > RHEL 3.0 > Python 2.3 > egenix-mx-base-2.0.6.tar.gz > > I performed a: > > /usr/local/bin/python2.3 setup.py install > > Everything looks proper with the exeception of this > series of warning statements: > > ----------------- > ... > -------------- > > Would someone be kind enough to let me know whether > these messages were expected, and if not, how I might > resolve these? These warning can safely be ignored. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 13:41:14 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Mon Jan 30 16:04:37 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: 6667 Message-ID: <20050503194114.72091.qmail@web31414.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Dianne Chen wrote: > > Hi all- > > > > I am trying to build the mx-base package, v.2.0.6. > > This will be used with postgresql 7.3.9, psycopg > > 1.1.18, and Roundup 0.8.2. > > > > RHEL 3.0 > > Python 2.3 > > egenix-mx-base-2.0.6.tar.gz > > > > I performed a: > > > > /usr/local/bin/python2.3 setup.py install > > > > Everything looks proper with the exeception of > this > > series of warning statements: > > > > ----------------- > > ... > > -------------- > > > > Would someone be kind enough to let me know > whether > > these messages were expected, and if not, how I > might > > resolve these? > > These warning can safely be ignored. > > -- > Marc-Andre Lemburg > eGenix.com > Marc- Thank you very much for the reply. It helps greatly. With kind regards, DC __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From davidrushby at yahoo.com Tue May 3 17:18:46 2005 From: davidrushby at yahoo.com (David Rushby) Date: Mon Jan 30 16:04:37 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050503231846.35012.qmail@web30009.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > I'm not sure whether your analysis of the problem is correct... Indeed, my original analysis wasn't correct; I think this one is. The fatal error I'm complaining about only arises if the arguments to DateTime.DateTime are invalid, so that the object is deallocated in the onError block of mxDateTime_FromDateAndTime. If the object is created successfully, and later deallocated by Python's garbage collector, the fatal error doesn't arise. Here's my analysis of the problem: --- If the debugging directive Py_TRACE_REFS is enabled, as it is in my case, the Python interpreter maintains a doubly linked list of all Python objects (named refchain) via the _ob_next and _ob_prev pointers added to PyObject via _PyObject_HEAD_EXTRA. Each object is inserted into refchain by the _Py_AddToAllObjects call in _Py_NewReference, and removed from refchain by the _Py_ForgetReference call in _Py_Dealloc. _Py_ForgetReference performs an integrity check on the object being deallocated (op) to make sure that its neighbors in refchain recognize it. Specifically, _Py_ForgetReference verifies that the _ob_next pointer of the previous object in refchain (op->_ob_prev->_ob_next) points to op, and that the _ob_prev pointer of the next object in refchain (op->_ob_next->_ob_prev) points to op. If either of those conditions is false, the interpreter raises the fatal error I'm seeing. After mxDateTime_New pulls an mxDateTimeObject out of the free list, it calls _Py_NewReference on that object to transform it from a "conceptually deallocated" object to a "conceptually allocated" one. _Py_NewReference inserts the object into refchain. Later, when the object is being "conceptually deallocated", it should be removed from refchain with _Py_ForgetReference. The version of _Py_Dealloc that's active when Py_TRACE_REFS is enabled does this (_Py_Dealloc is the element of Py_DECREF that performs the actual destruction). _Py_Dealloc first calls _Py_ForgetReference to remove the object from refchain, then calls the object's destructor (op->ob_type->tp_dealloc). If WANT_SUBCLASSABLE_TYPES is not defined (it is not in my case), the destructor for mxDateTime_Type is mxDateTime_Free. So, if a DateTime object is deallocated normally, as a result of its reference count falling to zero, _Py_Dealloc is called on the object, which first removes it from refchain, then passes it to mxDateTime_Free. If a DateTime object is destroyed prematurely, as a result of invalid arguments to its destructor, the onError handler calls mxDateTime_Free, so the object is "conceptually deallocated" (placed in the free list), *but* the object is not removed from refchain. So if a refchain-membership-integrity-check is performed on the object in question or one of its immediate neighbors in refchain, that integrity check fails, leading to the fatal error. --- The solution is to 'Py_DECREF(...)' the object in the onError handler of its constructor, instead of passing the object directly to mxDateTime_Free. That change solves two problems: 1) It causes _Py_Dealloc to execute, which in turn executes _Py_ForgetReference, so the object is removed from refchain, as it should be. 2) At present, objects that are created successfully and later deallocated by normal reference count mechanics have a reference count of 0 when they enter the free list, whereas objects whose constructors abort their creation due to invalid arguments have a reference count of 1 when they enter the free list. Although AFAIK this doesn't cause an actual execution problem (because the object's reference count is *explicitly set to 1* rather than *incremented by 1* when the object is later "conceptually allocated" by _Py_NewReference), it is likely to confuse future maintainers and thereby lead to the introduction of an actual execution problem. I assume that if you agree that this is a reasonable solution, you'll want to apply the change not only to mxDateTime_FromDateAndTime, but to all similar constructors in mxDateTime.c. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From rj at maxxian.com Thu May 5 01:57:40 2005 From: rj at maxxian.com (RJ Juneau) Date: Mon Jan 30 16:04:39 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c5512e$f72798c0$6505a8c0@rjlaptop> I'm on the 30 day evaluation for mxodbc_zope_da. I'm getting the following error when I submit some queries: Error Type: KeyError Error Value: 'query' I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 with UCS4. The error seems to be caused by multiple rows being returned. I did see an earlier posting with the same error message. The response suggested a template error, but this is clearly not the case here. The additional evidence I've gathered so far: - I'm running the test directly from the ZSQL method, so there's no template involved. - If I use the same query with an additional "where" clause to ensure that only one row is returned, it works - If I use a value in the 'where' clause with no rows returned, it works - The same ZSQL query is being used on a Windows machine running Zope and the free ZODBC module without a problem - The query has been verified directly in mysql-client-browser Other info: - The database is MySQL 4.1.10A-0 - iODBC is the DB driver RJ Juneau -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050505/68d278bf/attachment-0071.htm From mal at egenix.com Thu May 5 12:37:43 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 30 16:04:39 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c5512e$f72798c0$6505a8c0@rjlaptop> References: <000301c5512e$f72798c0$6505a8c0@rjlaptop> Message-ID: <4279E967.6010904@egenix.com> RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 > with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 09:37:42 2005 From: rj at maxxian.com (RJ Juneau) Date: Mon Jan 30 16:04:39 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000101c5516f$3b96de90$6505a8c0@rjlaptop> More interesting info on the problem: If I execute the query directly in the "test" window of the base eGenix mxODBC Database Connection window, it works fine and returns the 20 lines expected. That could point to a problem in the rendering, which seems to be where the traceback ends. Note that within the same Zope system I also have an ODBC connection to a Sybase database, and I have successfully tested multi-line ZSQL queries there. This is the traceback: Time 2005/05/05 07:55:15.294 GMT-4 Exception Type KeyError Exception Value 'query' Traceback (innermost last): Module ZPublisher.Publish, line 101, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 39, in call_object Module Shared.DC.ZRDB.DA, line 337, in manage_test Module DocumentTemplate.DT_String, line 474, in __call__ Module DocumentTemplate.DT_In, line 602, in renderwb Module DocumentTemplate.DT_Var, line 219, in render KeyError: 'query' I don't think the following is an issue, but I'll include it for completeness.I am also getting the following iODBC warnings and errors in the Zope console log, which are related to the ODBC parameters being passed by iODBC. Note that these errors also appear for all of the successful queries. [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (Setup). [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (UsageCount). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Timeout). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Reuse). As for the ZSQL snippet from the template... Since there's no template involved yet (I'm still testing directly from the ZSQL method), I assume you mean the SQL code? select h.host_name, s.system_name, s.system_handle, count(*) from terminal t, system_map s, host h where t.system_index = s.system_index and s.host_index = h.host_index group by s.system_name order by h.host_name Nothing complicated here. There are no parameters passed to the query. RJ -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: May 5, 2005 5:38 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: Re: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is > 2.3.4 with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ---------------------------------------------------------------------- > -- > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 16:00:32 2005 From: charlie at egenix.com (Charlie Clark) Date: Mon Jan 30 16:04:39 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000101c5516f$3b96de90$6505a8c0@rjlaptop> References: <000101c5516f$3b96de90$6505a8c0@rjlaptop> Message-ID: <20050505150032.644.1@bepc.1115296715.fake> On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base eGenix > mxODBC Database Connection window, it works fine and returns the 20 > lines expected. That could point to a problem in the rendering, which > seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection to > a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 10:22:17 2005 From: rj at maxxian.com (RJ Juneau) Date: Mon Jan 30 16:04:39 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505150032.644.1@bepc.1115296715.fake> Message-ID: <000201c55175$75bcad10$6505a8c0@rjlaptop> At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 11:47:14 2005 From: rj at maxxian.com (RJ Juneau) Date: Mon Jan 30 16:04:39 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c55181$549be0e0$6505a8c0@rjlaptop> Charlie, I found a fix. Here it is in case anyone else runs into this. You were correct - the problem is in another part of Zope. Based on your feedback, I did a bit more searching and found something here: http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. html The problem appears to be in Zope versions after 2.7.0. I'm running 2.7.6, and the post indicates that it also happens in 2.7.4. The solution: Edit file /lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. There are two lines in the file that start with . Edit them as follows: Change first line to: Change second line to: Just to be after, I shut down Zope before I made the changes and restarted it after. Thanks for the help! RJ -----Original Message----- From: RJ Juneau [mailto:rj@maxxian.com] Sent: May 5, 2005 9:22 AM To: 'Charlie Clark' Cc: 'egenix-users@lists.egenix.com' Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 17:57:25 2005 From: charlie at egenix.com (Charlie Clark) Date: Mon Jan 30 16:04:39 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <20050505165725.3380.2@bepc.1115296715.fake> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Thu May 5 09:15:21 2005 From: charlie at egenix.com (Charlie Clark) Date: Mon Jan 30 16:04:39 2006 Subject: [Zope-DB] RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <000001c55185$41477730$6b00a8c0@fonacier.local> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________ Zope-DB mailing list Zope-DB@zope.org http://mail.zope.org/mailman/listinfo/zope-db From rj at maxxian.com Thu May 5 12:38:00 2005 From: rj at maxxian.com (RJ Juneau) Date: Mon Jan 30 16:04:39 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000001c55188$6b841eb0$6505a8c0@rjlaptop> I just double-checked. Zope-2.7.6-final. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 12:49:16 2005 From: rj at maxxian.com (RJ Juneau) Date: Mon Jan 30 16:04:39 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000501c55189$fe149ba0$6505a8c0@rjlaptop> Charlie, The fix has only been applied for 2.7.7, 2.8b2. The info is in the original bug report which is closed and can be found here: http://www.zope.org/Collectors/Zope/1745 RJ -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Fri May 6 11:50:09 2005 From: rj at maxxian.com (RJ Juneau) Date: Mon Jan 30 16:04:39 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC Message-ID: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Still on eval for the product. I cannot get a stable connection to Sybase via the iODBC drivers. - The Sybase ODBC connection - including a query - have been verified at the iODBC level. - The setup is already working well for ODBC connection to MySQL. Symptoms include: - If I click on "Open Connection", it still comes back with "Connection Closed" when I go to a ZSQL method - Using 'Connect on Demand' is not working either. - Clicking "Open Connection" gives me the following error: Connection string: DSN=lixbox_sybase; UID=sa; PWD=XXXXXXX Connection pool entry: 0 Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection rejected by data source', 7952) The odbc.ini definition for DSN "lixbox_sybase" is as follows: [lixbox_sybase] JetFix = No NoRowSetSizeLimit = No Description = Test connection to listbox Options = LIXBOX DSQUERY = SQLSERVER TDSHOST = lixbox TDSPORT = 5000 TDSVER = 5.0 SQLSERVER_CATALOG = N CURSOR_SENSITIVITY = LOW UserName = sa Password = XXXXXXXX ServerType = Sybase 10/11/12 Driver = /opt/openlink/lib/sql_mt_lt.so Database = pubs2 ReadOnly = no NoAutoCommit = No NoLoginBox = No FetchBufferSize = 60 Other relevant data: - Connecting via OpenLink's iODBC - Zope 2.7.6-final - Python 2.3.4 - Connection to Sybase has been successfully tested with iODBC, including issuing a query - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC connection RJ Juneau Chief Technology Officer Maxxian Integration Inc. 155 Westhampton Drive Thornhill, Ontario Canada L4J 7X2 E-mail: rj@maxxian.com Phone: +1 905 482 9429 Cell: +1 416 897 6682 Toll free: +1 866 758 9161 Fax: +1 647 722 2038 -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050506/aef33361/attachment-0071.htm From mal at egenix.com Fri May 6 18:27:37 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 30 16:04:40 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC In-Reply-To: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> References: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Message-ID: <427B8CE9.1010601@egenix.com> RJ Juneau wrote: > Still on eval for the product. > > I cannot get a stable connection to Sybase via the iODBC drivers. > > - The Sybase ODBC connection - including a query - have been verified at > the iODBC level. > - The setup is already working well for ODBC connection to MySQL. > > Symptoms include: > > - If I click on "Open Connection", it still comes back with "Connection > Closed" when I go to a ZSQL method > - Using 'Connect on Demand' is not working either. > - Clicking "Open Connection" gives me the following error: > > Connection string: DSN=lixbox_sybase; > UID=sa; > PWD=XXXXXXX Try writing the connection string on one line and without whitespace. ODBC drivers sometimes have problems with this. > Connection pool entry: 0 > Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection > rejected by data source', 7952) This is a generic error that relates to authentication or firewall problems. It is possible that turning on ODBC tracing the ODBC manager will give more clues as to the real cause of the problem. > The odbc.ini definition for DSN "lixbox_sybase" is as follows: > > [lixbox_sybase] > JetFix = No > NoRowSetSizeLimit = No > Description = Test connection to listbox > Options = LIXBOX > DSQUERY = SQLSERVER > TDSHOST = lixbox > TDSPORT = 5000 > TDSVER = 5.0 > SQLSERVER_CATALOG = N > CURSOR_SENSITIVITY = LOW > UserName = sa > Password = XXXXXXXX > ServerType = Sybase 10/11/12 > Driver = /opt/openlink/lib/sql_mt_lt.so > Database = pubs2 > ReadOnly = no > NoAutoCommit = No > NoLoginBox = No > FetchBufferSize = 60 > > > Other relevant data: > - Connecting via OpenLink's iODBC > - Zope 2.7.6-final > - Python 2.3.4 > - Connection to Sybase has been successfully tested with iODBC, > including issuing a query > - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC > connection > > > > RJ Juneau > Chief Technology Officer > Maxxian Integration Inc. > 155 Westhampton Drive > Thornhill, Ontario > Canada L4J 7X2 > E-mail: rj@maxxian.com > Phone: +1 905 482 9429 > Cell: +1 416 897 6682 > Toll free: +1 866 758 9161 > Fax: +1 647 722 2038 > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 06 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From calisp at gmail.com Sun May 15 23:49:03 2005 From: calisp at gmail.com (calisp@gmail.com) Date: Mon Jan 30 16:04:40 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK Message-ID: Hi, I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the following error... 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the last phase of a two-phase commit. This shouldn't happen. Traceback (most recent call last): File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one jar.tpc_finish(self) File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish try: self._finish() File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could not perform COMMIT or ROLLBACK', 1023) What could be causing this? Can I get the mxODBCZopeDA source from somewhere? It would make debugging this much easier. Thanks, Calisp. From mal at egenix.com Mon May 16 13:52:12 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 30 16:04:40 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK In-Reply-To: References: Message-ID: <42887B5C.4010109@egenix.com> calisp@gmail.com wrote: > Hi, > > I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with > unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the > following error... > > 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the > last phase of a two-phase commit. This shouldn't happen. > Traceback (most recent call last): > File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one > jar.tpc_finish(self) > File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish > try: self._finish() > File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish > File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler > ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could > not perform COMMIT or ROLLBACK', 1023) You should have a look at the database logs to see what prevented the commit from being completed. > What could be causing this? Hard to say: mxODBCZopeDA is trying to commit the transaction, but the driver or database failed to complete the request. The above error was generated by the ODBC driver. This could be network or DNS problems, or be related to a bug in FreeTDS (which is getting more stable with every new release, but should still be considered beta quality software at the moment). > Can I get the mxODBCZopeDA source from > somewhere? It would make debugging this much easier. Getting the source is not an option and won't help much either since the source of the problem is not mxODBCZopeDA. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 16 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Sun May 1 21:29:25 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 30 20:02:33 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <427259F3.4090806@egenix.com> References: <20050427130906.52878.qmail@web30008.mail.mud.yahoo.com> <427259F3.4090806@egenix.com> Message-ID: <42752005.7080904@egenix.com> M.-A. Lemburg wrote: > David Rushby wrote: > >> --- "M.-A. Lemburg" wrote: >> >>> Are you using the standard mxDateTime build or one >>> with WANT_SUBCLASSABLE_TYPES defined... >> >> >> >> Presumably "the standard", since I just built with 'py24d setup.py >> build', making no attempt to enable special directives. >> >> >>> ... (mxDateTime_Deallocate is only used by the latter)? >> >> >> >> That's true in 2.1.0-2005-04-15, but not in 2.1.0b5. >> >> >>> In any case, please try our latest snapshot: >>> >>> >> >> http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-04-15.zip >> >>> to see if that makes any difference. >> >> >> >> I can't build it out of the box: > > > Hmm, looks like distutils' sdist command doesn't like our new > repository layout which uses symlinks (after we've switched to > subversion). > > We'll have to debug distutils first, I guess :-( Ok, we've found the problem and fixed it. Here's the new release (which does build out of the box at least on our boxes ;-): http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 01 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From davidrushby at yahoo.com Mon May 2 15:49:53 2005 From: davidrushby at yahoo.com (David Rushby) Date: Mon Jan 30 20:02:33 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Ok, we've found the problem and fixed it. Here's the new > release (which does build out of the box at least on our > boxes ;-): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip It does build now, but: py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" still behaves as it did when I submitted my original message: Fatal Python error: UNREF invalid object Aborted This is the same debug build of Python 2.4.1 that I was previously using, running the same configuration (CentOS Linux 4.0/i386, everything compiled with GCC 3.4.3). Have you examined my original claim as to the cause of the bug? __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 10:21:55 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 30 20:02:33 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> References: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> Message-ID: <42772693.8050306@egenix.com> David Rushby wrote: > --- "M.-A. Lemburg" wrote: > >>Ok, we've found the problem and fixed it. Here's the new >>release (which does build out of the box at least on our >>boxes ;-): >> >> > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip > > It does build now, but: > py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" > still behaves as it did when I submitted my original message: > Fatal Python error: UNREF invalid object > Aborted > > This is the same debug build of Python 2.4.1 that I was previously > using, running the same configuration (CentOS Linux 4.0/i386, > everything compiled with GCC 3.4.3). > > Have you examined my original claim as to the cause of the bug? No. We haven't had time for looking into it. I'm not sure whether your analysis of the problem is correct: if you don't define WANT_SUBCLASSABLE_TYPES, the API mxDateTime_Deallocate() is neither defined nor used. Furthermore, PyObject_Del() is only called by mxDateTime_Free() if you have explicitely edited mxDateTime.c to disabled the free list #defines. In a standard build, PyObject_Del() is only called at module finalization time. Note that the reason we call mxDateTime_Free() in the constructor is that we don't want the destructor of the object to be called. Py_DECREF() would call the destructor (mxDateTime_Deallocate). It is possible that the debug code in Python complains about the refcount in the object not being 0 at the time the object is finalized (module finalization time), but I don't see any such checks in PyObject_Free() (which is what PyObject_Del() maps to). Again, all of this does not happen in regular non-debug Python builds. Please be aware that we don't support debug builds, so fixing the problem (if there is one - gcc has some serious optimization problems on some combinations of platform and version) will take a while. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 09:27:37 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Mon Jan 30 20:02:33 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 Message-ID: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Hi all- I am trying to build the mx-base package, v.2.0.6. This will be used with postgresql 7.3.9, psycopg 1.1.18, and Roundup 0.8.2. RHEL 3.0 Python 2.3 egenix-mx-base-2.0.6.tar.gz I performed a: /usr/local/bin/python2.3 setup.py install Everything looks proper with the exeception of this series of warning statements: ----------------- gcc -pthread -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fno-strict-aliasing -fPIC -Imx/BeeBase/mxBeeBase -I/usr/local/incl ude/python2.3 -I/usr/local/include -c mx/BeeBase/mxBeeBase/btr.c -o build/temp.linux-i686-2.3/mx/BeeBase/mxBeeBase/mxBeeBa se/mx/BeeBase/mxBeeBase/btr.o mx/BeeBase/mxBeeBase/btr.c: In function `dumpBuf': mx/BeeBase/mxBeeBase/btr.c:249: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:250: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:255: warning: unsigned int format, long unsigned int arg (arg 4) mx/BeeBase/mxBeeBase/btr.c:256: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c: In function `_validateTree': mx/BeeBase/mxBeeBase/btr.c:330: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:337: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:339: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:349: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:351: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 3) creating build/lib.linux-i686-2.3/mx/BeeBase creating build/lib.linux-i686-2.3/mx/BeeBase/mxBeeBase -------------- Would someone be kind enough to let me know whether these messages were expected, and if not, how I might resolve these? Thanks! DC __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 22:06:33 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 30 20:02:33 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> References: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Message-ID: <4277CBB9.8020302@egenix.com> Dianne Chen wrote: > Hi all- > > I am trying to build the mx-base package, v.2.0.6. > This will be used with postgresql 7.3.9, psycopg > 1.1.18, and Roundup 0.8.2. > > RHEL 3.0 > Python 2.3 > egenix-mx-base-2.0.6.tar.gz > > I performed a: > > /usr/local/bin/python2.3 setup.py install > > Everything looks proper with the exeception of this > series of warning statements: > > ----------------- > ... > -------------- > > Would someone be kind enough to let me know whether > these messages were expected, and if not, how I might > resolve these? These warning can safely be ignored. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 13:41:14 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Mon Jan 30 20:02:33 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: 6667 Message-ID: <20050503194114.72091.qmail@web31414.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Dianne Chen wrote: > > Hi all- > > > > I am trying to build the mx-base package, v.2.0.6. > > This will be used with postgresql 7.3.9, psycopg > > 1.1.18, and Roundup 0.8.2. > > > > RHEL 3.0 > > Python 2.3 > > egenix-mx-base-2.0.6.tar.gz > > > > I performed a: > > > > /usr/local/bin/python2.3 setup.py install > > > > Everything looks proper with the exeception of > this > > series of warning statements: > > > > ----------------- > > ... > > -------------- > > > > Would someone be kind enough to let me know > whether > > these messages were expected, and if not, how I > might > > resolve these? > > These warning can safely be ignored. > > -- > Marc-Andre Lemburg > eGenix.com > Marc- Thank you very much for the reply. It helps greatly. With kind regards, DC __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From davidrushby at yahoo.com Tue May 3 17:18:46 2005 From: davidrushby at yahoo.com (David Rushby) Date: Mon Jan 30 20:02:33 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050503231846.35012.qmail@web30009.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > I'm not sure whether your analysis of the problem is correct... Indeed, my original analysis wasn't correct; I think this one is. The fatal error I'm complaining about only arises if the arguments to DateTime.DateTime are invalid, so that the object is deallocated in the onError block of mxDateTime_FromDateAndTime. If the object is created successfully, and later deallocated by Python's garbage collector, the fatal error doesn't arise. Here's my analysis of the problem: --- If the debugging directive Py_TRACE_REFS is enabled, as it is in my case, the Python interpreter maintains a doubly linked list of all Python objects (named refchain) via the _ob_next and _ob_prev pointers added to PyObject via _PyObject_HEAD_EXTRA. Each object is inserted into refchain by the _Py_AddToAllObjects call in _Py_NewReference, and removed from refchain by the _Py_ForgetReference call in _Py_Dealloc. _Py_ForgetReference performs an integrity check on the object being deallocated (op) to make sure that its neighbors in refchain recognize it. Specifically, _Py_ForgetReference verifies that the _ob_next pointer of the previous object in refchain (op->_ob_prev->_ob_next) points to op, and that the _ob_prev pointer of the next object in refchain (op->_ob_next->_ob_prev) points to op. If either of those conditions is false, the interpreter raises the fatal error I'm seeing. After mxDateTime_New pulls an mxDateTimeObject out of the free list, it calls _Py_NewReference on that object to transform it from a "conceptually deallocated" object to a "conceptually allocated" one. _Py_NewReference inserts the object into refchain. Later, when the object is being "conceptually deallocated", it should be removed from refchain with _Py_ForgetReference. The version of _Py_Dealloc that's active when Py_TRACE_REFS is enabled does this (_Py_Dealloc is the element of Py_DECREF that performs the actual destruction). _Py_Dealloc first calls _Py_ForgetReference to remove the object from refchain, then calls the object's destructor (op->ob_type->tp_dealloc). If WANT_SUBCLASSABLE_TYPES is not defined (it is not in my case), the destructor for mxDateTime_Type is mxDateTime_Free. So, if a DateTime object is deallocated normally, as a result of its reference count falling to zero, _Py_Dealloc is called on the object, which first removes it from refchain, then passes it to mxDateTime_Free. If a DateTime object is destroyed prematurely, as a result of invalid arguments to its destructor, the onError handler calls mxDateTime_Free, so the object is "conceptually deallocated" (placed in the free list), *but* the object is not removed from refchain. So if a refchain-membership-integrity-check is performed on the object in question or one of its immediate neighbors in refchain, that integrity check fails, leading to the fatal error. --- The solution is to 'Py_DECREF(...)' the object in the onError handler of its constructor, instead of passing the object directly to mxDateTime_Free. That change solves two problems: 1) It causes _Py_Dealloc to execute, which in turn executes _Py_ForgetReference, so the object is removed from refchain, as it should be. 2) At present, objects that are created successfully and later deallocated by normal reference count mechanics have a reference count of 0 when they enter the free list, whereas objects whose constructors abort their creation due to invalid arguments have a reference count of 1 when they enter the free list. Although AFAIK this doesn't cause an actual execution problem (because the object's reference count is *explicitly set to 1* rather than *incremented by 1* when the object is later "conceptually allocated" by _Py_NewReference), it is likely to confuse future maintainers and thereby lead to the introduction of an actual execution problem. I assume that if you agree that this is a reasonable solution, you'll want to apply the change not only to mxDateTime_FromDateAndTime, but to all similar constructors in mxDateTime.c. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From rj at maxxian.com Thu May 5 01:57:40 2005 From: rj at maxxian.com (RJ Juneau) Date: Mon Jan 30 20:02:34 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c5512e$f72798c0$6505a8c0@rjlaptop> I'm on the 30 day evaluation for mxodbc_zope_da. I'm getting the following error when I submit some queries: Error Type: KeyError Error Value: 'query' I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 with UCS4. The error seems to be caused by multiple rows being returned. I did see an earlier posting with the same error message. The response suggested a template error, but this is clearly not the case here. The additional evidence I've gathered so far: - I'm running the test directly from the ZSQL method, so there's no template involved. - If I use the same query with an additional "where" clause to ensure that only one row is returned, it works - If I use a value in the 'where' clause with no rows returned, it works - The same ZSQL query is being used on a Windows machine running Zope and the free ZODBC module without a problem - The query has been verified directly in mysql-client-browser Other info: - The database is MySQL 4.1.10A-0 - iODBC is the DB driver RJ Juneau -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050505/68d278bf/attachment-0072.htm From mal at egenix.com Thu May 5 12:37:43 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 30 20:02:34 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c5512e$f72798c0$6505a8c0@rjlaptop> References: <000301c5512e$f72798c0$6505a8c0@rjlaptop> Message-ID: <4279E967.6010904@egenix.com> RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 > with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 09:37:42 2005 From: rj at maxxian.com (RJ Juneau) Date: Mon Jan 30 20:02:34 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000101c5516f$3b96de90$6505a8c0@rjlaptop> More interesting info on the problem: If I execute the query directly in the "test" window of the base eGenix mxODBC Database Connection window, it works fine and returns the 20 lines expected. That could point to a problem in the rendering, which seems to be where the traceback ends. Note that within the same Zope system I also have an ODBC connection to a Sybase database, and I have successfully tested multi-line ZSQL queries there. This is the traceback: Time 2005/05/05 07:55:15.294 GMT-4 Exception Type KeyError Exception Value 'query' Traceback (innermost last): Module ZPublisher.Publish, line 101, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 39, in call_object Module Shared.DC.ZRDB.DA, line 337, in manage_test Module DocumentTemplate.DT_String, line 474, in __call__ Module DocumentTemplate.DT_In, line 602, in renderwb Module DocumentTemplate.DT_Var, line 219, in render KeyError: 'query' I don't think the following is an issue, but I'll include it for completeness.I am also getting the following iODBC warnings and errors in the Zope console log, which are related to the ODBC parameters being passed by iODBC. Note that these errors also appear for all of the successful queries. [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (Setup). [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (UsageCount). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Timeout). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Reuse). As for the ZSQL snippet from the template... Since there's no template involved yet (I'm still testing directly from the ZSQL method), I assume you mean the SQL code? select h.host_name, s.system_name, s.system_handle, count(*) from terminal t, system_map s, host h where t.system_index = s.system_index and s.host_index = h.host_index group by s.system_name order by h.host_name Nothing complicated here. There are no parameters passed to the query. RJ -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: May 5, 2005 5:38 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: Re: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is > 2.3.4 with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ---------------------------------------------------------------------- > -- > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 16:00:32 2005 From: charlie at egenix.com (Charlie Clark) Date: Mon Jan 30 20:02:34 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000101c5516f$3b96de90$6505a8c0@rjlaptop> References: <000101c5516f$3b96de90$6505a8c0@rjlaptop> Message-ID: <20050505150032.644.1@bepc.1115296715.fake> On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base eGenix > mxODBC Database Connection window, it works fine and returns the 20 > lines expected. That could point to a problem in the rendering, which > seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection to > a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 10:22:17 2005 From: rj at maxxian.com (RJ Juneau) Date: Mon Jan 30 20:02:34 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505150032.644.1@bepc.1115296715.fake> Message-ID: <000201c55175$75bcad10$6505a8c0@rjlaptop> At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 11:47:14 2005 From: rj at maxxian.com (RJ Juneau) Date: Mon Jan 30 20:02:34 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c55181$549be0e0$6505a8c0@rjlaptop> Charlie, I found a fix. Here it is in case anyone else runs into this. You were correct - the problem is in another part of Zope. Based on your feedback, I did a bit more searching and found something here: http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. html The problem appears to be in Zope versions after 2.7.0. I'm running 2.7.6, and the post indicates that it also happens in 2.7.4. The solution: Edit file /lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. There are two lines in the file that start with . Edit them as follows: Change first line to: Change second line to: Just to be after, I shut down Zope before I made the changes and restarted it after. Thanks for the help! RJ -----Original Message----- From: RJ Juneau [mailto:rj@maxxian.com] Sent: May 5, 2005 9:22 AM To: 'Charlie Clark' Cc: 'egenix-users@lists.egenix.com' Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 17:57:25 2005 From: charlie at egenix.com (Charlie Clark) Date: Mon Jan 30 20:02:34 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <20050505165725.3380.2@bepc.1115296715.fake> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Thu May 5 09:15:21 2005 From: charlie at egenix.com (Charlie Clark) Date: Mon Jan 30 20:02:34 2006 Subject: [Zope-DB] RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <000001c55185$41477730$6b00a8c0@fonacier.local> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________ Zope-DB mailing list Zope-DB@zope.org http://mail.zope.org/mailman/listinfo/zope-db From rj at maxxian.com Thu May 5 12:38:00 2005 From: rj at maxxian.com (RJ Juneau) Date: Mon Jan 30 20:02:34 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000001c55188$6b841eb0$6505a8c0@rjlaptop> I just double-checked. Zope-2.7.6-final. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 12:49:16 2005 From: rj at maxxian.com (RJ Juneau) Date: Mon Jan 30 20:02:34 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000501c55189$fe149ba0$6505a8c0@rjlaptop> Charlie, The fix has only been applied for 2.7.7, 2.8b2. The info is in the original bug report which is closed and can be found here: http://www.zope.org/Collectors/Zope/1745 RJ -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Fri May 6 11:50:09 2005 From: rj at maxxian.com (RJ Juneau) Date: Mon Jan 30 20:02:34 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC Message-ID: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Still on eval for the product. I cannot get a stable connection to Sybase via the iODBC drivers. - The Sybase ODBC connection - including a query - have been verified at the iODBC level. - The setup is already working well for ODBC connection to MySQL. Symptoms include: - If I click on "Open Connection", it still comes back with "Connection Closed" when I go to a ZSQL method - Using 'Connect on Demand' is not working either. - Clicking "Open Connection" gives me the following error: Connection string: DSN=lixbox_sybase; UID=sa; PWD=XXXXXXX Connection pool entry: 0 Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection rejected by data source', 7952) The odbc.ini definition for DSN "lixbox_sybase" is as follows: [lixbox_sybase] JetFix = No NoRowSetSizeLimit = No Description = Test connection to listbox Options = LIXBOX DSQUERY = SQLSERVER TDSHOST = lixbox TDSPORT = 5000 TDSVER = 5.0 SQLSERVER_CATALOG = N CURSOR_SENSITIVITY = LOW UserName = sa Password = XXXXXXXX ServerType = Sybase 10/11/12 Driver = /opt/openlink/lib/sql_mt_lt.so Database = pubs2 ReadOnly = no NoAutoCommit = No NoLoginBox = No FetchBufferSize = 60 Other relevant data: - Connecting via OpenLink's iODBC - Zope 2.7.6-final - Python 2.3.4 - Connection to Sybase has been successfully tested with iODBC, including issuing a query - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC connection RJ Juneau Chief Technology Officer Maxxian Integration Inc. 155 Westhampton Drive Thornhill, Ontario Canada L4J 7X2 E-mail: rj@maxxian.com Phone: +1 905 482 9429 Cell: +1 416 897 6682 Toll free: +1 866 758 9161 Fax: +1 647 722 2038 -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050506/aef33361/attachment-0072.htm From mal at egenix.com Fri May 6 18:27:37 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 30 20:02:34 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC In-Reply-To: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> References: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Message-ID: <427B8CE9.1010601@egenix.com> RJ Juneau wrote: > Still on eval for the product. > > I cannot get a stable connection to Sybase via the iODBC drivers. > > - The Sybase ODBC connection - including a query - have been verified at > the iODBC level. > - The setup is already working well for ODBC connection to MySQL. > > Symptoms include: > > - If I click on "Open Connection", it still comes back with "Connection > Closed" when I go to a ZSQL method > - Using 'Connect on Demand' is not working either. > - Clicking "Open Connection" gives me the following error: > > Connection string: DSN=lixbox_sybase; > UID=sa; > PWD=XXXXXXX Try writing the connection string on one line and without whitespace. ODBC drivers sometimes have problems with this. > Connection pool entry: 0 > Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection > rejected by data source', 7952) This is a generic error that relates to authentication or firewall problems. It is possible that turning on ODBC tracing the ODBC manager will give more clues as to the real cause of the problem. > The odbc.ini definition for DSN "lixbox_sybase" is as follows: > > [lixbox_sybase] > JetFix = No > NoRowSetSizeLimit = No > Description = Test connection to listbox > Options = LIXBOX > DSQUERY = SQLSERVER > TDSHOST = lixbox > TDSPORT = 5000 > TDSVER = 5.0 > SQLSERVER_CATALOG = N > CURSOR_SENSITIVITY = LOW > UserName = sa > Password = XXXXXXXX > ServerType = Sybase 10/11/12 > Driver = /opt/openlink/lib/sql_mt_lt.so > Database = pubs2 > ReadOnly = no > NoAutoCommit = No > NoLoginBox = No > FetchBufferSize = 60 > > > Other relevant data: > - Connecting via OpenLink's iODBC > - Zope 2.7.6-final > - Python 2.3.4 > - Connection to Sybase has been successfully tested with iODBC, > including issuing a query > - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC > connection > > > > RJ Juneau > Chief Technology Officer > Maxxian Integration Inc. > 155 Westhampton Drive > Thornhill, Ontario > Canada L4J 7X2 > E-mail: rj@maxxian.com > Phone: +1 905 482 9429 > Cell: +1 416 897 6682 > Toll free: +1 866 758 9161 > Fax: +1 647 722 2038 > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 06 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From calisp at gmail.com Sun May 15 23:49:03 2005 From: calisp at gmail.com (calisp@gmail.com) Date: Mon Jan 30 20:02:34 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK Message-ID: Hi, I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the following error... 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the last phase of a two-phase commit. This shouldn't happen. Traceback (most recent call last): File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one jar.tpc_finish(self) File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish try: self._finish() File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could not perform COMMIT or ROLLBACK', 1023) What could be causing this? Can I get the mxODBCZopeDA source from somewhere? It would make debugging this much easier. Thanks, Calisp. From mal at egenix.com Mon May 16 13:52:12 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 30 20:02:34 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK In-Reply-To: References: Message-ID: <42887B5C.4010109@egenix.com> calisp@gmail.com wrote: > Hi, > > I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with > unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the > following error... > > 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the > last phase of a two-phase commit. This shouldn't happen. > Traceback (most recent call last): > File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one > jar.tpc_finish(self) > File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish > try: self._finish() > File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish > File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler > ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could > not perform COMMIT or ROLLBACK', 1023) You should have a look at the database logs to see what prevented the commit from being completed. > What could be causing this? Hard to say: mxODBCZopeDA is trying to commit the transaction, but the driver or database failed to complete the request. The above error was generated by the ODBC driver. This could be network or DNS problems, or be related to a bug in FreeTDS (which is getting more stable with every new release, but should still be considered beta quality software at the moment). > Can I get the mxODBCZopeDA source from > somewhere? It would make debugging this much easier. Getting the source is not an option and won't help much either since the source of the problem is not mxODBCZopeDA. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 16 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Sun May 1 21:29:25 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 31 08:08:34 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <427259F3.4090806@egenix.com> References: <20050427130906.52878.qmail@web30008.mail.mud.yahoo.com> <427259F3.4090806@egenix.com> Message-ID: <42752005.7080904@egenix.com> M.-A. Lemburg wrote: > David Rushby wrote: > >> --- "M.-A. Lemburg" wrote: >> >>> Are you using the standard mxDateTime build or one >>> with WANT_SUBCLASSABLE_TYPES defined... >> >> >> >> Presumably "the standard", since I just built with 'py24d setup.py >> build', making no attempt to enable special directives. >> >> >>> ... (mxDateTime_Deallocate is only used by the latter)? >> >> >> >> That's true in 2.1.0-2005-04-15, but not in 2.1.0b5. >> >> >>> In any case, please try our latest snapshot: >>> >>> >> >> http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-04-15.zip >> >>> to see if that makes any difference. >> >> >> >> I can't build it out of the box: > > > Hmm, looks like distutils' sdist command doesn't like our new > repository layout which uses symlinks (after we've switched to > subversion). > > We'll have to debug distutils first, I guess :-( Ok, we've found the problem and fixed it. Here's the new release (which does build out of the box at least on our boxes ;-): http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 01 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From davidrushby at yahoo.com Mon May 2 15:49:53 2005 From: davidrushby at yahoo.com (David Rushby) Date: Tue Jan 31 08:08:34 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Ok, we've found the problem and fixed it. Here's the new > release (which does build out of the box at least on our > boxes ;-): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip It does build now, but: py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" still behaves as it did when I submitted my original message: Fatal Python error: UNREF invalid object Aborted This is the same debug build of Python 2.4.1 that I was previously using, running the same configuration (CentOS Linux 4.0/i386, everything compiled with GCC 3.4.3). Have you examined my original claim as to the cause of the bug? __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 10:21:55 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 31 08:08:35 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> References: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> Message-ID: <42772693.8050306@egenix.com> David Rushby wrote: > --- "M.-A. Lemburg" wrote: > >>Ok, we've found the problem and fixed it. Here's the new >>release (which does build out of the box at least on our >>boxes ;-): >> >> > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip > > It does build now, but: > py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" > still behaves as it did when I submitted my original message: > Fatal Python error: UNREF invalid object > Aborted > > This is the same debug build of Python 2.4.1 that I was previously > using, running the same configuration (CentOS Linux 4.0/i386, > everything compiled with GCC 3.4.3). > > Have you examined my original claim as to the cause of the bug? No. We haven't had time for looking into it. I'm not sure whether your analysis of the problem is correct: if you don't define WANT_SUBCLASSABLE_TYPES, the API mxDateTime_Deallocate() is neither defined nor used. Furthermore, PyObject_Del() is only called by mxDateTime_Free() if you have explicitely edited mxDateTime.c to disabled the free list #defines. In a standard build, PyObject_Del() is only called at module finalization time. Note that the reason we call mxDateTime_Free() in the constructor is that we don't want the destructor of the object to be called. Py_DECREF() would call the destructor (mxDateTime_Deallocate). It is possible that the debug code in Python complains about the refcount in the object not being 0 at the time the object is finalized (module finalization time), but I don't see any such checks in PyObject_Free() (which is what PyObject_Del() maps to). Again, all of this does not happen in regular non-debug Python builds. Please be aware that we don't support debug builds, so fixing the problem (if there is one - gcc has some serious optimization problems on some combinations of platform and version) will take a while. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 09:27:37 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Tue Jan 31 08:08:35 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 Message-ID: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Hi all- I am trying to build the mx-base package, v.2.0.6. This will be used with postgresql 7.3.9, psycopg 1.1.18, and Roundup 0.8.2. RHEL 3.0 Python 2.3 egenix-mx-base-2.0.6.tar.gz I performed a: /usr/local/bin/python2.3 setup.py install Everything looks proper with the exeception of this series of warning statements: ----------------- gcc -pthread -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fno-strict-aliasing -fPIC -Imx/BeeBase/mxBeeBase -I/usr/local/incl ude/python2.3 -I/usr/local/include -c mx/BeeBase/mxBeeBase/btr.c -o build/temp.linux-i686-2.3/mx/BeeBase/mxBeeBase/mxBeeBa se/mx/BeeBase/mxBeeBase/btr.o mx/BeeBase/mxBeeBase/btr.c: In function `dumpBuf': mx/BeeBase/mxBeeBase/btr.c:249: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:250: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:255: warning: unsigned int format, long unsigned int arg (arg 4) mx/BeeBase/mxBeeBase/btr.c:256: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c: In function `_validateTree': mx/BeeBase/mxBeeBase/btr.c:330: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:337: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:339: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:349: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:351: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 3) creating build/lib.linux-i686-2.3/mx/BeeBase creating build/lib.linux-i686-2.3/mx/BeeBase/mxBeeBase -------------- Would someone be kind enough to let me know whether these messages were expected, and if not, how I might resolve these? Thanks! DC __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 22:06:33 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 31 08:08:35 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> References: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Message-ID: <4277CBB9.8020302@egenix.com> Dianne Chen wrote: > Hi all- > > I am trying to build the mx-base package, v.2.0.6. > This will be used with postgresql 7.3.9, psycopg > 1.1.18, and Roundup 0.8.2. > > RHEL 3.0 > Python 2.3 > egenix-mx-base-2.0.6.tar.gz > > I performed a: > > /usr/local/bin/python2.3 setup.py install > > Everything looks proper with the exeception of this > series of warning statements: > > ----------------- > ... > -------------- > > Would someone be kind enough to let me know whether > these messages were expected, and if not, how I might > resolve these? These warning can safely be ignored. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 13:41:14 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Tue Jan 31 08:08:35 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: 6667 Message-ID: <20050503194114.72091.qmail@web31414.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Dianne Chen wrote: > > Hi all- > > > > I am trying to build the mx-base package, v.2.0.6. > > This will be used with postgresql 7.3.9, psycopg > > 1.1.18, and Roundup 0.8.2. > > > > RHEL 3.0 > > Python 2.3 > > egenix-mx-base-2.0.6.tar.gz > > > > I performed a: > > > > /usr/local/bin/python2.3 setup.py install > > > > Everything looks proper with the exeception of > this > > series of warning statements: > > > > ----------------- > > ... > > -------------- > > > > Would someone be kind enough to let me know > whether > > these messages were expected, and if not, how I > might > > resolve these? > > These warning can safely be ignored. > > -- > Marc-Andre Lemburg > eGenix.com > Marc- Thank you very much for the reply. It helps greatly. With kind regards, DC __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From davidrushby at yahoo.com Tue May 3 17:18:46 2005 From: davidrushby at yahoo.com (David Rushby) Date: Tue Jan 31 08:08:35 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050503231846.35012.qmail@web30009.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > I'm not sure whether your analysis of the problem is correct... Indeed, my original analysis wasn't correct; I think this one is. The fatal error I'm complaining about only arises if the arguments to DateTime.DateTime are invalid, so that the object is deallocated in the onError block of mxDateTime_FromDateAndTime. If the object is created successfully, and later deallocated by Python's garbage collector, the fatal error doesn't arise. Here's my analysis of the problem: --- If the debugging directive Py_TRACE_REFS is enabled, as it is in my case, the Python interpreter maintains a doubly linked list of all Python objects (named refchain) via the _ob_next and _ob_prev pointers added to PyObject via _PyObject_HEAD_EXTRA. Each object is inserted into refchain by the _Py_AddToAllObjects call in _Py_NewReference, and removed from refchain by the _Py_ForgetReference call in _Py_Dealloc. _Py_ForgetReference performs an integrity check on the object being deallocated (op) to make sure that its neighbors in refchain recognize it. Specifically, _Py_ForgetReference verifies that the _ob_next pointer of the previous object in refchain (op->_ob_prev->_ob_next) points to op, and that the _ob_prev pointer of the next object in refchain (op->_ob_next->_ob_prev) points to op. If either of those conditions is false, the interpreter raises the fatal error I'm seeing. After mxDateTime_New pulls an mxDateTimeObject out of the free list, it calls _Py_NewReference on that object to transform it from a "conceptually deallocated" object to a "conceptually allocated" one. _Py_NewReference inserts the object into refchain. Later, when the object is being "conceptually deallocated", it should be removed from refchain with _Py_ForgetReference. The version of _Py_Dealloc that's active when Py_TRACE_REFS is enabled does this (_Py_Dealloc is the element of Py_DECREF that performs the actual destruction). _Py_Dealloc first calls _Py_ForgetReference to remove the object from refchain, then calls the object's destructor (op->ob_type->tp_dealloc). If WANT_SUBCLASSABLE_TYPES is not defined (it is not in my case), the destructor for mxDateTime_Type is mxDateTime_Free. So, if a DateTime object is deallocated normally, as a result of its reference count falling to zero, _Py_Dealloc is called on the object, which first removes it from refchain, then passes it to mxDateTime_Free. If a DateTime object is destroyed prematurely, as a result of invalid arguments to its destructor, the onError handler calls mxDateTime_Free, so the object is "conceptually deallocated" (placed in the free list), *but* the object is not removed from refchain. So if a refchain-membership-integrity-check is performed on the object in question or one of its immediate neighbors in refchain, that integrity check fails, leading to the fatal error. --- The solution is to 'Py_DECREF(...)' the object in the onError handler of its constructor, instead of passing the object directly to mxDateTime_Free. That change solves two problems: 1) It causes _Py_Dealloc to execute, which in turn executes _Py_ForgetReference, so the object is removed from refchain, as it should be. 2) At present, objects that are created successfully and later deallocated by normal reference count mechanics have a reference count of 0 when they enter the free list, whereas objects whose constructors abort their creation due to invalid arguments have a reference count of 1 when they enter the free list. Although AFAIK this doesn't cause an actual execution problem (because the object's reference count is *explicitly set to 1* rather than *incremented by 1* when the object is later "conceptually allocated" by _Py_NewReference), it is likely to confuse future maintainers and thereby lead to the introduction of an actual execution problem. I assume that if you agree that this is a reasonable solution, you'll want to apply the change not only to mxDateTime_FromDateAndTime, but to all similar constructors in mxDateTime.c. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From rj at maxxian.com Thu May 5 01:57:40 2005 From: rj at maxxian.com (RJ Juneau) Date: Tue Jan 31 08:08:35 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c5512e$f72798c0$6505a8c0@rjlaptop> I'm on the 30 day evaluation for mxodbc_zope_da. I'm getting the following error when I submit some queries: Error Type: KeyError Error Value: 'query' I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 with UCS4. The error seems to be caused by multiple rows being returned. I did see an earlier posting with the same error message. The response suggested a template error, but this is clearly not the case here. The additional evidence I've gathered so far: - I'm running the test directly from the ZSQL method, so there's no template involved. - If I use the same query with an additional "where" clause to ensure that only one row is returned, it works - If I use a value in the 'where' clause with no rows returned, it works - The same ZSQL query is being used on a Windows machine running Zope and the free ZODBC module without a problem - The query has been verified directly in mysql-client-browser Other info: - The database is MySQL 4.1.10A-0 - iODBC is the DB driver RJ Juneau -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050505/68d278bf/attachment-0073.htm From mal at egenix.com Thu May 5 12:37:43 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 31 08:08:35 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c5512e$f72798c0$6505a8c0@rjlaptop> References: <000301c5512e$f72798c0$6505a8c0@rjlaptop> Message-ID: <4279E967.6010904@egenix.com> RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 > with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 09:37:42 2005 From: rj at maxxian.com (RJ Juneau) Date: Tue Jan 31 08:08:35 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000101c5516f$3b96de90$6505a8c0@rjlaptop> More interesting info on the problem: If I execute the query directly in the "test" window of the base eGenix mxODBC Database Connection window, it works fine and returns the 20 lines expected. That could point to a problem in the rendering, which seems to be where the traceback ends. Note that within the same Zope system I also have an ODBC connection to a Sybase database, and I have successfully tested multi-line ZSQL queries there. This is the traceback: Time 2005/05/05 07:55:15.294 GMT-4 Exception Type KeyError Exception Value 'query' Traceback (innermost last): Module ZPublisher.Publish, line 101, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 39, in call_object Module Shared.DC.ZRDB.DA, line 337, in manage_test Module DocumentTemplate.DT_String, line 474, in __call__ Module DocumentTemplate.DT_In, line 602, in renderwb Module DocumentTemplate.DT_Var, line 219, in render KeyError: 'query' I don't think the following is an issue, but I'll include it for completeness.I am also getting the following iODBC warnings and errors in the Zope console log, which are related to the ODBC parameters being passed by iODBC. Note that these errors also appear for all of the successful queries. [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (Setup). [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (UsageCount). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Timeout). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Reuse). As for the ZSQL snippet from the template... Since there's no template involved yet (I'm still testing directly from the ZSQL method), I assume you mean the SQL code? select h.host_name, s.system_name, s.system_handle, count(*) from terminal t, system_map s, host h where t.system_index = s.system_index and s.host_index = h.host_index group by s.system_name order by h.host_name Nothing complicated here. There are no parameters passed to the query. RJ -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: May 5, 2005 5:38 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: Re: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is > 2.3.4 with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ---------------------------------------------------------------------- > -- > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 16:00:32 2005 From: charlie at egenix.com (Charlie Clark) Date: Tue Jan 31 08:08:35 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000101c5516f$3b96de90$6505a8c0@rjlaptop> References: <000101c5516f$3b96de90$6505a8c0@rjlaptop> Message-ID: <20050505150032.644.1@bepc.1115296715.fake> On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base eGenix > mxODBC Database Connection window, it works fine and returns the 20 > lines expected. That could point to a problem in the rendering, which > seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection to > a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 10:22:17 2005 From: rj at maxxian.com (RJ Juneau) Date: Tue Jan 31 08:08:35 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505150032.644.1@bepc.1115296715.fake> Message-ID: <000201c55175$75bcad10$6505a8c0@rjlaptop> At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 11:47:14 2005 From: rj at maxxian.com (RJ Juneau) Date: Tue Jan 31 08:08:35 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c55181$549be0e0$6505a8c0@rjlaptop> Charlie, I found a fix. Here it is in case anyone else runs into this. You were correct - the problem is in another part of Zope. Based on your feedback, I did a bit more searching and found something here: http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. html The problem appears to be in Zope versions after 2.7.0. I'm running 2.7.6, and the post indicates that it also happens in 2.7.4. The solution: Edit file /lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. There are two lines in the file that start with . Edit them as follows: Change first line to: Change second line to: Just to be after, I shut down Zope before I made the changes and restarted it after. Thanks for the help! RJ -----Original Message----- From: RJ Juneau [mailto:rj@maxxian.com] Sent: May 5, 2005 9:22 AM To: 'Charlie Clark' Cc: 'egenix-users@lists.egenix.com' Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 17:57:25 2005 From: charlie at egenix.com (Charlie Clark) Date: Tue Jan 31 08:08:36 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <20050505165725.3380.2@bepc.1115296715.fake> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Thu May 5 09:15:21 2005 From: charlie at egenix.com (Charlie Clark) Date: Tue Jan 31 08:08:36 2006 Subject: [Zope-DB] RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <000001c55185$41477730$6b00a8c0@fonacier.local> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________ Zope-DB mailing list Zope-DB@zope.org http://mail.zope.org/mailman/listinfo/zope-db From rj at maxxian.com Thu May 5 12:38:00 2005 From: rj at maxxian.com (RJ Juneau) Date: Tue Jan 31 08:08:36 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000001c55188$6b841eb0$6505a8c0@rjlaptop> I just double-checked. Zope-2.7.6-final. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 12:49:16 2005 From: rj at maxxian.com (RJ Juneau) Date: Tue Jan 31 08:08:36 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000501c55189$fe149ba0$6505a8c0@rjlaptop> Charlie, The fix has only been applied for 2.7.7, 2.8b2. The info is in the original bug report which is closed and can be found here: http://www.zope.org/Collectors/Zope/1745 RJ -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Fri May 6 11:50:09 2005 From: rj at maxxian.com (RJ Juneau) Date: Tue Jan 31 08:08:36 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC Message-ID: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Still on eval for the product. I cannot get a stable connection to Sybase via the iODBC drivers. - The Sybase ODBC connection - including a query - have been verified at the iODBC level. - The setup is already working well for ODBC connection to MySQL. Symptoms include: - If I click on "Open Connection", it still comes back with "Connection Closed" when I go to a ZSQL method - Using 'Connect on Demand' is not working either. - Clicking "Open Connection" gives me the following error: Connection string: DSN=lixbox_sybase; UID=sa; PWD=XXXXXXX Connection pool entry: 0 Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection rejected by data source', 7952) The odbc.ini definition for DSN "lixbox_sybase" is as follows: [lixbox_sybase] JetFix = No NoRowSetSizeLimit = No Description = Test connection to listbox Options = LIXBOX DSQUERY = SQLSERVER TDSHOST = lixbox TDSPORT = 5000 TDSVER = 5.0 SQLSERVER_CATALOG = N CURSOR_SENSITIVITY = LOW UserName = sa Password = XXXXXXXX ServerType = Sybase 10/11/12 Driver = /opt/openlink/lib/sql_mt_lt.so Database = pubs2 ReadOnly = no NoAutoCommit = No NoLoginBox = No FetchBufferSize = 60 Other relevant data: - Connecting via OpenLink's iODBC - Zope 2.7.6-final - Python 2.3.4 - Connection to Sybase has been successfully tested with iODBC, including issuing a query - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC connection RJ Juneau Chief Technology Officer Maxxian Integration Inc. 155 Westhampton Drive Thornhill, Ontario Canada L4J 7X2 E-mail: rj@maxxian.com Phone: +1 905 482 9429 Cell: +1 416 897 6682 Toll free: +1 866 758 9161 Fax: +1 647 722 2038 -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050506/aef33361/attachment-0073.htm From mal at egenix.com Fri May 6 18:27:37 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 31 08:08:36 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC In-Reply-To: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> References: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Message-ID: <427B8CE9.1010601@egenix.com> RJ Juneau wrote: > Still on eval for the product. > > I cannot get a stable connection to Sybase via the iODBC drivers. > > - The Sybase ODBC connection - including a query - have been verified at > the iODBC level. > - The setup is already working well for ODBC connection to MySQL. > > Symptoms include: > > - If I click on "Open Connection", it still comes back with "Connection > Closed" when I go to a ZSQL method > - Using 'Connect on Demand' is not working either. > - Clicking "Open Connection" gives me the following error: > > Connection string: DSN=lixbox_sybase; > UID=sa; > PWD=XXXXXXX Try writing the connection string on one line and without whitespace. ODBC drivers sometimes have problems with this. > Connection pool entry: 0 > Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection > rejected by data source', 7952) This is a generic error that relates to authentication or firewall problems. It is possible that turning on ODBC tracing the ODBC manager will give more clues as to the real cause of the problem. > The odbc.ini definition for DSN "lixbox_sybase" is as follows: > > [lixbox_sybase] > JetFix = No > NoRowSetSizeLimit = No > Description = Test connection to listbox > Options = LIXBOX > DSQUERY = SQLSERVER > TDSHOST = lixbox > TDSPORT = 5000 > TDSVER = 5.0 > SQLSERVER_CATALOG = N > CURSOR_SENSITIVITY = LOW > UserName = sa > Password = XXXXXXXX > ServerType = Sybase 10/11/12 > Driver = /opt/openlink/lib/sql_mt_lt.so > Database = pubs2 > ReadOnly = no > NoAutoCommit = No > NoLoginBox = No > FetchBufferSize = 60 > > > Other relevant data: > - Connecting via OpenLink's iODBC > - Zope 2.7.6-final > - Python 2.3.4 > - Connection to Sybase has been successfully tested with iODBC, > including issuing a query > - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC > connection > > > > RJ Juneau > Chief Technology Officer > Maxxian Integration Inc. > 155 Westhampton Drive > Thornhill, Ontario > Canada L4J 7X2 > E-mail: rj@maxxian.com > Phone: +1 905 482 9429 > Cell: +1 416 897 6682 > Toll free: +1 866 758 9161 > Fax: +1 647 722 2038 > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 06 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From calisp at gmail.com Sun May 15 23:49:03 2005 From: calisp at gmail.com (calisp@gmail.com) Date: Tue Jan 31 08:08:36 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK Message-ID: Hi, I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the following error... 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the last phase of a two-phase commit. This shouldn't happen. Traceback (most recent call last): File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one jar.tpc_finish(self) File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish try: self._finish() File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could not perform COMMIT or ROLLBACK', 1023) What could be causing this? Can I get the mxODBCZopeDA source from somewhere? It would make debugging this much easier. Thanks, Calisp. From mal at egenix.com Mon May 16 13:52:12 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 31 08:08:36 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK In-Reply-To: References: Message-ID: <42887B5C.4010109@egenix.com> calisp@gmail.com wrote: > Hi, > > I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with > unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the > following error... > > 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the > last phase of a two-phase commit. This shouldn't happen. > Traceback (most recent call last): > File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one > jar.tpc_finish(self) > File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish > try: self._finish() > File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish > File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler > ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could > not perform COMMIT or ROLLBACK', 1023) You should have a look at the database logs to see what prevented the commit from being completed. > What could be causing this? Hard to say: mxODBCZopeDA is trying to commit the transaction, but the driver or database failed to complete the request. The above error was generated by the ODBC driver. This could be network or DNS problems, or be related to a bug in FreeTDS (which is getting more stable with every new release, but should still be considered beta quality software at the moment). > Can I get the mxODBCZopeDA source from > somewhere? It would make debugging this much easier. Getting the source is not an option and won't help much either since the source of the problem is not mxODBCZopeDA. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 16 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Sun May 1 21:29:25 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 31 12:04:47 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <427259F3.4090806@egenix.com> References: <20050427130906.52878.qmail@web30008.mail.mud.yahoo.com> <427259F3.4090806@egenix.com> Message-ID: <42752005.7080904@egenix.com> M.-A. Lemburg wrote: > David Rushby wrote: > >> --- "M.-A. Lemburg" wrote: >> >>> Are you using the standard mxDateTime build or one >>> with WANT_SUBCLASSABLE_TYPES defined... >> >> >> >> Presumably "the standard", since I just built with 'py24d setup.py >> build', making no attempt to enable special directives. >> >> >>> ... (mxDateTime_Deallocate is only used by the latter)? >> >> >> >> That's true in 2.1.0-2005-04-15, but not in 2.1.0b5. >> >> >>> In any case, please try our latest snapshot: >>> >>> >> >> http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-04-15.zip >> >>> to see if that makes any difference. >> >> >> >> I can't build it out of the box: > > > Hmm, looks like distutils' sdist command doesn't like our new > repository layout which uses symlinks (after we've switched to > subversion). > > We'll have to debug distutils first, I guess :-( Ok, we've found the problem and fixed it. Here's the new release (which does build out of the box at least on our boxes ;-): http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 01 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From davidrushby at yahoo.com Mon May 2 15:49:53 2005 From: davidrushby at yahoo.com (David Rushby) Date: Tue Jan 31 12:04:47 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Ok, we've found the problem and fixed it. Here's the new > release (which does build out of the box at least on our > boxes ;-): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip It does build now, but: py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" still behaves as it did when I submitted my original message: Fatal Python error: UNREF invalid object Aborted This is the same debug build of Python 2.4.1 that I was previously using, running the same configuration (CentOS Linux 4.0/i386, everything compiled with GCC 3.4.3). Have you examined my original claim as to the cause of the bug? __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 10:21:55 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 31 12:04:47 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> References: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> Message-ID: <42772693.8050306@egenix.com> David Rushby wrote: > --- "M.-A. Lemburg" wrote: > >>Ok, we've found the problem and fixed it. Here's the new >>release (which does build out of the box at least on our >>boxes ;-): >> >> > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip > > It does build now, but: > py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" > still behaves as it did when I submitted my original message: > Fatal Python error: UNREF invalid object > Aborted > > This is the same debug build of Python 2.4.1 that I was previously > using, running the same configuration (CentOS Linux 4.0/i386, > everything compiled with GCC 3.4.3). > > Have you examined my original claim as to the cause of the bug? No. We haven't had time for looking into it. I'm not sure whether your analysis of the problem is correct: if you don't define WANT_SUBCLASSABLE_TYPES, the API mxDateTime_Deallocate() is neither defined nor used. Furthermore, PyObject_Del() is only called by mxDateTime_Free() if you have explicitely edited mxDateTime.c to disabled the free list #defines. In a standard build, PyObject_Del() is only called at module finalization time. Note that the reason we call mxDateTime_Free() in the constructor is that we don't want the destructor of the object to be called. Py_DECREF() would call the destructor (mxDateTime_Deallocate). It is possible that the debug code in Python complains about the refcount in the object not being 0 at the time the object is finalized (module finalization time), but I don't see any such checks in PyObject_Free() (which is what PyObject_Del() maps to). Again, all of this does not happen in regular non-debug Python builds. Please be aware that we don't support debug builds, so fixing the problem (if there is one - gcc has some serious optimization problems on some combinations of platform and version) will take a while. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 09:27:37 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Tue Jan 31 12:04:47 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 Message-ID: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Hi all- I am trying to build the mx-base package, v.2.0.6. This will be used with postgresql 7.3.9, psycopg 1.1.18, and Roundup 0.8.2. RHEL 3.0 Python 2.3 egenix-mx-base-2.0.6.tar.gz I performed a: /usr/local/bin/python2.3 setup.py install Everything looks proper with the exeception of this series of warning statements: ----------------- gcc -pthread -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fno-strict-aliasing -fPIC -Imx/BeeBase/mxBeeBase -I/usr/local/incl ude/python2.3 -I/usr/local/include -c mx/BeeBase/mxBeeBase/btr.c -o build/temp.linux-i686-2.3/mx/BeeBase/mxBeeBase/mxBeeBa se/mx/BeeBase/mxBeeBase/btr.o mx/BeeBase/mxBeeBase/btr.c: In function `dumpBuf': mx/BeeBase/mxBeeBase/btr.c:249: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:250: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:255: warning: unsigned int format, long unsigned int arg (arg 4) mx/BeeBase/mxBeeBase/btr.c:256: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c: In function `_validateTree': mx/BeeBase/mxBeeBase/btr.c:330: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:337: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:339: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:349: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:351: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 3) creating build/lib.linux-i686-2.3/mx/BeeBase creating build/lib.linux-i686-2.3/mx/BeeBase/mxBeeBase -------------- Would someone be kind enough to let me know whether these messages were expected, and if not, how I might resolve these? Thanks! DC __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 22:06:33 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 31 12:04:47 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> References: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Message-ID: <4277CBB9.8020302@egenix.com> Dianne Chen wrote: > Hi all- > > I am trying to build the mx-base package, v.2.0.6. > This will be used with postgresql 7.3.9, psycopg > 1.1.18, and Roundup 0.8.2. > > RHEL 3.0 > Python 2.3 > egenix-mx-base-2.0.6.tar.gz > > I performed a: > > /usr/local/bin/python2.3 setup.py install > > Everything looks proper with the exeception of this > series of warning statements: > > ----------------- > ... > -------------- > > Would someone be kind enough to let me know whether > these messages were expected, and if not, how I might > resolve these? These warning can safely be ignored. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 13:41:14 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Tue Jan 31 12:04:47 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: 6667 Message-ID: <20050503194114.72091.qmail@web31414.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Dianne Chen wrote: > > Hi all- > > > > I am trying to build the mx-base package, v.2.0.6. > > This will be used with postgresql 7.3.9, psycopg > > 1.1.18, and Roundup 0.8.2. > > > > RHEL 3.0 > > Python 2.3 > > egenix-mx-base-2.0.6.tar.gz > > > > I performed a: > > > > /usr/local/bin/python2.3 setup.py install > > > > Everything looks proper with the exeception of > this > > series of warning statements: > > > > ----------------- > > ... > > -------------- > > > > Would someone be kind enough to let me know > whether > > these messages were expected, and if not, how I > might > > resolve these? > > These warning can safely be ignored. > > -- > Marc-Andre Lemburg > eGenix.com > Marc- Thank you very much for the reply. It helps greatly. With kind regards, DC __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From davidrushby at yahoo.com Tue May 3 17:18:46 2005 From: davidrushby at yahoo.com (David Rushby) Date: Tue Jan 31 12:04:47 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050503231846.35012.qmail@web30009.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > I'm not sure whether your analysis of the problem is correct... Indeed, my original analysis wasn't correct; I think this one is. The fatal error I'm complaining about only arises if the arguments to DateTime.DateTime are invalid, so that the object is deallocated in the onError block of mxDateTime_FromDateAndTime. If the object is created successfully, and later deallocated by Python's garbage collector, the fatal error doesn't arise. Here's my analysis of the problem: --- If the debugging directive Py_TRACE_REFS is enabled, as it is in my case, the Python interpreter maintains a doubly linked list of all Python objects (named refchain) via the _ob_next and _ob_prev pointers added to PyObject via _PyObject_HEAD_EXTRA. Each object is inserted into refchain by the _Py_AddToAllObjects call in _Py_NewReference, and removed from refchain by the _Py_ForgetReference call in _Py_Dealloc. _Py_ForgetReference performs an integrity check on the object being deallocated (op) to make sure that its neighbors in refchain recognize it. Specifically, _Py_ForgetReference verifies that the _ob_next pointer of the previous object in refchain (op->_ob_prev->_ob_next) points to op, and that the _ob_prev pointer of the next object in refchain (op->_ob_next->_ob_prev) points to op. If either of those conditions is false, the interpreter raises the fatal error I'm seeing. After mxDateTime_New pulls an mxDateTimeObject out of the free list, it calls _Py_NewReference on that object to transform it from a "conceptually deallocated" object to a "conceptually allocated" one. _Py_NewReference inserts the object into refchain. Later, when the object is being "conceptually deallocated", it should be removed from refchain with _Py_ForgetReference. The version of _Py_Dealloc that's active when Py_TRACE_REFS is enabled does this (_Py_Dealloc is the element of Py_DECREF that performs the actual destruction). _Py_Dealloc first calls _Py_ForgetReference to remove the object from refchain, then calls the object's destructor (op->ob_type->tp_dealloc). If WANT_SUBCLASSABLE_TYPES is not defined (it is not in my case), the destructor for mxDateTime_Type is mxDateTime_Free. So, if a DateTime object is deallocated normally, as a result of its reference count falling to zero, _Py_Dealloc is called on the object, which first removes it from refchain, then passes it to mxDateTime_Free. If a DateTime object is destroyed prematurely, as a result of invalid arguments to its destructor, the onError handler calls mxDateTime_Free, so the object is "conceptually deallocated" (placed in the free list), *but* the object is not removed from refchain. So if a refchain-membership-integrity-check is performed on the object in question or one of its immediate neighbors in refchain, that integrity check fails, leading to the fatal error. --- The solution is to 'Py_DECREF(...)' the object in the onError handler of its constructor, instead of passing the object directly to mxDateTime_Free. That change solves two problems: 1) It causes _Py_Dealloc to execute, which in turn executes _Py_ForgetReference, so the object is removed from refchain, as it should be. 2) At present, objects that are created successfully and later deallocated by normal reference count mechanics have a reference count of 0 when they enter the free list, whereas objects whose constructors abort their creation due to invalid arguments have a reference count of 1 when they enter the free list. Although AFAIK this doesn't cause an actual execution problem (because the object's reference count is *explicitly set to 1* rather than *incremented by 1* when the object is later "conceptually allocated" by _Py_NewReference), it is likely to confuse future maintainers and thereby lead to the introduction of an actual execution problem. I assume that if you agree that this is a reasonable solution, you'll want to apply the change not only to mxDateTime_FromDateAndTime, but to all similar constructors in mxDateTime.c. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From rj at maxxian.com Thu May 5 01:57:40 2005 From: rj at maxxian.com (RJ Juneau) Date: Tue Jan 31 12:04:48 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c5512e$f72798c0$6505a8c0@rjlaptop> I'm on the 30 day evaluation for mxodbc_zope_da. I'm getting the following error when I submit some queries: Error Type: KeyError Error Value: 'query' I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 with UCS4. The error seems to be caused by multiple rows being returned. I did see an earlier posting with the same error message. The response suggested a template error, but this is clearly not the case here. The additional evidence I've gathered so far: - I'm running the test directly from the ZSQL method, so there's no template involved. - If I use the same query with an additional "where" clause to ensure that only one row is returned, it works - If I use a value in the 'where' clause with no rows returned, it works - The same ZSQL query is being used on a Windows machine running Zope and the free ZODBC module without a problem - The query has been verified directly in mysql-client-browser Other info: - The database is MySQL 4.1.10A-0 - iODBC is the DB driver RJ Juneau -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050505/68d278bf/attachment-0074.htm From mal at egenix.com Thu May 5 12:37:43 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 31 12:04:48 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c5512e$f72798c0$6505a8c0@rjlaptop> References: <000301c5512e$f72798c0$6505a8c0@rjlaptop> Message-ID: <4279E967.6010904@egenix.com> RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 > with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 09:37:42 2005 From: rj at maxxian.com (RJ Juneau) Date: Tue Jan 31 12:04:48 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000101c5516f$3b96de90$6505a8c0@rjlaptop> More interesting info on the problem: If I execute the query directly in the "test" window of the base eGenix mxODBC Database Connection window, it works fine and returns the 20 lines expected. That could point to a problem in the rendering, which seems to be where the traceback ends. Note that within the same Zope system I also have an ODBC connection to a Sybase database, and I have successfully tested multi-line ZSQL queries there. This is the traceback: Time 2005/05/05 07:55:15.294 GMT-4 Exception Type KeyError Exception Value 'query' Traceback (innermost last): Module ZPublisher.Publish, line 101, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 39, in call_object Module Shared.DC.ZRDB.DA, line 337, in manage_test Module DocumentTemplate.DT_String, line 474, in __call__ Module DocumentTemplate.DT_In, line 602, in renderwb Module DocumentTemplate.DT_Var, line 219, in render KeyError: 'query' I don't think the following is an issue, but I'll include it for completeness.I am also getting the following iODBC warnings and errors in the Zope console log, which are related to the ODBC parameters being passed by iODBC. Note that these errors also appear for all of the successful queries. [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (Setup). [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (UsageCount). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Timeout). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Reuse). As for the ZSQL snippet from the template... Since there's no template involved yet (I'm still testing directly from the ZSQL method), I assume you mean the SQL code? select h.host_name, s.system_name, s.system_handle, count(*) from terminal t, system_map s, host h where t.system_index = s.system_index and s.host_index = h.host_index group by s.system_name order by h.host_name Nothing complicated here. There are no parameters passed to the query. RJ -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: May 5, 2005 5:38 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: Re: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is > 2.3.4 with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ---------------------------------------------------------------------- > -- > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 16:00:32 2005 From: charlie at egenix.com (Charlie Clark) Date: Tue Jan 31 12:04:48 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000101c5516f$3b96de90$6505a8c0@rjlaptop> References: <000101c5516f$3b96de90$6505a8c0@rjlaptop> Message-ID: <20050505150032.644.1@bepc.1115296715.fake> On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base eGenix > mxODBC Database Connection window, it works fine and returns the 20 > lines expected. That could point to a problem in the rendering, which > seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection to > a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 10:22:17 2005 From: rj at maxxian.com (RJ Juneau) Date: Tue Jan 31 12:04:48 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505150032.644.1@bepc.1115296715.fake> Message-ID: <000201c55175$75bcad10$6505a8c0@rjlaptop> At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 11:47:14 2005 From: rj at maxxian.com (RJ Juneau) Date: Tue Jan 31 12:04:48 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c55181$549be0e0$6505a8c0@rjlaptop> Charlie, I found a fix. Here it is in case anyone else runs into this. You were correct - the problem is in another part of Zope. Based on your feedback, I did a bit more searching and found something here: http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. html The problem appears to be in Zope versions after 2.7.0. I'm running 2.7.6, and the post indicates that it also happens in 2.7.4. The solution: Edit file /lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. There are two lines in the file that start with . Edit them as follows: Change first line to: Change second line to: Just to be after, I shut down Zope before I made the changes and restarted it after. Thanks for the help! RJ -----Original Message----- From: RJ Juneau [mailto:rj@maxxian.com] Sent: May 5, 2005 9:22 AM To: 'Charlie Clark' Cc: 'egenix-users@lists.egenix.com' Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 17:57:25 2005 From: charlie at egenix.com (Charlie Clark) Date: Tue Jan 31 12:04:48 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <20050505165725.3380.2@bepc.1115296715.fake> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Thu May 5 09:15:21 2005 From: charlie at egenix.com (Charlie Clark) Date: Tue Jan 31 12:04:48 2006 Subject: [Zope-DB] RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <000001c55185$41477730$6b00a8c0@fonacier.local> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________ Zope-DB mailing list Zope-DB@zope.org http://mail.zope.org/mailman/listinfo/zope-db From rj at maxxian.com Thu May 5 12:38:00 2005 From: rj at maxxian.com (RJ Juneau) Date: Tue Jan 31 12:04:48 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000001c55188$6b841eb0$6505a8c0@rjlaptop> I just double-checked. Zope-2.7.6-final. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 12:49:16 2005 From: rj at maxxian.com (RJ Juneau) Date: Tue Jan 31 12:04:48 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000501c55189$fe149ba0$6505a8c0@rjlaptop> Charlie, The fix has only been applied for 2.7.7, 2.8b2. The info is in the original bug report which is closed and can be found here: http://www.zope.org/Collectors/Zope/1745 RJ -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Fri May 6 11:50:09 2005 From: rj at maxxian.com (RJ Juneau) Date: Tue Jan 31 12:04:48 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC Message-ID: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Still on eval for the product. I cannot get a stable connection to Sybase via the iODBC drivers. - The Sybase ODBC connection - including a query - have been verified at the iODBC level. - The setup is already working well for ODBC connection to MySQL. Symptoms include: - If I click on "Open Connection", it still comes back with "Connection Closed" when I go to a ZSQL method - Using 'Connect on Demand' is not working either. - Clicking "Open Connection" gives me the following error: Connection string: DSN=lixbox_sybase; UID=sa; PWD=XXXXXXX Connection pool entry: 0 Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection rejected by data source', 7952) The odbc.ini definition for DSN "lixbox_sybase" is as follows: [lixbox_sybase] JetFix = No NoRowSetSizeLimit = No Description = Test connection to listbox Options = LIXBOX DSQUERY = SQLSERVER TDSHOST = lixbox TDSPORT = 5000 TDSVER = 5.0 SQLSERVER_CATALOG = N CURSOR_SENSITIVITY = LOW UserName = sa Password = XXXXXXXX ServerType = Sybase 10/11/12 Driver = /opt/openlink/lib/sql_mt_lt.so Database = pubs2 ReadOnly = no NoAutoCommit = No NoLoginBox = No FetchBufferSize = 60 Other relevant data: - Connecting via OpenLink's iODBC - Zope 2.7.6-final - Python 2.3.4 - Connection to Sybase has been successfully tested with iODBC, including issuing a query - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC connection RJ Juneau Chief Technology Officer Maxxian Integration Inc. 155 Westhampton Drive Thornhill, Ontario Canada L4J 7X2 E-mail: rj@maxxian.com Phone: +1 905 482 9429 Cell: +1 416 897 6682 Toll free: +1 866 758 9161 Fax: +1 647 722 2038 -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050506/aef33361/attachment-0074.htm From mal at egenix.com Fri May 6 18:27:37 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 31 12:04:48 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC In-Reply-To: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> References: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Message-ID: <427B8CE9.1010601@egenix.com> RJ Juneau wrote: > Still on eval for the product. > > I cannot get a stable connection to Sybase via the iODBC drivers. > > - The Sybase ODBC connection - including a query - have been verified at > the iODBC level. > - The setup is already working well for ODBC connection to MySQL. > > Symptoms include: > > - If I click on "Open Connection", it still comes back with "Connection > Closed" when I go to a ZSQL method > - Using 'Connect on Demand' is not working either. > - Clicking "Open Connection" gives me the following error: > > Connection string: DSN=lixbox_sybase; > UID=sa; > PWD=XXXXXXX Try writing the connection string on one line and without whitespace. ODBC drivers sometimes have problems with this. > Connection pool entry: 0 > Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection > rejected by data source', 7952) This is a generic error that relates to authentication or firewall problems. It is possible that turning on ODBC tracing the ODBC manager will give more clues as to the real cause of the problem. > The odbc.ini definition for DSN "lixbox_sybase" is as follows: > > [lixbox_sybase] > JetFix = No > NoRowSetSizeLimit = No > Description = Test connection to listbox > Options = LIXBOX > DSQUERY = SQLSERVER > TDSHOST = lixbox > TDSPORT = 5000 > TDSVER = 5.0 > SQLSERVER_CATALOG = N > CURSOR_SENSITIVITY = LOW > UserName = sa > Password = XXXXXXXX > ServerType = Sybase 10/11/12 > Driver = /opt/openlink/lib/sql_mt_lt.so > Database = pubs2 > ReadOnly = no > NoAutoCommit = No > NoLoginBox = No > FetchBufferSize = 60 > > > Other relevant data: > - Connecting via OpenLink's iODBC > - Zope 2.7.6-final > - Python 2.3.4 > - Connection to Sybase has been successfully tested with iODBC, > including issuing a query > - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC > connection > > > > RJ Juneau > Chief Technology Officer > Maxxian Integration Inc. > 155 Westhampton Drive > Thornhill, Ontario > Canada L4J 7X2 > E-mail: rj@maxxian.com > Phone: +1 905 482 9429 > Cell: +1 416 897 6682 > Toll free: +1 866 758 9161 > Fax: +1 647 722 2038 > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 06 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From calisp at gmail.com Sun May 15 23:49:03 2005 From: calisp at gmail.com (calisp@gmail.com) Date: Tue Jan 31 12:04:48 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK Message-ID: Hi, I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the following error... 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the last phase of a two-phase commit. This shouldn't happen. Traceback (most recent call last): File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one jar.tpc_finish(self) File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish try: self._finish() File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could not perform COMMIT or ROLLBACK', 1023) What could be causing this? Can I get the mxODBCZopeDA source from somewhere? It would make debugging this much easier. Thanks, Calisp. From mal at egenix.com Mon May 16 13:52:12 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 31 12:04:48 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK In-Reply-To: References: Message-ID: <42887B5C.4010109@egenix.com> calisp@gmail.com wrote: > Hi, > > I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with > unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the > following error... > > 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the > last phase of a two-phase commit. This shouldn't happen. > Traceback (most recent call last): > File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one > jar.tpc_finish(self) > File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish > try: self._finish() > File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish > File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler > ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could > not perform COMMIT or ROLLBACK', 1023) You should have a look at the database logs to see what prevented the commit from being completed. > What could be causing this? Hard to say: mxODBCZopeDA is trying to commit the transaction, but the driver or database failed to complete the request. The above error was generated by the ODBC driver. This could be network or DNS problems, or be related to a bug in FreeTDS (which is getting more stable with every new release, but should still be considered beta quality software at the moment). > Can I get the mxODBCZopeDA source from > somewhere? It would make debugging this much easier. Getting the source is not an option and won't help much either since the source of the problem is not mxODBCZopeDA. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 16 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Sun May 1 21:29:25 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 31 16:02:41 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <427259F3.4090806@egenix.com> References: <20050427130906.52878.qmail@web30008.mail.mud.yahoo.com> <427259F3.4090806@egenix.com> Message-ID: <42752005.7080904@egenix.com> M.-A. Lemburg wrote: > David Rushby wrote: > >> --- "M.-A. Lemburg" wrote: >> >>> Are you using the standard mxDateTime build or one >>> with WANT_SUBCLASSABLE_TYPES defined... >> >> >> >> Presumably "the standard", since I just built with 'py24d setup.py >> build', making no attempt to enable special directives. >> >> >>> ... (mxDateTime_Deallocate is only used by the latter)? >> >> >> >> That's true in 2.1.0-2005-04-15, but not in 2.1.0b5. >> >> >>> In any case, please try our latest snapshot: >>> >>> >> >> http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-04-15.zip >> >>> to see if that makes any difference. >> >> >> >> I can't build it out of the box: > > > Hmm, looks like distutils' sdist command doesn't like our new > repository layout which uses symlinks (after we've switched to > subversion). > > We'll have to debug distutils first, I guess :-( Ok, we've found the problem and fixed it. Here's the new release (which does build out of the box at least on our boxes ;-): http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 01 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From davidrushby at yahoo.com Mon May 2 15:49:53 2005 From: davidrushby at yahoo.com (David Rushby) Date: Tue Jan 31 16:02:41 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Ok, we've found the problem and fixed it. Here's the new > release (which does build out of the box at least on our > boxes ;-): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip It does build now, but: py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" still behaves as it did when I submitted my original message: Fatal Python error: UNREF invalid object Aborted This is the same debug build of Python 2.4.1 that I was previously using, running the same configuration (CentOS Linux 4.0/i386, everything compiled with GCC 3.4.3). Have you examined my original claim as to the cause of the bug? __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 10:21:55 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 31 16:02:42 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> References: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> Message-ID: <42772693.8050306@egenix.com> David Rushby wrote: > --- "M.-A. Lemburg" wrote: > >>Ok, we've found the problem and fixed it. Here's the new >>release (which does build out of the box at least on our >>boxes ;-): >> >> > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip > > It does build now, but: > py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" > still behaves as it did when I submitted my original message: > Fatal Python error: UNREF invalid object > Aborted > > This is the same debug build of Python 2.4.1 that I was previously > using, running the same configuration (CentOS Linux 4.0/i386, > everything compiled with GCC 3.4.3). > > Have you examined my original claim as to the cause of the bug? No. We haven't had time for looking into it. I'm not sure whether your analysis of the problem is correct: if you don't define WANT_SUBCLASSABLE_TYPES, the API mxDateTime_Deallocate() is neither defined nor used. Furthermore, PyObject_Del() is only called by mxDateTime_Free() if you have explicitely edited mxDateTime.c to disabled the free list #defines. In a standard build, PyObject_Del() is only called at module finalization time. Note that the reason we call mxDateTime_Free() in the constructor is that we don't want the destructor of the object to be called. Py_DECREF() would call the destructor (mxDateTime_Deallocate). It is possible that the debug code in Python complains about the refcount in the object not being 0 at the time the object is finalized (module finalization time), but I don't see any such checks in PyObject_Free() (which is what PyObject_Del() maps to). Again, all of this does not happen in regular non-debug Python builds. Please be aware that we don't support debug builds, so fixing the problem (if there is one - gcc has some serious optimization problems on some combinations of platform and version) will take a while. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 09:27:37 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Tue Jan 31 16:02:42 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 Message-ID: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Hi all- I am trying to build the mx-base package, v.2.0.6. This will be used with postgresql 7.3.9, psycopg 1.1.18, and Roundup 0.8.2. RHEL 3.0 Python 2.3 egenix-mx-base-2.0.6.tar.gz I performed a: /usr/local/bin/python2.3 setup.py install Everything looks proper with the exeception of this series of warning statements: ----------------- gcc -pthread -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fno-strict-aliasing -fPIC -Imx/BeeBase/mxBeeBase -I/usr/local/incl ude/python2.3 -I/usr/local/include -c mx/BeeBase/mxBeeBase/btr.c -o build/temp.linux-i686-2.3/mx/BeeBase/mxBeeBase/mxBeeBa se/mx/BeeBase/mxBeeBase/btr.o mx/BeeBase/mxBeeBase/btr.c: In function `dumpBuf': mx/BeeBase/mxBeeBase/btr.c:249: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:250: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:255: warning: unsigned int format, long unsigned int arg (arg 4) mx/BeeBase/mxBeeBase/btr.c:256: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c: In function `_validateTree': mx/BeeBase/mxBeeBase/btr.c:330: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:337: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:339: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:349: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:351: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 3) creating build/lib.linux-i686-2.3/mx/BeeBase creating build/lib.linux-i686-2.3/mx/BeeBase/mxBeeBase -------------- Would someone be kind enough to let me know whether these messages were expected, and if not, how I might resolve these? Thanks! DC __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 22:06:33 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 31 16:02:42 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> References: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Message-ID: <4277CBB9.8020302@egenix.com> Dianne Chen wrote: > Hi all- > > I am trying to build the mx-base package, v.2.0.6. > This will be used with postgresql 7.3.9, psycopg > 1.1.18, and Roundup 0.8.2. > > RHEL 3.0 > Python 2.3 > egenix-mx-base-2.0.6.tar.gz > > I performed a: > > /usr/local/bin/python2.3 setup.py install > > Everything looks proper with the exeception of this > series of warning statements: > > ----------------- > ... > -------------- > > Would someone be kind enough to let me know whether > these messages were expected, and if not, how I might > resolve these? These warning can safely be ignored. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 13:41:14 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Tue Jan 31 16:02:42 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: 6667 Message-ID: <20050503194114.72091.qmail@web31414.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Dianne Chen wrote: > > Hi all- > > > > I am trying to build the mx-base package, v.2.0.6. > > This will be used with postgresql 7.3.9, psycopg > > 1.1.18, and Roundup 0.8.2. > > > > RHEL 3.0 > > Python 2.3 > > egenix-mx-base-2.0.6.tar.gz > > > > I performed a: > > > > /usr/local/bin/python2.3 setup.py install > > > > Everything looks proper with the exeception of > this > > series of warning statements: > > > > ----------------- > > ... > > -------------- > > > > Would someone be kind enough to let me know > whether > > these messages were expected, and if not, how I > might > > resolve these? > > These warning can safely be ignored. > > -- > Marc-Andre Lemburg > eGenix.com > Marc- Thank you very much for the reply. It helps greatly. With kind regards, DC __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From davidrushby at yahoo.com Tue May 3 17:18:46 2005 From: davidrushby at yahoo.com (David Rushby) Date: Tue Jan 31 16:02:42 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050503231846.35012.qmail@web30009.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > I'm not sure whether your analysis of the problem is correct... Indeed, my original analysis wasn't correct; I think this one is. The fatal error I'm complaining about only arises if the arguments to DateTime.DateTime are invalid, so that the object is deallocated in the onError block of mxDateTime_FromDateAndTime. If the object is created successfully, and later deallocated by Python's garbage collector, the fatal error doesn't arise. Here's my analysis of the problem: --- If the debugging directive Py_TRACE_REFS is enabled, as it is in my case, the Python interpreter maintains a doubly linked list of all Python objects (named refchain) via the _ob_next and _ob_prev pointers added to PyObject via _PyObject_HEAD_EXTRA. Each object is inserted into refchain by the _Py_AddToAllObjects call in _Py_NewReference, and removed from refchain by the _Py_ForgetReference call in _Py_Dealloc. _Py_ForgetReference performs an integrity check on the object being deallocated (op) to make sure that its neighbors in refchain recognize it. Specifically, _Py_ForgetReference verifies that the _ob_next pointer of the previous object in refchain (op->_ob_prev->_ob_next) points to op, and that the _ob_prev pointer of the next object in refchain (op->_ob_next->_ob_prev) points to op. If either of those conditions is false, the interpreter raises the fatal error I'm seeing. After mxDateTime_New pulls an mxDateTimeObject out of the free list, it calls _Py_NewReference on that object to transform it from a "conceptually deallocated" object to a "conceptually allocated" one. _Py_NewReference inserts the object into refchain. Later, when the object is being "conceptually deallocated", it should be removed from refchain with _Py_ForgetReference. The version of _Py_Dealloc that's active when Py_TRACE_REFS is enabled does this (_Py_Dealloc is the element of Py_DECREF that performs the actual destruction). _Py_Dealloc first calls _Py_ForgetReference to remove the object from refchain, then calls the object's destructor (op->ob_type->tp_dealloc). If WANT_SUBCLASSABLE_TYPES is not defined (it is not in my case), the destructor for mxDateTime_Type is mxDateTime_Free. So, if a DateTime object is deallocated normally, as a result of its reference count falling to zero, _Py_Dealloc is called on the object, which first removes it from refchain, then passes it to mxDateTime_Free. If a DateTime object is destroyed prematurely, as a result of invalid arguments to its destructor, the onError handler calls mxDateTime_Free, so the object is "conceptually deallocated" (placed in the free list), *but* the object is not removed from refchain. So if a refchain-membership-integrity-check is performed on the object in question or one of its immediate neighbors in refchain, that integrity check fails, leading to the fatal error. --- The solution is to 'Py_DECREF(...)' the object in the onError handler of its constructor, instead of passing the object directly to mxDateTime_Free. That change solves two problems: 1) It causes _Py_Dealloc to execute, which in turn executes _Py_ForgetReference, so the object is removed from refchain, as it should be. 2) At present, objects that are created successfully and later deallocated by normal reference count mechanics have a reference count of 0 when they enter the free list, whereas objects whose constructors abort their creation due to invalid arguments have a reference count of 1 when they enter the free list. Although AFAIK this doesn't cause an actual execution problem (because the object's reference count is *explicitly set to 1* rather than *incremented by 1* when the object is later "conceptually allocated" by _Py_NewReference), it is likely to confuse future maintainers and thereby lead to the introduction of an actual execution problem. I assume that if you agree that this is a reasonable solution, you'll want to apply the change not only to mxDateTime_FromDateAndTime, but to all similar constructors in mxDateTime.c. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From rj at maxxian.com Thu May 5 01:57:40 2005 From: rj at maxxian.com (RJ Juneau) Date: Tue Jan 31 16:02:42 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c5512e$f72798c0$6505a8c0@rjlaptop> I'm on the 30 day evaluation for mxodbc_zope_da. I'm getting the following error when I submit some queries: Error Type: KeyError Error Value: 'query' I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 with UCS4. The error seems to be caused by multiple rows being returned. I did see an earlier posting with the same error message. The response suggested a template error, but this is clearly not the case here. The additional evidence I've gathered so far: - I'm running the test directly from the ZSQL method, so there's no template involved. - If I use the same query with an additional "where" clause to ensure that only one row is returned, it works - If I use a value in the 'where' clause with no rows returned, it works - The same ZSQL query is being used on a Windows machine running Zope and the free ZODBC module without a problem - The query has been verified directly in mysql-client-browser Other info: - The database is MySQL 4.1.10A-0 - iODBC is the DB driver RJ Juneau -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050505/68d278bf/attachment-0075.htm From mal at egenix.com Thu May 5 12:37:43 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 31 16:02:42 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c5512e$f72798c0$6505a8c0@rjlaptop> References: <000301c5512e$f72798c0$6505a8c0@rjlaptop> Message-ID: <4279E967.6010904@egenix.com> RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 > with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 09:37:42 2005 From: rj at maxxian.com (RJ Juneau) Date: Tue Jan 31 16:02:42 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000101c5516f$3b96de90$6505a8c0@rjlaptop> More interesting info on the problem: If I execute the query directly in the "test" window of the base eGenix mxODBC Database Connection window, it works fine and returns the 20 lines expected. That could point to a problem in the rendering, which seems to be where the traceback ends. Note that within the same Zope system I also have an ODBC connection to a Sybase database, and I have successfully tested multi-line ZSQL queries there. This is the traceback: Time 2005/05/05 07:55:15.294 GMT-4 Exception Type KeyError Exception Value 'query' Traceback (innermost last): Module ZPublisher.Publish, line 101, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 39, in call_object Module Shared.DC.ZRDB.DA, line 337, in manage_test Module DocumentTemplate.DT_String, line 474, in __call__ Module DocumentTemplate.DT_In, line 602, in renderwb Module DocumentTemplate.DT_Var, line 219, in render KeyError: 'query' I don't think the following is an issue, but I'll include it for completeness.I am also getting the following iODBC warnings and errors in the Zope console log, which are related to the ODBC parameters being passed by iODBC. Note that these errors also appear for all of the successful queries. [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (Setup). [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (UsageCount). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Timeout). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Reuse). As for the ZSQL snippet from the template... Since there's no template involved yet (I'm still testing directly from the ZSQL method), I assume you mean the SQL code? select h.host_name, s.system_name, s.system_handle, count(*) from terminal t, system_map s, host h where t.system_index = s.system_index and s.host_index = h.host_index group by s.system_name order by h.host_name Nothing complicated here. There are no parameters passed to the query. RJ -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: May 5, 2005 5:38 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: Re: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is > 2.3.4 with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ---------------------------------------------------------------------- > -- > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 16:00:32 2005 From: charlie at egenix.com (Charlie Clark) Date: Tue Jan 31 16:02:42 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000101c5516f$3b96de90$6505a8c0@rjlaptop> References: <000101c5516f$3b96de90$6505a8c0@rjlaptop> Message-ID: <20050505150032.644.1@bepc.1115296715.fake> On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base eGenix > mxODBC Database Connection window, it works fine and returns the 20 > lines expected. That could point to a problem in the rendering, which > seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection to > a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 10:22:17 2005 From: rj at maxxian.com (RJ Juneau) Date: Tue Jan 31 16:02:42 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505150032.644.1@bepc.1115296715.fake> Message-ID: <000201c55175$75bcad10$6505a8c0@rjlaptop> At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 11:47:14 2005 From: rj at maxxian.com (RJ Juneau) Date: Tue Jan 31 16:02:42 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c55181$549be0e0$6505a8c0@rjlaptop> Charlie, I found a fix. Here it is in case anyone else runs into this. You were correct - the problem is in another part of Zope. Based on your feedback, I did a bit more searching and found something here: http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. html The problem appears to be in Zope versions after 2.7.0. I'm running 2.7.6, and the post indicates that it also happens in 2.7.4. The solution: Edit file /lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. There are two lines in the file that start with . Edit them as follows: Change first line to: Change second line to: Just to be after, I shut down Zope before I made the changes and restarted it after. Thanks for the help! RJ -----Original Message----- From: RJ Juneau [mailto:rj@maxxian.com] Sent: May 5, 2005 9:22 AM To: 'Charlie Clark' Cc: 'egenix-users@lists.egenix.com' Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 17:57:25 2005 From: charlie at egenix.com (Charlie Clark) Date: Tue Jan 31 16:02:42 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <20050505165725.3380.2@bepc.1115296715.fake> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Thu May 5 09:15:21 2005 From: charlie at egenix.com (Charlie Clark) Date: Tue Jan 31 16:02:42 2006 Subject: [Zope-DB] RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <000001c55185$41477730$6b00a8c0@fonacier.local> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________ Zope-DB mailing list Zope-DB@zope.org http://mail.zope.org/mailman/listinfo/zope-db From rj at maxxian.com Thu May 5 12:38:00 2005 From: rj at maxxian.com (RJ Juneau) Date: Tue Jan 31 16:02:42 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000001c55188$6b841eb0$6505a8c0@rjlaptop> I just double-checked. Zope-2.7.6-final. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 12:49:16 2005 From: rj at maxxian.com (RJ Juneau) Date: Tue Jan 31 16:02:42 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000501c55189$fe149ba0$6505a8c0@rjlaptop> Charlie, The fix has only been applied for 2.7.7, 2.8b2. The info is in the original bug report which is closed and can be found here: http://www.zope.org/Collectors/Zope/1745 RJ -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Fri May 6 11:50:09 2005 From: rj at maxxian.com (RJ Juneau) Date: Tue Jan 31 16:02:42 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC Message-ID: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Still on eval for the product. I cannot get a stable connection to Sybase via the iODBC drivers. - The Sybase ODBC connection - including a query - have been verified at the iODBC level. - The setup is already working well for ODBC connection to MySQL. Symptoms include: - If I click on "Open Connection", it still comes back with "Connection Closed" when I go to a ZSQL method - Using 'Connect on Demand' is not working either. - Clicking "Open Connection" gives me the following error: Connection string: DSN=lixbox_sybase; UID=sa; PWD=XXXXXXX Connection pool entry: 0 Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection rejected by data source', 7952) The odbc.ini definition for DSN "lixbox_sybase" is as follows: [lixbox_sybase] JetFix = No NoRowSetSizeLimit = No Description = Test connection to listbox Options = LIXBOX DSQUERY = SQLSERVER TDSHOST = lixbox TDSPORT = 5000 TDSVER = 5.0 SQLSERVER_CATALOG = N CURSOR_SENSITIVITY = LOW UserName = sa Password = XXXXXXXX ServerType = Sybase 10/11/12 Driver = /opt/openlink/lib/sql_mt_lt.so Database = pubs2 ReadOnly = no NoAutoCommit = No NoLoginBox = No FetchBufferSize = 60 Other relevant data: - Connecting via OpenLink's iODBC - Zope 2.7.6-final - Python 2.3.4 - Connection to Sybase has been successfully tested with iODBC, including issuing a query - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC connection RJ Juneau Chief Technology Officer Maxxian Integration Inc. 155 Westhampton Drive Thornhill, Ontario Canada L4J 7X2 E-mail: rj@maxxian.com Phone: +1 905 482 9429 Cell: +1 416 897 6682 Toll free: +1 866 758 9161 Fax: +1 647 722 2038 -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050506/aef33361/attachment-0075.htm From mal at egenix.com Fri May 6 18:27:37 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 31 16:02:42 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC In-Reply-To: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> References: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Message-ID: <427B8CE9.1010601@egenix.com> RJ Juneau wrote: > Still on eval for the product. > > I cannot get a stable connection to Sybase via the iODBC drivers. > > - The Sybase ODBC connection - including a query - have been verified at > the iODBC level. > - The setup is already working well for ODBC connection to MySQL. > > Symptoms include: > > - If I click on "Open Connection", it still comes back with "Connection > Closed" when I go to a ZSQL method > - Using 'Connect on Demand' is not working either. > - Clicking "Open Connection" gives me the following error: > > Connection string: DSN=lixbox_sybase; > UID=sa; > PWD=XXXXXXX Try writing the connection string on one line and without whitespace. ODBC drivers sometimes have problems with this. > Connection pool entry: 0 > Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection > rejected by data source', 7952) This is a generic error that relates to authentication or firewall problems. It is possible that turning on ODBC tracing the ODBC manager will give more clues as to the real cause of the problem. > The odbc.ini definition for DSN "lixbox_sybase" is as follows: > > [lixbox_sybase] > JetFix = No > NoRowSetSizeLimit = No > Description = Test connection to listbox > Options = LIXBOX > DSQUERY = SQLSERVER > TDSHOST = lixbox > TDSPORT = 5000 > TDSVER = 5.0 > SQLSERVER_CATALOG = N > CURSOR_SENSITIVITY = LOW > UserName = sa > Password = XXXXXXXX > ServerType = Sybase 10/11/12 > Driver = /opt/openlink/lib/sql_mt_lt.so > Database = pubs2 > ReadOnly = no > NoAutoCommit = No > NoLoginBox = No > FetchBufferSize = 60 > > > Other relevant data: > - Connecting via OpenLink's iODBC > - Zope 2.7.6-final > - Python 2.3.4 > - Connection to Sybase has been successfully tested with iODBC, > including issuing a query > - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC > connection > > > > RJ Juneau > Chief Technology Officer > Maxxian Integration Inc. > 155 Westhampton Drive > Thornhill, Ontario > Canada L4J 7X2 > E-mail: rj@maxxian.com > Phone: +1 905 482 9429 > Cell: +1 416 897 6682 > Toll free: +1 866 758 9161 > Fax: +1 647 722 2038 > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 06 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From calisp at gmail.com Sun May 15 23:49:03 2005 From: calisp at gmail.com (calisp@gmail.com) Date: Tue Jan 31 16:02:42 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK Message-ID: Hi, I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the following error... 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the last phase of a two-phase commit. This shouldn't happen. Traceback (most recent call last): File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one jar.tpc_finish(self) File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish try: self._finish() File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could not perform COMMIT or ROLLBACK', 1023) What could be causing this? Can I get the mxODBCZopeDA source from somewhere? It would make debugging this much easier. Thanks, Calisp. From mal at egenix.com Mon May 16 13:52:12 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 31 16:02:42 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK In-Reply-To: References: Message-ID: <42887B5C.4010109@egenix.com> calisp@gmail.com wrote: > Hi, > > I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with > unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the > following error... > > 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the > last phase of a two-phase commit. This shouldn't happen. > Traceback (most recent call last): > File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one > jar.tpc_finish(self) > File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish > try: self._finish() > File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish > File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler > ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could > not perform COMMIT or ROLLBACK', 1023) You should have a look at the database logs to see what prevented the commit from being completed. > What could be causing this? Hard to say: mxODBCZopeDA is trying to commit the transaction, but the driver or database failed to complete the request. The above error was generated by the ODBC driver. This could be network or DNS problems, or be related to a bug in FreeTDS (which is getting more stable with every new release, but should still be considered beta quality software at the moment). > Can I get the mxODBCZopeDA source from > somewhere? It would make debugging this much easier. Getting the source is not an option and won't help much either since the source of the problem is not mxODBCZopeDA. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 16 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Sun May 1 21:29:25 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 31 20:01:21 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <427259F3.4090806@egenix.com> References: <20050427130906.52878.qmail@web30008.mail.mud.yahoo.com> <427259F3.4090806@egenix.com> Message-ID: <42752005.7080904@egenix.com> M.-A. Lemburg wrote: > David Rushby wrote: > >> --- "M.-A. Lemburg" wrote: >> >>> Are you using the standard mxDateTime build or one >>> with WANT_SUBCLASSABLE_TYPES defined... >> >> >> >> Presumably "the standard", since I just built with 'py24d setup.py >> build', making no attempt to enable special directives. >> >> >>> ... (mxDateTime_Deallocate is only used by the latter)? >> >> >> >> That's true in 2.1.0-2005-04-15, but not in 2.1.0b5. >> >> >>> In any case, please try our latest snapshot: >>> >>> >> >> http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-04-15.zip >> >>> to see if that makes any difference. >> >> >> >> I can't build it out of the box: > > > Hmm, looks like distutils' sdist command doesn't like our new > repository layout which uses symlinks (after we've switched to > subversion). > > We'll have to debug distutils first, I guess :-( Ok, we've found the problem and fixed it. Here's the new release (which does build out of the box at least on our boxes ;-): http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 01 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From davidrushby at yahoo.com Mon May 2 15:49:53 2005 From: davidrushby at yahoo.com (David Rushby) Date: Tue Jan 31 20:01:21 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Ok, we've found the problem and fixed it. Here's the new > release (which does build out of the box at least on our > boxes ;-): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip It does build now, but: py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" still behaves as it did when I submitted my original message: Fatal Python error: UNREF invalid object Aborted This is the same debug build of Python 2.4.1 that I was previously using, running the same configuration (CentOS Linux 4.0/i386, everything compiled with GCC 3.4.3). Have you examined my original claim as to the cause of the bug? __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 10:21:55 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 31 20:01:21 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> References: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> Message-ID: <42772693.8050306@egenix.com> David Rushby wrote: > --- "M.-A. Lemburg" wrote: > >>Ok, we've found the problem and fixed it. Here's the new >>release (which does build out of the box at least on our >>boxes ;-): >> >> > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip > > It does build now, but: > py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" > still behaves as it did when I submitted my original message: > Fatal Python error: UNREF invalid object > Aborted > > This is the same debug build of Python 2.4.1 that I was previously > using, running the same configuration (CentOS Linux 4.0/i386, > everything compiled with GCC 3.4.3). > > Have you examined my original claim as to the cause of the bug? No. We haven't had time for looking into it. I'm not sure whether your analysis of the problem is correct: if you don't define WANT_SUBCLASSABLE_TYPES, the API mxDateTime_Deallocate() is neither defined nor used. Furthermore, PyObject_Del() is only called by mxDateTime_Free() if you have explicitely edited mxDateTime.c to disabled the free list #defines. In a standard build, PyObject_Del() is only called at module finalization time. Note that the reason we call mxDateTime_Free() in the constructor is that we don't want the destructor of the object to be called. Py_DECREF() would call the destructor (mxDateTime_Deallocate). It is possible that the debug code in Python complains about the refcount in the object not being 0 at the time the object is finalized (module finalization time), but I don't see any such checks in PyObject_Free() (which is what PyObject_Del() maps to). Again, all of this does not happen in regular non-debug Python builds. Please be aware that we don't support debug builds, so fixing the problem (if there is one - gcc has some serious optimization problems on some combinations of platform and version) will take a while. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 09:27:37 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Tue Jan 31 20:01:21 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 Message-ID: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Hi all- I am trying to build the mx-base package, v.2.0.6. This will be used with postgresql 7.3.9, psycopg 1.1.18, and Roundup 0.8.2. RHEL 3.0 Python 2.3 egenix-mx-base-2.0.6.tar.gz I performed a: /usr/local/bin/python2.3 setup.py install Everything looks proper with the exeception of this series of warning statements: ----------------- gcc -pthread -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fno-strict-aliasing -fPIC -Imx/BeeBase/mxBeeBase -I/usr/local/incl ude/python2.3 -I/usr/local/include -c mx/BeeBase/mxBeeBase/btr.c -o build/temp.linux-i686-2.3/mx/BeeBase/mxBeeBase/mxBeeBa se/mx/BeeBase/mxBeeBase/btr.o mx/BeeBase/mxBeeBase/btr.c: In function `dumpBuf': mx/BeeBase/mxBeeBase/btr.c:249: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:250: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:255: warning: unsigned int format, long unsigned int arg (arg 4) mx/BeeBase/mxBeeBase/btr.c:256: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c: In function `_validateTree': mx/BeeBase/mxBeeBase/btr.c:330: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:337: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:339: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:349: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:351: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 3) creating build/lib.linux-i686-2.3/mx/BeeBase creating build/lib.linux-i686-2.3/mx/BeeBase/mxBeeBase -------------- Would someone be kind enough to let me know whether these messages were expected, and if not, how I might resolve these? Thanks! DC __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 22:06:33 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 31 20:01:21 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> References: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Message-ID: <4277CBB9.8020302@egenix.com> Dianne Chen wrote: > Hi all- > > I am trying to build the mx-base package, v.2.0.6. > This will be used with postgresql 7.3.9, psycopg > 1.1.18, and Roundup 0.8.2. > > RHEL 3.0 > Python 2.3 > egenix-mx-base-2.0.6.tar.gz > > I performed a: > > /usr/local/bin/python2.3 setup.py install > > Everything looks proper with the exeception of this > series of warning statements: > > ----------------- > ... > -------------- > > Would someone be kind enough to let me know whether > these messages were expected, and if not, how I might > resolve these? These warning can safely be ignored. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 13:41:14 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Tue Jan 31 20:01:21 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: 6667 Message-ID: <20050503194114.72091.qmail@web31414.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Dianne Chen wrote: > > Hi all- > > > > I am trying to build the mx-base package, v.2.0.6. > > This will be used with postgresql 7.3.9, psycopg > > 1.1.18, and Roundup 0.8.2. > > > > RHEL 3.0 > > Python 2.3 > > egenix-mx-base-2.0.6.tar.gz > > > > I performed a: > > > > /usr/local/bin/python2.3 setup.py install > > > > Everything looks proper with the exeception of > this > > series of warning statements: > > > > ----------------- > > ... > > -------------- > > > > Would someone be kind enough to let me know > whether > > these messages were expected, and if not, how I > might > > resolve these? > > These warning can safely be ignored. > > -- > Marc-Andre Lemburg > eGenix.com > Marc- Thank you very much for the reply. It helps greatly. With kind regards, DC __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From davidrushby at yahoo.com Tue May 3 17:18:46 2005 From: davidrushby at yahoo.com (David Rushby) Date: Tue Jan 31 20:01:21 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050503231846.35012.qmail@web30009.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > I'm not sure whether your analysis of the problem is correct... Indeed, my original analysis wasn't correct; I think this one is. The fatal error I'm complaining about only arises if the arguments to DateTime.DateTime are invalid, so that the object is deallocated in the onError block of mxDateTime_FromDateAndTime. If the object is created successfully, and later deallocated by Python's garbage collector, the fatal error doesn't arise. Here's my analysis of the problem: --- If the debugging directive Py_TRACE_REFS is enabled, as it is in my case, the Python interpreter maintains a doubly linked list of all Python objects (named refchain) via the _ob_next and _ob_prev pointers added to PyObject via _PyObject_HEAD_EXTRA. Each object is inserted into refchain by the _Py_AddToAllObjects call in _Py_NewReference, and removed from refchain by the _Py_ForgetReference call in _Py_Dealloc. _Py_ForgetReference performs an integrity check on the object being deallocated (op) to make sure that its neighbors in refchain recognize it. Specifically, _Py_ForgetReference verifies that the _ob_next pointer of the previous object in refchain (op->_ob_prev->_ob_next) points to op, and that the _ob_prev pointer of the next object in refchain (op->_ob_next->_ob_prev) points to op. If either of those conditions is false, the interpreter raises the fatal error I'm seeing. After mxDateTime_New pulls an mxDateTimeObject out of the free list, it calls _Py_NewReference on that object to transform it from a "conceptually deallocated" object to a "conceptually allocated" one. _Py_NewReference inserts the object into refchain. Later, when the object is being "conceptually deallocated", it should be removed from refchain with _Py_ForgetReference. The version of _Py_Dealloc that's active when Py_TRACE_REFS is enabled does this (_Py_Dealloc is the element of Py_DECREF that performs the actual destruction). _Py_Dealloc first calls _Py_ForgetReference to remove the object from refchain, then calls the object's destructor (op->ob_type->tp_dealloc). If WANT_SUBCLASSABLE_TYPES is not defined (it is not in my case), the destructor for mxDateTime_Type is mxDateTime_Free. So, if a DateTime object is deallocated normally, as a result of its reference count falling to zero, _Py_Dealloc is called on the object, which first removes it from refchain, then passes it to mxDateTime_Free. If a DateTime object is destroyed prematurely, as a result of invalid arguments to its destructor, the onError handler calls mxDateTime_Free, so the object is "conceptually deallocated" (placed in the free list), *but* the object is not removed from refchain. So if a refchain-membership-integrity-check is performed on the object in question or one of its immediate neighbors in refchain, that integrity check fails, leading to the fatal error. --- The solution is to 'Py_DECREF(...)' the object in the onError handler of its constructor, instead of passing the object directly to mxDateTime_Free. That change solves two problems: 1) It causes _Py_Dealloc to execute, which in turn executes _Py_ForgetReference, so the object is removed from refchain, as it should be. 2) At present, objects that are created successfully and later deallocated by normal reference count mechanics have a reference count of 0 when they enter the free list, whereas objects whose constructors abort their creation due to invalid arguments have a reference count of 1 when they enter the free list. Although AFAIK this doesn't cause an actual execution problem (because the object's reference count is *explicitly set to 1* rather than *incremented by 1* when the object is later "conceptually allocated" by _Py_NewReference), it is likely to confuse future maintainers and thereby lead to the introduction of an actual execution problem. I assume that if you agree that this is a reasonable solution, you'll want to apply the change not only to mxDateTime_FromDateAndTime, but to all similar constructors in mxDateTime.c. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From rj at maxxian.com Thu May 5 01:57:40 2005 From: rj at maxxian.com (RJ Juneau) Date: Tue Jan 31 20:01:21 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c5512e$f72798c0$6505a8c0@rjlaptop> I'm on the 30 day evaluation for mxodbc_zope_da. I'm getting the following error when I submit some queries: Error Type: KeyError Error Value: 'query' I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 with UCS4. The error seems to be caused by multiple rows being returned. I did see an earlier posting with the same error message. The response suggested a template error, but this is clearly not the case here. The additional evidence I've gathered so far: - I'm running the test directly from the ZSQL method, so there's no template involved. - If I use the same query with an additional "where" clause to ensure that only one row is returned, it works - If I use a value in the 'where' clause with no rows returned, it works - The same ZSQL query is being used on a Windows machine running Zope and the free ZODBC module without a problem - The query has been verified directly in mysql-client-browser Other info: - The database is MySQL 4.1.10A-0 - iODBC is the DB driver RJ Juneau -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050505/68d278bf/attachment-0076.htm From mal at egenix.com Thu May 5 12:37:43 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 31 20:01:21 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c5512e$f72798c0$6505a8c0@rjlaptop> References: <000301c5512e$f72798c0$6505a8c0@rjlaptop> Message-ID: <4279E967.6010904@egenix.com> RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 > with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 09:37:42 2005 From: rj at maxxian.com (RJ Juneau) Date: Tue Jan 31 20:01:21 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000101c5516f$3b96de90$6505a8c0@rjlaptop> More interesting info on the problem: If I execute the query directly in the "test" window of the base eGenix mxODBC Database Connection window, it works fine and returns the 20 lines expected. That could point to a problem in the rendering, which seems to be where the traceback ends. Note that within the same Zope system I also have an ODBC connection to a Sybase database, and I have successfully tested multi-line ZSQL queries there. This is the traceback: Time 2005/05/05 07:55:15.294 GMT-4 Exception Type KeyError Exception Value 'query' Traceback (innermost last): Module ZPublisher.Publish, line 101, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 39, in call_object Module Shared.DC.ZRDB.DA, line 337, in manage_test Module DocumentTemplate.DT_String, line 474, in __call__ Module DocumentTemplate.DT_In, line 602, in renderwb Module DocumentTemplate.DT_Var, line 219, in render KeyError: 'query' I don't think the following is an issue, but I'll include it for completeness.I am also getting the following iODBC warnings and errors in the Zope console log, which are related to the ODBC parameters being passed by iODBC. Note that these errors also appear for all of the successful queries. [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (Setup). [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (UsageCount). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Timeout). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Reuse). As for the ZSQL snippet from the template... Since there's no template involved yet (I'm still testing directly from the ZSQL method), I assume you mean the SQL code? select h.host_name, s.system_name, s.system_handle, count(*) from terminal t, system_map s, host h where t.system_index = s.system_index and s.host_index = h.host_index group by s.system_name order by h.host_name Nothing complicated here. There are no parameters passed to the query. RJ -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: May 5, 2005 5:38 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: Re: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is > 2.3.4 with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ---------------------------------------------------------------------- > -- > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 16:00:32 2005 From: charlie at egenix.com (Charlie Clark) Date: Tue Jan 31 20:01:21 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000101c5516f$3b96de90$6505a8c0@rjlaptop> References: <000101c5516f$3b96de90$6505a8c0@rjlaptop> Message-ID: <20050505150032.644.1@bepc.1115296715.fake> On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base eGenix > mxODBC Database Connection window, it works fine and returns the 20 > lines expected. That could point to a problem in the rendering, which > seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection to > a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 10:22:17 2005 From: rj at maxxian.com (RJ Juneau) Date: Tue Jan 31 20:01:21 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505150032.644.1@bepc.1115296715.fake> Message-ID: <000201c55175$75bcad10$6505a8c0@rjlaptop> At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 11:47:14 2005 From: rj at maxxian.com (RJ Juneau) Date: Tue Jan 31 20:01:21 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c55181$549be0e0$6505a8c0@rjlaptop> Charlie, I found a fix. Here it is in case anyone else runs into this. You were correct - the problem is in another part of Zope. Based on your feedback, I did a bit more searching and found something here: http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. html The problem appears to be in Zope versions after 2.7.0. I'm running 2.7.6, and the post indicates that it also happens in 2.7.4. The solution: Edit file /lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. There are two lines in the file that start with . Edit them as follows: Change first line to: Change second line to: Just to be after, I shut down Zope before I made the changes and restarted it after. Thanks for the help! RJ -----Original Message----- From: RJ Juneau [mailto:rj@maxxian.com] Sent: May 5, 2005 9:22 AM To: 'Charlie Clark' Cc: 'egenix-users@lists.egenix.com' Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 17:57:25 2005 From: charlie at egenix.com (Charlie Clark) Date: Tue Jan 31 20:01:21 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <20050505165725.3380.2@bepc.1115296715.fake> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Thu May 5 09:15:21 2005 From: charlie at egenix.com (Charlie Clark) Date: Tue Jan 31 20:01:21 2006 Subject: [Zope-DB] RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <000001c55185$41477730$6b00a8c0@fonacier.local> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________ Zope-DB mailing list Zope-DB@zope.org http://mail.zope.org/mailman/listinfo/zope-db From rj at maxxian.com Thu May 5 12:38:00 2005 From: rj at maxxian.com (RJ Juneau) Date: Tue Jan 31 20:01:21 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000001c55188$6b841eb0$6505a8c0@rjlaptop> I just double-checked. Zope-2.7.6-final. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 12:49:16 2005 From: rj at maxxian.com (RJ Juneau) Date: Tue Jan 31 20:01:21 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000501c55189$fe149ba0$6505a8c0@rjlaptop> Charlie, The fix has only been applied for 2.7.7, 2.8b2. The info is in the original bug report which is closed and can be found here: http://www.zope.org/Collectors/Zope/1745 RJ -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Fri May 6 11:50:09 2005 From: rj at maxxian.com (RJ Juneau) Date: Tue Jan 31 20:01:21 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC Message-ID: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Still on eval for the product. I cannot get a stable connection to Sybase via the iODBC drivers. - The Sybase ODBC connection - including a query - have been verified at the iODBC level. - The setup is already working well for ODBC connection to MySQL. Symptoms include: - If I click on "Open Connection", it still comes back with "Connection Closed" when I go to a ZSQL method - Using 'Connect on Demand' is not working either. - Clicking "Open Connection" gives me the following error: Connection string: DSN=lixbox_sybase; UID=sa; PWD=XXXXXXX Connection pool entry: 0 Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection rejected by data source', 7952) The odbc.ini definition for DSN "lixbox_sybase" is as follows: [lixbox_sybase] JetFix = No NoRowSetSizeLimit = No Description = Test connection to listbox Options = LIXBOX DSQUERY = SQLSERVER TDSHOST = lixbox TDSPORT = 5000 TDSVER = 5.0 SQLSERVER_CATALOG = N CURSOR_SENSITIVITY = LOW UserName = sa Password = XXXXXXXX ServerType = Sybase 10/11/12 Driver = /opt/openlink/lib/sql_mt_lt.so Database = pubs2 ReadOnly = no NoAutoCommit = No NoLoginBox = No FetchBufferSize = 60 Other relevant data: - Connecting via OpenLink's iODBC - Zope 2.7.6-final - Python 2.3.4 - Connection to Sybase has been successfully tested with iODBC, including issuing a query - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC connection RJ Juneau Chief Technology Officer Maxxian Integration Inc. 155 Westhampton Drive Thornhill, Ontario Canada L4J 7X2 E-mail: rj@maxxian.com Phone: +1 905 482 9429 Cell: +1 416 897 6682 Toll free: +1 866 758 9161 Fax: +1 647 722 2038 -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050506/aef33361/attachment-0076.htm From mal at egenix.com Fri May 6 18:27:37 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 31 20:01:21 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC In-Reply-To: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> References: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Message-ID: <427B8CE9.1010601@egenix.com> RJ Juneau wrote: > Still on eval for the product. > > I cannot get a stable connection to Sybase via the iODBC drivers. > > - The Sybase ODBC connection - including a query - have been verified at > the iODBC level. > - The setup is already working well for ODBC connection to MySQL. > > Symptoms include: > > - If I click on "Open Connection", it still comes back with "Connection > Closed" when I go to a ZSQL method > - Using 'Connect on Demand' is not working either. > - Clicking "Open Connection" gives me the following error: > > Connection string: DSN=lixbox_sybase; > UID=sa; > PWD=XXXXXXX Try writing the connection string on one line and without whitespace. ODBC drivers sometimes have problems with this. > Connection pool entry: 0 > Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection > rejected by data source', 7952) This is a generic error that relates to authentication or firewall problems. It is possible that turning on ODBC tracing the ODBC manager will give more clues as to the real cause of the problem. > The odbc.ini definition for DSN "lixbox_sybase" is as follows: > > [lixbox_sybase] > JetFix = No > NoRowSetSizeLimit = No > Description = Test connection to listbox > Options = LIXBOX > DSQUERY = SQLSERVER > TDSHOST = lixbox > TDSPORT = 5000 > TDSVER = 5.0 > SQLSERVER_CATALOG = N > CURSOR_SENSITIVITY = LOW > UserName = sa > Password = XXXXXXXX > ServerType = Sybase 10/11/12 > Driver = /opt/openlink/lib/sql_mt_lt.so > Database = pubs2 > ReadOnly = no > NoAutoCommit = No > NoLoginBox = No > FetchBufferSize = 60 > > > Other relevant data: > - Connecting via OpenLink's iODBC > - Zope 2.7.6-final > - Python 2.3.4 > - Connection to Sybase has been successfully tested with iODBC, > including issuing a query > - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC > connection > > > > RJ Juneau > Chief Technology Officer > Maxxian Integration Inc. > 155 Westhampton Drive > Thornhill, Ontario > Canada L4J 7X2 > E-mail: rj@maxxian.com > Phone: +1 905 482 9429 > Cell: +1 416 897 6682 > Toll free: +1 866 758 9161 > Fax: +1 647 722 2038 > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 06 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From calisp at gmail.com Sun May 15 23:49:03 2005 From: calisp at gmail.com (calisp@gmail.com) Date: Tue Jan 31 20:01:21 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK Message-ID: Hi, I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the following error... 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the last phase of a two-phase commit. This shouldn't happen. Traceback (most recent call last): File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one jar.tpc_finish(self) File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish try: self._finish() File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could not perform COMMIT or ROLLBACK', 1023) What could be causing this? Can I get the mxODBCZopeDA source from somewhere? It would make debugging this much easier. Thanks, Calisp. From mal at egenix.com Mon May 16 13:52:12 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Jan 31 20:01:21 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK In-Reply-To: References: Message-ID: <42887B5C.4010109@egenix.com> calisp@gmail.com wrote: > Hi, > > I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with > unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the > following error... > > 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the > last phase of a two-phase commit. This shouldn't happen. > Traceback (most recent call last): > File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one > jar.tpc_finish(self) > File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish > try: self._finish() > File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish > File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler > ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could > not perform COMMIT or ROLLBACK', 1023) You should have a look at the database logs to see what prevented the commit from being completed. > What could be causing this? Hard to say: mxODBCZopeDA is trying to commit the transaction, but the driver or database failed to complete the request. The above error was generated by the ODBC driver. This could be network or DNS problems, or be related to a bug in FreeTDS (which is getting more stable with every new release, but should still be considered beta quality software at the moment). > Can I get the mxODBCZopeDA source from > somewhere? It would make debugging this much easier. Getting the source is not an option and won't help much either since the source of the problem is not mxODBCZopeDA. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 16 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Sun May 1 21:29:25 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 1 08:10:53 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <427259F3.4090806@egenix.com> References: <20050427130906.52878.qmail@web30008.mail.mud.yahoo.com> <427259F3.4090806@egenix.com> Message-ID: <42752005.7080904@egenix.com> M.-A. Lemburg wrote: > David Rushby wrote: > >> --- "M.-A. Lemburg" wrote: >> >>> Are you using the standard mxDateTime build or one >>> with WANT_SUBCLASSABLE_TYPES defined... >> >> >> >> Presumably "the standard", since I just built with 'py24d setup.py >> build', making no attempt to enable special directives. >> >> >>> ... (mxDateTime_Deallocate is only used by the latter)? >> >> >> >> That's true in 2.1.0-2005-04-15, but not in 2.1.0b5. >> >> >>> In any case, please try our latest snapshot: >>> >>> >> >> http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-04-15.zip >> >>> to see if that makes any difference. >> >> >> >> I can't build it out of the box: > > > Hmm, looks like distutils' sdist command doesn't like our new > repository layout which uses symlinks (after we've switched to > subversion). > > We'll have to debug distutils first, I guess :-( Ok, we've found the problem and fixed it. Here's the new release (which does build out of the box at least on our boxes ;-): http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 01 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From davidrushby at yahoo.com Mon May 2 15:49:53 2005 From: davidrushby at yahoo.com (David Rushby) Date: Wed Feb 1 08:10:53 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Ok, we've found the problem and fixed it. Here's the new > release (which does build out of the box at least on our > boxes ;-): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip It does build now, but: py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" still behaves as it did when I submitted my original message: Fatal Python error: UNREF invalid object Aborted This is the same debug build of Python 2.4.1 that I was previously using, running the same configuration (CentOS Linux 4.0/i386, everything compiled with GCC 3.4.3). Have you examined my original claim as to the cause of the bug? __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 10:21:55 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 1 08:10:53 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> References: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> Message-ID: <42772693.8050306@egenix.com> David Rushby wrote: > --- "M.-A. Lemburg" wrote: > >>Ok, we've found the problem and fixed it. Here's the new >>release (which does build out of the box at least on our >>boxes ;-): >> >> > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip > > It does build now, but: > py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" > still behaves as it did when I submitted my original message: > Fatal Python error: UNREF invalid object > Aborted > > This is the same debug build of Python 2.4.1 that I was previously > using, running the same configuration (CentOS Linux 4.0/i386, > everything compiled with GCC 3.4.3). > > Have you examined my original claim as to the cause of the bug? No. We haven't had time for looking into it. I'm not sure whether your analysis of the problem is correct: if you don't define WANT_SUBCLASSABLE_TYPES, the API mxDateTime_Deallocate() is neither defined nor used. Furthermore, PyObject_Del() is only called by mxDateTime_Free() if you have explicitely edited mxDateTime.c to disabled the free list #defines. In a standard build, PyObject_Del() is only called at module finalization time. Note that the reason we call mxDateTime_Free() in the constructor is that we don't want the destructor of the object to be called. Py_DECREF() would call the destructor (mxDateTime_Deallocate). It is possible that the debug code in Python complains about the refcount in the object not being 0 at the time the object is finalized (module finalization time), but I don't see any such checks in PyObject_Free() (which is what PyObject_Del() maps to). Again, all of this does not happen in regular non-debug Python builds. Please be aware that we don't support debug builds, so fixing the problem (if there is one - gcc has some serious optimization problems on some combinations of platform and version) will take a while. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 09:27:37 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Wed Feb 1 08:10:53 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 Message-ID: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Hi all- I am trying to build the mx-base package, v.2.0.6. This will be used with postgresql 7.3.9, psycopg 1.1.18, and Roundup 0.8.2. RHEL 3.0 Python 2.3 egenix-mx-base-2.0.6.tar.gz I performed a: /usr/local/bin/python2.3 setup.py install Everything looks proper with the exeception of this series of warning statements: ----------------- gcc -pthread -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fno-strict-aliasing -fPIC -Imx/BeeBase/mxBeeBase -I/usr/local/incl ude/python2.3 -I/usr/local/include -c mx/BeeBase/mxBeeBase/btr.c -o build/temp.linux-i686-2.3/mx/BeeBase/mxBeeBase/mxBeeBa se/mx/BeeBase/mxBeeBase/btr.o mx/BeeBase/mxBeeBase/btr.c: In function `dumpBuf': mx/BeeBase/mxBeeBase/btr.c:249: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:250: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:255: warning: unsigned int format, long unsigned int arg (arg 4) mx/BeeBase/mxBeeBase/btr.c:256: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c: In function `_validateTree': mx/BeeBase/mxBeeBase/btr.c:330: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:337: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:339: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:349: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:351: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 3) creating build/lib.linux-i686-2.3/mx/BeeBase creating build/lib.linux-i686-2.3/mx/BeeBase/mxBeeBase -------------- Would someone be kind enough to let me know whether these messages were expected, and if not, how I might resolve these? Thanks! DC __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 22:06:33 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 1 08:10:53 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> References: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Message-ID: <4277CBB9.8020302@egenix.com> Dianne Chen wrote: > Hi all- > > I am trying to build the mx-base package, v.2.0.6. > This will be used with postgresql 7.3.9, psycopg > 1.1.18, and Roundup 0.8.2. > > RHEL 3.0 > Python 2.3 > egenix-mx-base-2.0.6.tar.gz > > I performed a: > > /usr/local/bin/python2.3 setup.py install > > Everything looks proper with the exeception of this > series of warning statements: > > ----------------- > ... > -------------- > > Would someone be kind enough to let me know whether > these messages were expected, and if not, how I might > resolve these? These warning can safely be ignored. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 13:41:14 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Wed Feb 1 08:10:53 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: 6667 Message-ID: <20050503194114.72091.qmail@web31414.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Dianne Chen wrote: > > Hi all- > > > > I am trying to build the mx-base package, v.2.0.6. > > This will be used with postgresql 7.3.9, psycopg > > 1.1.18, and Roundup 0.8.2. > > > > RHEL 3.0 > > Python 2.3 > > egenix-mx-base-2.0.6.tar.gz > > > > I performed a: > > > > /usr/local/bin/python2.3 setup.py install > > > > Everything looks proper with the exeception of > this > > series of warning statements: > > > > ----------------- > > ... > > -------------- > > > > Would someone be kind enough to let me know > whether > > these messages were expected, and if not, how I > might > > resolve these? > > These warning can safely be ignored. > > -- > Marc-Andre Lemburg > eGenix.com > Marc- Thank you very much for the reply. It helps greatly. With kind regards, DC __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From davidrushby at yahoo.com Tue May 3 17:18:46 2005 From: davidrushby at yahoo.com (David Rushby) Date: Wed Feb 1 08:10:53 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050503231846.35012.qmail@web30009.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > I'm not sure whether your analysis of the problem is correct... Indeed, my original analysis wasn't correct; I think this one is. The fatal error I'm complaining about only arises if the arguments to DateTime.DateTime are invalid, so that the object is deallocated in the onError block of mxDateTime_FromDateAndTime. If the object is created successfully, and later deallocated by Python's garbage collector, the fatal error doesn't arise. Here's my analysis of the problem: --- If the debugging directive Py_TRACE_REFS is enabled, as it is in my case, the Python interpreter maintains a doubly linked list of all Python objects (named refchain) via the _ob_next and _ob_prev pointers added to PyObject via _PyObject_HEAD_EXTRA. Each object is inserted into refchain by the _Py_AddToAllObjects call in _Py_NewReference, and removed from refchain by the _Py_ForgetReference call in _Py_Dealloc. _Py_ForgetReference performs an integrity check on the object being deallocated (op) to make sure that its neighbors in refchain recognize it. Specifically, _Py_ForgetReference verifies that the _ob_next pointer of the previous object in refchain (op->_ob_prev->_ob_next) points to op, and that the _ob_prev pointer of the next object in refchain (op->_ob_next->_ob_prev) points to op. If either of those conditions is false, the interpreter raises the fatal error I'm seeing. After mxDateTime_New pulls an mxDateTimeObject out of the free list, it calls _Py_NewReference on that object to transform it from a "conceptually deallocated" object to a "conceptually allocated" one. _Py_NewReference inserts the object into refchain. Later, when the object is being "conceptually deallocated", it should be removed from refchain with _Py_ForgetReference. The version of _Py_Dealloc that's active when Py_TRACE_REFS is enabled does this (_Py_Dealloc is the element of Py_DECREF that performs the actual destruction). _Py_Dealloc first calls _Py_ForgetReference to remove the object from refchain, then calls the object's destructor (op->ob_type->tp_dealloc). If WANT_SUBCLASSABLE_TYPES is not defined (it is not in my case), the destructor for mxDateTime_Type is mxDateTime_Free. So, if a DateTime object is deallocated normally, as a result of its reference count falling to zero, _Py_Dealloc is called on the object, which first removes it from refchain, then passes it to mxDateTime_Free. If a DateTime object is destroyed prematurely, as a result of invalid arguments to its destructor, the onError handler calls mxDateTime_Free, so the object is "conceptually deallocated" (placed in the free list), *but* the object is not removed from refchain. So if a refchain-membership-integrity-check is performed on the object in question or one of its immediate neighbors in refchain, that integrity check fails, leading to the fatal error. --- The solution is to 'Py_DECREF(...)' the object in the onError handler of its constructor, instead of passing the object directly to mxDateTime_Free. That change solves two problems: 1) It causes _Py_Dealloc to execute, which in turn executes _Py_ForgetReference, so the object is removed from refchain, as it should be. 2) At present, objects that are created successfully and later deallocated by normal reference count mechanics have a reference count of 0 when they enter the free list, whereas objects whose constructors abort their creation due to invalid arguments have a reference count of 1 when they enter the free list. Although AFAIK this doesn't cause an actual execution problem (because the object's reference count is *explicitly set to 1* rather than *incremented by 1* when the object is later "conceptually allocated" by _Py_NewReference), it is likely to confuse future maintainers and thereby lead to the introduction of an actual execution problem. I assume that if you agree that this is a reasonable solution, you'll want to apply the change not only to mxDateTime_FromDateAndTime, but to all similar constructors in mxDateTime.c. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From rj at maxxian.com Thu May 5 01:57:40 2005 From: rj at maxxian.com (RJ Juneau) Date: Wed Feb 1 08:10:53 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c5512e$f72798c0$6505a8c0@rjlaptop> I'm on the 30 day evaluation for mxodbc_zope_da. I'm getting the following error when I submit some queries: Error Type: KeyError Error Value: 'query' I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 with UCS4. The error seems to be caused by multiple rows being returned. I did see an earlier posting with the same error message. The response suggested a template error, but this is clearly not the case here. The additional evidence I've gathered so far: - I'm running the test directly from the ZSQL method, so there's no template involved. - If I use the same query with an additional "where" clause to ensure that only one row is returned, it works - If I use a value in the 'where' clause with no rows returned, it works - The same ZSQL query is being used on a Windows machine running Zope and the free ZODBC module without a problem - The query has been verified directly in mysql-client-browser Other info: - The database is MySQL 4.1.10A-0 - iODBC is the DB driver RJ Juneau -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050505/68d278bf/attachment-0077.htm From mal at egenix.com Thu May 5 12:37:43 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 1 08:10:53 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c5512e$f72798c0$6505a8c0@rjlaptop> References: <000301c5512e$f72798c0$6505a8c0@rjlaptop> Message-ID: <4279E967.6010904@egenix.com> RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 > with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 09:37:42 2005 From: rj at maxxian.com (RJ Juneau) Date: Wed Feb 1 08:10:53 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000101c5516f$3b96de90$6505a8c0@rjlaptop> More interesting info on the problem: If I execute the query directly in the "test" window of the base eGenix mxODBC Database Connection window, it works fine and returns the 20 lines expected. That could point to a problem in the rendering, which seems to be where the traceback ends. Note that within the same Zope system I also have an ODBC connection to a Sybase database, and I have successfully tested multi-line ZSQL queries there. This is the traceback: Time 2005/05/05 07:55:15.294 GMT-4 Exception Type KeyError Exception Value 'query' Traceback (innermost last): Module ZPublisher.Publish, line 101, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 39, in call_object Module Shared.DC.ZRDB.DA, line 337, in manage_test Module DocumentTemplate.DT_String, line 474, in __call__ Module DocumentTemplate.DT_In, line 602, in renderwb Module DocumentTemplate.DT_Var, line 219, in render KeyError: 'query' I don't think the following is an issue, but I'll include it for completeness.I am also getting the following iODBC warnings and errors in the Zope console log, which are related to the ODBC parameters being passed by iODBC. Note that these errors also appear for all of the successful queries. [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (Setup). [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (UsageCount). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Timeout). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Reuse). As for the ZSQL snippet from the template... Since there's no template involved yet (I'm still testing directly from the ZSQL method), I assume you mean the SQL code? select h.host_name, s.system_name, s.system_handle, count(*) from terminal t, system_map s, host h where t.system_index = s.system_index and s.host_index = h.host_index group by s.system_name order by h.host_name Nothing complicated here. There are no parameters passed to the query. RJ -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: May 5, 2005 5:38 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: Re: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is > 2.3.4 with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ---------------------------------------------------------------------- > -- > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 16:00:32 2005 From: charlie at egenix.com (Charlie Clark) Date: Wed Feb 1 08:10:53 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000101c5516f$3b96de90$6505a8c0@rjlaptop> References: <000101c5516f$3b96de90$6505a8c0@rjlaptop> Message-ID: <20050505150032.644.1@bepc.1115296715.fake> On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base eGenix > mxODBC Database Connection window, it works fine and returns the 20 > lines expected. That could point to a problem in the rendering, which > seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection to > a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 10:22:17 2005 From: rj at maxxian.com (RJ Juneau) Date: Wed Feb 1 08:10:53 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505150032.644.1@bepc.1115296715.fake> Message-ID: <000201c55175$75bcad10$6505a8c0@rjlaptop> At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 11:47:14 2005 From: rj at maxxian.com (RJ Juneau) Date: Wed Feb 1 08:10:54 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c55181$549be0e0$6505a8c0@rjlaptop> Charlie, I found a fix. Here it is in case anyone else runs into this. You were correct - the problem is in another part of Zope. Based on your feedback, I did a bit more searching and found something here: http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. html The problem appears to be in Zope versions after 2.7.0. I'm running 2.7.6, and the post indicates that it also happens in 2.7.4. The solution: Edit file /lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. There are two lines in the file that start with . Edit them as follows: Change first line to: Change second line to: Just to be after, I shut down Zope before I made the changes and restarted it after. Thanks for the help! RJ -----Original Message----- From: RJ Juneau [mailto:rj@maxxian.com] Sent: May 5, 2005 9:22 AM To: 'Charlie Clark' Cc: 'egenix-users@lists.egenix.com' Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 17:57:25 2005 From: charlie at egenix.com (Charlie Clark) Date: Wed Feb 1 08:10:54 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <20050505165725.3380.2@bepc.1115296715.fake> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Thu May 5 09:15:21 2005 From: charlie at egenix.com (Charlie Clark) Date: Wed Feb 1 08:10:54 2006 Subject: [Zope-DB] RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <000001c55185$41477730$6b00a8c0@fonacier.local> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________ Zope-DB mailing list Zope-DB@zope.org http://mail.zope.org/mailman/listinfo/zope-db From rj at maxxian.com Thu May 5 12:38:00 2005 From: rj at maxxian.com (RJ Juneau) Date: Wed Feb 1 08:10:54 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000001c55188$6b841eb0$6505a8c0@rjlaptop> I just double-checked. Zope-2.7.6-final. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 12:49:16 2005 From: rj at maxxian.com (RJ Juneau) Date: Wed Feb 1 08:10:54 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000501c55189$fe149ba0$6505a8c0@rjlaptop> Charlie, The fix has only been applied for 2.7.7, 2.8b2. The info is in the original bug report which is closed and can be found here: http://www.zope.org/Collectors/Zope/1745 RJ -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Fri May 6 11:50:09 2005 From: rj at maxxian.com (RJ Juneau) Date: Wed Feb 1 08:10:54 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC Message-ID: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Still on eval for the product. I cannot get a stable connection to Sybase via the iODBC drivers. - The Sybase ODBC connection - including a query - have been verified at the iODBC level. - The setup is already working well for ODBC connection to MySQL. Symptoms include: - If I click on "Open Connection", it still comes back with "Connection Closed" when I go to a ZSQL method - Using 'Connect on Demand' is not working either. - Clicking "Open Connection" gives me the following error: Connection string: DSN=lixbox_sybase; UID=sa; PWD=XXXXXXX Connection pool entry: 0 Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection rejected by data source', 7952) The odbc.ini definition for DSN "lixbox_sybase" is as follows: [lixbox_sybase] JetFix = No NoRowSetSizeLimit = No Description = Test connection to listbox Options = LIXBOX DSQUERY = SQLSERVER TDSHOST = lixbox TDSPORT = 5000 TDSVER = 5.0 SQLSERVER_CATALOG = N CURSOR_SENSITIVITY = LOW UserName = sa Password = XXXXXXXX ServerType = Sybase 10/11/12 Driver = /opt/openlink/lib/sql_mt_lt.so Database = pubs2 ReadOnly = no NoAutoCommit = No NoLoginBox = No FetchBufferSize = 60 Other relevant data: - Connecting via OpenLink's iODBC - Zope 2.7.6-final - Python 2.3.4 - Connection to Sybase has been successfully tested with iODBC, including issuing a query - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC connection RJ Juneau Chief Technology Officer Maxxian Integration Inc. 155 Westhampton Drive Thornhill, Ontario Canada L4J 7X2 E-mail: rj@maxxian.com Phone: +1 905 482 9429 Cell: +1 416 897 6682 Toll free: +1 866 758 9161 Fax: +1 647 722 2038 -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050506/aef33361/attachment-0077.htm From mal at egenix.com Fri May 6 18:27:37 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 1 08:10:54 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC In-Reply-To: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> References: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Message-ID: <427B8CE9.1010601@egenix.com> RJ Juneau wrote: > Still on eval for the product. > > I cannot get a stable connection to Sybase via the iODBC drivers. > > - The Sybase ODBC connection - including a query - have been verified at > the iODBC level. > - The setup is already working well for ODBC connection to MySQL. > > Symptoms include: > > - If I click on "Open Connection", it still comes back with "Connection > Closed" when I go to a ZSQL method > - Using 'Connect on Demand' is not working either. > - Clicking "Open Connection" gives me the following error: > > Connection string: DSN=lixbox_sybase; > UID=sa; > PWD=XXXXXXX Try writing the connection string on one line and without whitespace. ODBC drivers sometimes have problems with this. > Connection pool entry: 0 > Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection > rejected by data source', 7952) This is a generic error that relates to authentication or firewall problems. It is possible that turning on ODBC tracing the ODBC manager will give more clues as to the real cause of the problem. > The odbc.ini definition for DSN "lixbox_sybase" is as follows: > > [lixbox_sybase] > JetFix = No > NoRowSetSizeLimit = No > Description = Test connection to listbox > Options = LIXBOX > DSQUERY = SQLSERVER > TDSHOST = lixbox > TDSPORT = 5000 > TDSVER = 5.0 > SQLSERVER_CATALOG = N > CURSOR_SENSITIVITY = LOW > UserName = sa > Password = XXXXXXXX > ServerType = Sybase 10/11/12 > Driver = /opt/openlink/lib/sql_mt_lt.so > Database = pubs2 > ReadOnly = no > NoAutoCommit = No > NoLoginBox = No > FetchBufferSize = 60 > > > Other relevant data: > - Connecting via OpenLink's iODBC > - Zope 2.7.6-final > - Python 2.3.4 > - Connection to Sybase has been successfully tested with iODBC, > including issuing a query > - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC > connection > > > > RJ Juneau > Chief Technology Officer > Maxxian Integration Inc. > 155 Westhampton Drive > Thornhill, Ontario > Canada L4J 7X2 > E-mail: rj@maxxian.com > Phone: +1 905 482 9429 > Cell: +1 416 897 6682 > Toll free: +1 866 758 9161 > Fax: +1 647 722 2038 > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 06 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From calisp at gmail.com Sun May 15 23:49:03 2005 From: calisp at gmail.com (calisp@gmail.com) Date: Wed Feb 1 08:10:54 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK Message-ID: Hi, I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the following error... 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the last phase of a two-phase commit. This shouldn't happen. Traceback (most recent call last): File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one jar.tpc_finish(self) File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish try: self._finish() File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could not perform COMMIT or ROLLBACK', 1023) What could be causing this? Can I get the mxODBCZopeDA source from somewhere? It would make debugging this much easier. Thanks, Calisp. From mal at egenix.com Mon May 16 13:52:12 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 1 08:10:54 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK In-Reply-To: References: Message-ID: <42887B5C.4010109@egenix.com> calisp@gmail.com wrote: > Hi, > > I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with > unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the > following error... > > 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the > last phase of a two-phase commit. This shouldn't happen. > Traceback (most recent call last): > File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one > jar.tpc_finish(self) > File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish > try: self._finish() > File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish > File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler > ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could > not perform COMMIT or ROLLBACK', 1023) You should have a look at the database logs to see what prevented the commit from being completed. > What could be causing this? Hard to say: mxODBCZopeDA is trying to commit the transaction, but the driver or database failed to complete the request. The above error was generated by the ODBC driver. This could be network or DNS problems, or be related to a bug in FreeTDS (which is getting more stable with every new release, but should still be considered beta quality software at the moment). > Can I get the mxODBCZopeDA source from > somewhere? It would make debugging this much easier. Getting the source is not an option and won't help much either since the source of the problem is not mxODBCZopeDA. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 16 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Sun May 1 21:29:25 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 1 12:03:05 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <427259F3.4090806@egenix.com> References: <20050427130906.52878.qmail@web30008.mail.mud.yahoo.com> <427259F3.4090806@egenix.com> Message-ID: <42752005.7080904@egenix.com> M.-A. Lemburg wrote: > David Rushby wrote: > >> --- "M.-A. Lemburg" wrote: >> >>> Are you using the standard mxDateTime build or one >>> with WANT_SUBCLASSABLE_TYPES defined... >> >> >> >> Presumably "the standard", since I just built with 'py24d setup.py >> build', making no attempt to enable special directives. >> >> >>> ... (mxDateTime_Deallocate is only used by the latter)? >> >> >> >> That's true in 2.1.0-2005-04-15, but not in 2.1.0b5. >> >> >>> In any case, please try our latest snapshot: >>> >>> >> >> http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-04-15.zip >> >>> to see if that makes any difference. >> >> >> >> I can't build it out of the box: > > > Hmm, looks like distutils' sdist command doesn't like our new > repository layout which uses symlinks (after we've switched to > subversion). > > We'll have to debug distutils first, I guess :-( Ok, we've found the problem and fixed it. Here's the new release (which does build out of the box at least on our boxes ;-): http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 01 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From davidrushby at yahoo.com Mon May 2 15:49:53 2005 From: davidrushby at yahoo.com (David Rushby) Date: Wed Feb 1 12:03:06 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Ok, we've found the problem and fixed it. Here's the new > release (which does build out of the box at least on our > boxes ;-): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip It does build now, but: py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" still behaves as it did when I submitted my original message: Fatal Python error: UNREF invalid object Aborted This is the same debug build of Python 2.4.1 that I was previously using, running the same configuration (CentOS Linux 4.0/i386, everything compiled with GCC 3.4.3). Have you examined my original claim as to the cause of the bug? __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 10:21:55 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 1 12:03:06 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> References: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> Message-ID: <42772693.8050306@egenix.com> David Rushby wrote: > --- "M.-A. Lemburg" wrote: > >>Ok, we've found the problem and fixed it. Here's the new >>release (which does build out of the box at least on our >>boxes ;-): >> >> > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip > > It does build now, but: > py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" > still behaves as it did when I submitted my original message: > Fatal Python error: UNREF invalid object > Aborted > > This is the same debug build of Python 2.4.1 that I was previously > using, running the same configuration (CentOS Linux 4.0/i386, > everything compiled with GCC 3.4.3). > > Have you examined my original claim as to the cause of the bug? No. We haven't had time for looking into it. I'm not sure whether your analysis of the problem is correct: if you don't define WANT_SUBCLASSABLE_TYPES, the API mxDateTime_Deallocate() is neither defined nor used. Furthermore, PyObject_Del() is only called by mxDateTime_Free() if you have explicitely edited mxDateTime.c to disabled the free list #defines. In a standard build, PyObject_Del() is only called at module finalization time. Note that the reason we call mxDateTime_Free() in the constructor is that we don't want the destructor of the object to be called. Py_DECREF() would call the destructor (mxDateTime_Deallocate). It is possible that the debug code in Python complains about the refcount in the object not being 0 at the time the object is finalized (module finalization time), but I don't see any such checks in PyObject_Free() (which is what PyObject_Del() maps to). Again, all of this does not happen in regular non-debug Python builds. Please be aware that we don't support debug builds, so fixing the problem (if there is one - gcc has some serious optimization problems on some combinations of platform and version) will take a while. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 09:27:37 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Wed Feb 1 12:03:06 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 Message-ID: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Hi all- I am trying to build the mx-base package, v.2.0.6. This will be used with postgresql 7.3.9, psycopg 1.1.18, and Roundup 0.8.2. RHEL 3.0 Python 2.3 egenix-mx-base-2.0.6.tar.gz I performed a: /usr/local/bin/python2.3 setup.py install Everything looks proper with the exeception of this series of warning statements: ----------------- gcc -pthread -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fno-strict-aliasing -fPIC -Imx/BeeBase/mxBeeBase -I/usr/local/incl ude/python2.3 -I/usr/local/include -c mx/BeeBase/mxBeeBase/btr.c -o build/temp.linux-i686-2.3/mx/BeeBase/mxBeeBase/mxBeeBa se/mx/BeeBase/mxBeeBase/btr.o mx/BeeBase/mxBeeBase/btr.c: In function `dumpBuf': mx/BeeBase/mxBeeBase/btr.c:249: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:250: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:255: warning: unsigned int format, long unsigned int arg (arg 4) mx/BeeBase/mxBeeBase/btr.c:256: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c: In function `_validateTree': mx/BeeBase/mxBeeBase/btr.c:330: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:337: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:339: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:349: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:351: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 3) creating build/lib.linux-i686-2.3/mx/BeeBase creating build/lib.linux-i686-2.3/mx/BeeBase/mxBeeBase -------------- Would someone be kind enough to let me know whether these messages were expected, and if not, how I might resolve these? Thanks! DC __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 22:06:33 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 1 12:03:06 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> References: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Message-ID: <4277CBB9.8020302@egenix.com> Dianne Chen wrote: > Hi all- > > I am trying to build the mx-base package, v.2.0.6. > This will be used with postgresql 7.3.9, psycopg > 1.1.18, and Roundup 0.8.2. > > RHEL 3.0 > Python 2.3 > egenix-mx-base-2.0.6.tar.gz > > I performed a: > > /usr/local/bin/python2.3 setup.py install > > Everything looks proper with the exeception of this > series of warning statements: > > ----------------- > ... > -------------- > > Would someone be kind enough to let me know whether > these messages were expected, and if not, how I might > resolve these? These warning can safely be ignored. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 13:41:14 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Wed Feb 1 12:03:06 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: 6667 Message-ID: <20050503194114.72091.qmail@web31414.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Dianne Chen wrote: > > Hi all- > > > > I am trying to build the mx-base package, v.2.0.6. > > This will be used with postgresql 7.3.9, psycopg > > 1.1.18, and Roundup 0.8.2. > > > > RHEL 3.0 > > Python 2.3 > > egenix-mx-base-2.0.6.tar.gz > > > > I performed a: > > > > /usr/local/bin/python2.3 setup.py install > > > > Everything looks proper with the exeception of > this > > series of warning statements: > > > > ----------------- > > ... > > -------------- > > > > Would someone be kind enough to let me know > whether > > these messages were expected, and if not, how I > might > > resolve these? > > These warning can safely be ignored. > > -- > Marc-Andre Lemburg > eGenix.com > Marc- Thank you very much for the reply. It helps greatly. With kind regards, DC __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From davidrushby at yahoo.com Tue May 3 17:18:46 2005 From: davidrushby at yahoo.com (David Rushby) Date: Wed Feb 1 12:03:06 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050503231846.35012.qmail@web30009.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > I'm not sure whether your analysis of the problem is correct... Indeed, my original analysis wasn't correct; I think this one is. The fatal error I'm complaining about only arises if the arguments to DateTime.DateTime are invalid, so that the object is deallocated in the onError block of mxDateTime_FromDateAndTime. If the object is created successfully, and later deallocated by Python's garbage collector, the fatal error doesn't arise. Here's my analysis of the problem: --- If the debugging directive Py_TRACE_REFS is enabled, as it is in my case, the Python interpreter maintains a doubly linked list of all Python objects (named refchain) via the _ob_next and _ob_prev pointers added to PyObject via _PyObject_HEAD_EXTRA. Each object is inserted into refchain by the _Py_AddToAllObjects call in _Py_NewReference, and removed from refchain by the _Py_ForgetReference call in _Py_Dealloc. _Py_ForgetReference performs an integrity check on the object being deallocated (op) to make sure that its neighbors in refchain recognize it. Specifically, _Py_ForgetReference verifies that the _ob_next pointer of the previous object in refchain (op->_ob_prev->_ob_next) points to op, and that the _ob_prev pointer of the next object in refchain (op->_ob_next->_ob_prev) points to op. If either of those conditions is false, the interpreter raises the fatal error I'm seeing. After mxDateTime_New pulls an mxDateTimeObject out of the free list, it calls _Py_NewReference on that object to transform it from a "conceptually deallocated" object to a "conceptually allocated" one. _Py_NewReference inserts the object into refchain. Later, when the object is being "conceptually deallocated", it should be removed from refchain with _Py_ForgetReference. The version of _Py_Dealloc that's active when Py_TRACE_REFS is enabled does this (_Py_Dealloc is the element of Py_DECREF that performs the actual destruction). _Py_Dealloc first calls _Py_ForgetReference to remove the object from refchain, then calls the object's destructor (op->ob_type->tp_dealloc). If WANT_SUBCLASSABLE_TYPES is not defined (it is not in my case), the destructor for mxDateTime_Type is mxDateTime_Free. So, if a DateTime object is deallocated normally, as a result of its reference count falling to zero, _Py_Dealloc is called on the object, which first removes it from refchain, then passes it to mxDateTime_Free. If a DateTime object is destroyed prematurely, as a result of invalid arguments to its destructor, the onError handler calls mxDateTime_Free, so the object is "conceptually deallocated" (placed in the free list), *but* the object is not removed from refchain. So if a refchain-membership-integrity-check is performed on the object in question or one of its immediate neighbors in refchain, that integrity check fails, leading to the fatal error. --- The solution is to 'Py_DECREF(...)' the object in the onError handler of its constructor, instead of passing the object directly to mxDateTime_Free. That change solves two problems: 1) It causes _Py_Dealloc to execute, which in turn executes _Py_ForgetReference, so the object is removed from refchain, as it should be. 2) At present, objects that are created successfully and later deallocated by normal reference count mechanics have a reference count of 0 when they enter the free list, whereas objects whose constructors abort their creation due to invalid arguments have a reference count of 1 when they enter the free list. Although AFAIK this doesn't cause an actual execution problem (because the object's reference count is *explicitly set to 1* rather than *incremented by 1* when the object is later "conceptually allocated" by _Py_NewReference), it is likely to confuse future maintainers and thereby lead to the introduction of an actual execution problem. I assume that if you agree that this is a reasonable solution, you'll want to apply the change not only to mxDateTime_FromDateAndTime, but to all similar constructors in mxDateTime.c. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From rj at maxxian.com Thu May 5 01:57:40 2005 From: rj at maxxian.com (RJ Juneau) Date: Wed Feb 1 12:03:06 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c5512e$f72798c0$6505a8c0@rjlaptop> I'm on the 30 day evaluation for mxodbc_zope_da. I'm getting the following error when I submit some queries: Error Type: KeyError Error Value: 'query' I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 with UCS4. The error seems to be caused by multiple rows being returned. I did see an earlier posting with the same error message. The response suggested a template error, but this is clearly not the case here. The additional evidence I've gathered so far: - I'm running the test directly from the ZSQL method, so there's no template involved. - If I use the same query with an additional "where" clause to ensure that only one row is returned, it works - If I use a value in the 'where' clause with no rows returned, it works - The same ZSQL query is being used on a Windows machine running Zope and the free ZODBC module without a problem - The query has been verified directly in mysql-client-browser Other info: - The database is MySQL 4.1.10A-0 - iODBC is the DB driver RJ Juneau -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050505/68d278bf/attachment-0078.htm From mal at egenix.com Thu May 5 12:37:43 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 1 12:03:06 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c5512e$f72798c0$6505a8c0@rjlaptop> References: <000301c5512e$f72798c0$6505a8c0@rjlaptop> Message-ID: <4279E967.6010904@egenix.com> RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 > with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 09:37:42 2005 From: rj at maxxian.com (RJ Juneau) Date: Wed Feb 1 12:03:06 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000101c5516f$3b96de90$6505a8c0@rjlaptop> More interesting info on the problem: If I execute the query directly in the "test" window of the base eGenix mxODBC Database Connection window, it works fine and returns the 20 lines expected. That could point to a problem in the rendering, which seems to be where the traceback ends. Note that within the same Zope system I also have an ODBC connection to a Sybase database, and I have successfully tested multi-line ZSQL queries there. This is the traceback: Time 2005/05/05 07:55:15.294 GMT-4 Exception Type KeyError Exception Value 'query' Traceback (innermost last): Module ZPublisher.Publish, line 101, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 39, in call_object Module Shared.DC.ZRDB.DA, line 337, in manage_test Module DocumentTemplate.DT_String, line 474, in __call__ Module DocumentTemplate.DT_In, line 602, in renderwb Module DocumentTemplate.DT_Var, line 219, in render KeyError: 'query' I don't think the following is an issue, but I'll include it for completeness.I am also getting the following iODBC warnings and errors in the Zope console log, which are related to the ODBC parameters being passed by iODBC. Note that these errors also appear for all of the successful queries. [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (Setup). [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (UsageCount). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Timeout). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Reuse). As for the ZSQL snippet from the template... Since there's no template involved yet (I'm still testing directly from the ZSQL method), I assume you mean the SQL code? select h.host_name, s.system_name, s.system_handle, count(*) from terminal t, system_map s, host h where t.system_index = s.system_index and s.host_index = h.host_index group by s.system_name order by h.host_name Nothing complicated here. There are no parameters passed to the query. RJ -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: May 5, 2005 5:38 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: Re: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is > 2.3.4 with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ---------------------------------------------------------------------- > -- > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 16:00:32 2005 From: charlie at egenix.com (Charlie Clark) Date: Wed Feb 1 12:03:06 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000101c5516f$3b96de90$6505a8c0@rjlaptop> References: <000101c5516f$3b96de90$6505a8c0@rjlaptop> Message-ID: <20050505150032.644.1@bepc.1115296715.fake> On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base eGenix > mxODBC Database Connection window, it works fine and returns the 20 > lines expected. That could point to a problem in the rendering, which > seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection to > a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 10:22:17 2005 From: rj at maxxian.com (RJ Juneau) Date: Wed Feb 1 12:03:06 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505150032.644.1@bepc.1115296715.fake> Message-ID: <000201c55175$75bcad10$6505a8c0@rjlaptop> At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 11:47:14 2005 From: rj at maxxian.com (RJ Juneau) Date: Wed Feb 1 12:03:07 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c55181$549be0e0$6505a8c0@rjlaptop> Charlie, I found a fix. Here it is in case anyone else runs into this. You were correct - the problem is in another part of Zope. Based on your feedback, I did a bit more searching and found something here: http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. html The problem appears to be in Zope versions after 2.7.0. I'm running 2.7.6, and the post indicates that it also happens in 2.7.4. The solution: Edit file /lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. There are two lines in the file that start with . Edit them as follows: Change first line to: Change second line to: Just to be after, I shut down Zope before I made the changes and restarted it after. Thanks for the help! RJ -----Original Message----- From: RJ Juneau [mailto:rj@maxxian.com] Sent: May 5, 2005 9:22 AM To: 'Charlie Clark' Cc: 'egenix-users@lists.egenix.com' Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 17:57:25 2005 From: charlie at egenix.com (Charlie Clark) Date: Wed Feb 1 12:03:07 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <20050505165725.3380.2@bepc.1115296715.fake> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Thu May 5 09:15:21 2005 From: charlie at egenix.com (Charlie Clark) Date: Wed Feb 1 12:03:07 2006 Subject: [Zope-DB] RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <000001c55185$41477730$6b00a8c0@fonacier.local> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________ Zope-DB mailing list Zope-DB@zope.org http://mail.zope.org/mailman/listinfo/zope-db From rj at maxxian.com Thu May 5 12:38:00 2005 From: rj at maxxian.com (RJ Juneau) Date: Wed Feb 1 12:03:07 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000001c55188$6b841eb0$6505a8c0@rjlaptop> I just double-checked. Zope-2.7.6-final. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 12:49:16 2005 From: rj at maxxian.com (RJ Juneau) Date: Wed Feb 1 12:03:07 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000501c55189$fe149ba0$6505a8c0@rjlaptop> Charlie, The fix has only been applied for 2.7.7, 2.8b2. The info is in the original bug report which is closed and can be found here: http://www.zope.org/Collectors/Zope/1745 RJ -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Fri May 6 11:50:09 2005 From: rj at maxxian.com (RJ Juneau) Date: Wed Feb 1 12:03:07 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC Message-ID: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Still on eval for the product. I cannot get a stable connection to Sybase via the iODBC drivers. - The Sybase ODBC connection - including a query - have been verified at the iODBC level. - The setup is already working well for ODBC connection to MySQL. Symptoms include: - If I click on "Open Connection", it still comes back with "Connection Closed" when I go to a ZSQL method - Using 'Connect on Demand' is not working either. - Clicking "Open Connection" gives me the following error: Connection string: DSN=lixbox_sybase; UID=sa; PWD=XXXXXXX Connection pool entry: 0 Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection rejected by data source', 7952) The odbc.ini definition for DSN "lixbox_sybase" is as follows: [lixbox_sybase] JetFix = No NoRowSetSizeLimit = No Description = Test connection to listbox Options = LIXBOX DSQUERY = SQLSERVER TDSHOST = lixbox TDSPORT = 5000 TDSVER = 5.0 SQLSERVER_CATALOG = N CURSOR_SENSITIVITY = LOW UserName = sa Password = XXXXXXXX ServerType = Sybase 10/11/12 Driver = /opt/openlink/lib/sql_mt_lt.so Database = pubs2 ReadOnly = no NoAutoCommit = No NoLoginBox = No FetchBufferSize = 60 Other relevant data: - Connecting via OpenLink's iODBC - Zope 2.7.6-final - Python 2.3.4 - Connection to Sybase has been successfully tested with iODBC, including issuing a query - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC connection RJ Juneau Chief Technology Officer Maxxian Integration Inc. 155 Westhampton Drive Thornhill, Ontario Canada L4J 7X2 E-mail: rj@maxxian.com Phone: +1 905 482 9429 Cell: +1 416 897 6682 Toll free: +1 866 758 9161 Fax: +1 647 722 2038 -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050506/aef33361/attachment-0078.htm From mal at egenix.com Fri May 6 18:27:37 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 1 12:03:07 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC In-Reply-To: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> References: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Message-ID: <427B8CE9.1010601@egenix.com> RJ Juneau wrote: > Still on eval for the product. > > I cannot get a stable connection to Sybase via the iODBC drivers. > > - The Sybase ODBC connection - including a query - have been verified at > the iODBC level. > - The setup is already working well for ODBC connection to MySQL. > > Symptoms include: > > - If I click on "Open Connection", it still comes back with "Connection > Closed" when I go to a ZSQL method > - Using 'Connect on Demand' is not working either. > - Clicking "Open Connection" gives me the following error: > > Connection string: DSN=lixbox_sybase; > UID=sa; > PWD=XXXXXXX Try writing the connection string on one line and without whitespace. ODBC drivers sometimes have problems with this. > Connection pool entry: 0 > Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection > rejected by data source', 7952) This is a generic error that relates to authentication or firewall problems. It is possible that turning on ODBC tracing the ODBC manager will give more clues as to the real cause of the problem. > The odbc.ini definition for DSN "lixbox_sybase" is as follows: > > [lixbox_sybase] > JetFix = No > NoRowSetSizeLimit = No > Description = Test connection to listbox > Options = LIXBOX > DSQUERY = SQLSERVER > TDSHOST = lixbox > TDSPORT = 5000 > TDSVER = 5.0 > SQLSERVER_CATALOG = N > CURSOR_SENSITIVITY = LOW > UserName = sa > Password = XXXXXXXX > ServerType = Sybase 10/11/12 > Driver = /opt/openlink/lib/sql_mt_lt.so > Database = pubs2 > ReadOnly = no > NoAutoCommit = No > NoLoginBox = No > FetchBufferSize = 60 > > > Other relevant data: > - Connecting via OpenLink's iODBC > - Zope 2.7.6-final > - Python 2.3.4 > - Connection to Sybase has been successfully tested with iODBC, > including issuing a query > - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC > connection > > > > RJ Juneau > Chief Technology Officer > Maxxian Integration Inc. > 155 Westhampton Drive > Thornhill, Ontario > Canada L4J 7X2 > E-mail: rj@maxxian.com > Phone: +1 905 482 9429 > Cell: +1 416 897 6682 > Toll free: +1 866 758 9161 > Fax: +1 647 722 2038 > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 06 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From calisp at gmail.com Sun May 15 23:49:03 2005 From: calisp at gmail.com (calisp@gmail.com) Date: Wed Feb 1 12:03:07 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK Message-ID: Hi, I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the following error... 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the last phase of a two-phase commit. This shouldn't happen. Traceback (most recent call last): File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one jar.tpc_finish(self) File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish try: self._finish() File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could not perform COMMIT or ROLLBACK', 1023) What could be causing this? Can I get the mxODBCZopeDA source from somewhere? It would make debugging this much easier. Thanks, Calisp. From mal at egenix.com Mon May 16 13:52:12 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 1 12:03:07 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK In-Reply-To: References: Message-ID: <42887B5C.4010109@egenix.com> calisp@gmail.com wrote: > Hi, > > I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with > unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the > following error... > > 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the > last phase of a two-phase commit. This shouldn't happen. > Traceback (most recent call last): > File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one > jar.tpc_finish(self) > File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish > try: self._finish() > File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish > File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler > ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could > not perform COMMIT or ROLLBACK', 1023) You should have a look at the database logs to see what prevented the commit from being completed. > What could be causing this? Hard to say: mxODBCZopeDA is trying to commit the transaction, but the driver or database failed to complete the request. The above error was generated by the ODBC driver. This could be network or DNS problems, or be related to a bug in FreeTDS (which is getting more stable with every new release, but should still be considered beta quality software at the moment). > Can I get the mxODBCZopeDA source from > somewhere? It would make debugging this much easier. Getting the source is not an option and won't help much either since the source of the problem is not mxODBCZopeDA. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 16 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Sun May 1 21:29:25 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 1 16:01:19 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <427259F3.4090806@egenix.com> References: <20050427130906.52878.qmail@web30008.mail.mud.yahoo.com> <427259F3.4090806@egenix.com> Message-ID: <42752005.7080904@egenix.com> M.-A. Lemburg wrote: > David Rushby wrote: > >> --- "M.-A. Lemburg" wrote: >> >>> Are you using the standard mxDateTime build or one >>> with WANT_SUBCLASSABLE_TYPES defined... >> >> >> >> Presumably "the standard", since I just built with 'py24d setup.py >> build', making no attempt to enable special directives. >> >> >>> ... (mxDateTime_Deallocate is only used by the latter)? >> >> >> >> That's true in 2.1.0-2005-04-15, but not in 2.1.0b5. >> >> >>> In any case, please try our latest snapshot: >>> >>> >> >> http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-04-15.zip >> >>> to see if that makes any difference. >> >> >> >> I can't build it out of the box: > > > Hmm, looks like distutils' sdist command doesn't like our new > repository layout which uses symlinks (after we've switched to > subversion). > > We'll have to debug distutils first, I guess :-( Ok, we've found the problem and fixed it. Here's the new release (which does build out of the box at least on our boxes ;-): http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 01 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From davidrushby at yahoo.com Mon May 2 15:49:53 2005 From: davidrushby at yahoo.com (David Rushby) Date: Wed Feb 1 16:01:19 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Ok, we've found the problem and fixed it. Here's the new > release (which does build out of the box at least on our > boxes ;-): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip It does build now, but: py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" still behaves as it did when I submitted my original message: Fatal Python error: UNREF invalid object Aborted This is the same debug build of Python 2.4.1 that I was previously using, running the same configuration (CentOS Linux 4.0/i386, everything compiled with GCC 3.4.3). Have you examined my original claim as to the cause of the bug? __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 10:21:55 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 1 16:01:19 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> References: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> Message-ID: <42772693.8050306@egenix.com> David Rushby wrote: > --- "M.-A. Lemburg" wrote: > >>Ok, we've found the problem and fixed it. Here's the new >>release (which does build out of the box at least on our >>boxes ;-): >> >> > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip > > It does build now, but: > py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" > still behaves as it did when I submitted my original message: > Fatal Python error: UNREF invalid object > Aborted > > This is the same debug build of Python 2.4.1 that I was previously > using, running the same configuration (CentOS Linux 4.0/i386, > everything compiled with GCC 3.4.3). > > Have you examined my original claim as to the cause of the bug? No. We haven't had time for looking into it. I'm not sure whether your analysis of the problem is correct: if you don't define WANT_SUBCLASSABLE_TYPES, the API mxDateTime_Deallocate() is neither defined nor used. Furthermore, PyObject_Del() is only called by mxDateTime_Free() if you have explicitely edited mxDateTime.c to disabled the free list #defines. In a standard build, PyObject_Del() is only called at module finalization time. Note that the reason we call mxDateTime_Free() in the constructor is that we don't want the destructor of the object to be called. Py_DECREF() would call the destructor (mxDateTime_Deallocate). It is possible that the debug code in Python complains about the refcount in the object not being 0 at the time the object is finalized (module finalization time), but I don't see any such checks in PyObject_Free() (which is what PyObject_Del() maps to). Again, all of this does not happen in regular non-debug Python builds. Please be aware that we don't support debug builds, so fixing the problem (if there is one - gcc has some serious optimization problems on some combinations of platform and version) will take a while. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 09:27:37 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Wed Feb 1 16:01:19 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 Message-ID: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Hi all- I am trying to build the mx-base package, v.2.0.6. This will be used with postgresql 7.3.9, psycopg 1.1.18, and Roundup 0.8.2. RHEL 3.0 Python 2.3 egenix-mx-base-2.0.6.tar.gz I performed a: /usr/local/bin/python2.3 setup.py install Everything looks proper with the exeception of this series of warning statements: ----------------- gcc -pthread -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fno-strict-aliasing -fPIC -Imx/BeeBase/mxBeeBase -I/usr/local/incl ude/python2.3 -I/usr/local/include -c mx/BeeBase/mxBeeBase/btr.c -o build/temp.linux-i686-2.3/mx/BeeBase/mxBeeBase/mxBeeBa se/mx/BeeBase/mxBeeBase/btr.o mx/BeeBase/mxBeeBase/btr.c: In function `dumpBuf': mx/BeeBase/mxBeeBase/btr.c:249: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:250: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:255: warning: unsigned int format, long unsigned int arg (arg 4) mx/BeeBase/mxBeeBase/btr.c:256: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c: In function `_validateTree': mx/BeeBase/mxBeeBase/btr.c:330: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:337: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:339: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:349: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:351: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 3) creating build/lib.linux-i686-2.3/mx/BeeBase creating build/lib.linux-i686-2.3/mx/BeeBase/mxBeeBase -------------- Would someone be kind enough to let me know whether these messages were expected, and if not, how I might resolve these? Thanks! DC __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 22:06:33 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 1 16:01:19 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> References: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Message-ID: <4277CBB9.8020302@egenix.com> Dianne Chen wrote: > Hi all- > > I am trying to build the mx-base package, v.2.0.6. > This will be used with postgresql 7.3.9, psycopg > 1.1.18, and Roundup 0.8.2. > > RHEL 3.0 > Python 2.3 > egenix-mx-base-2.0.6.tar.gz > > I performed a: > > /usr/local/bin/python2.3 setup.py install > > Everything looks proper with the exeception of this > series of warning statements: > > ----------------- > ... > -------------- > > Would someone be kind enough to let me know whether > these messages were expected, and if not, how I might > resolve these? These warning can safely be ignored. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 13:41:14 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Wed Feb 1 16:01:19 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: 6667 Message-ID: <20050503194114.72091.qmail@web31414.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Dianne Chen wrote: > > Hi all- > > > > I am trying to build the mx-base package, v.2.0.6. > > This will be used with postgresql 7.3.9, psycopg > > 1.1.18, and Roundup 0.8.2. > > > > RHEL 3.0 > > Python 2.3 > > egenix-mx-base-2.0.6.tar.gz > > > > I performed a: > > > > /usr/local/bin/python2.3 setup.py install > > > > Everything looks proper with the exeception of > this > > series of warning statements: > > > > ----------------- > > ... > > -------------- > > > > Would someone be kind enough to let me know > whether > > these messages were expected, and if not, how I > might > > resolve these? > > These warning can safely be ignored. > > -- > Marc-Andre Lemburg > eGenix.com > Marc- Thank you very much for the reply. It helps greatly. With kind regards, DC __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From davidrushby at yahoo.com Tue May 3 17:18:46 2005 From: davidrushby at yahoo.com (David Rushby) Date: Wed Feb 1 16:01:19 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050503231846.35012.qmail@web30009.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > I'm not sure whether your analysis of the problem is correct... Indeed, my original analysis wasn't correct; I think this one is. The fatal error I'm complaining about only arises if the arguments to DateTime.DateTime are invalid, so that the object is deallocated in the onError block of mxDateTime_FromDateAndTime. If the object is created successfully, and later deallocated by Python's garbage collector, the fatal error doesn't arise. Here's my analysis of the problem: --- If the debugging directive Py_TRACE_REFS is enabled, as it is in my case, the Python interpreter maintains a doubly linked list of all Python objects (named refchain) via the _ob_next and _ob_prev pointers added to PyObject via _PyObject_HEAD_EXTRA. Each object is inserted into refchain by the _Py_AddToAllObjects call in _Py_NewReference, and removed from refchain by the _Py_ForgetReference call in _Py_Dealloc. _Py_ForgetReference performs an integrity check on the object being deallocated (op) to make sure that its neighbors in refchain recognize it. Specifically, _Py_ForgetReference verifies that the _ob_next pointer of the previous object in refchain (op->_ob_prev->_ob_next) points to op, and that the _ob_prev pointer of the next object in refchain (op->_ob_next->_ob_prev) points to op. If either of those conditions is false, the interpreter raises the fatal error I'm seeing. After mxDateTime_New pulls an mxDateTimeObject out of the free list, it calls _Py_NewReference on that object to transform it from a "conceptually deallocated" object to a "conceptually allocated" one. _Py_NewReference inserts the object into refchain. Later, when the object is being "conceptually deallocated", it should be removed from refchain with _Py_ForgetReference. The version of _Py_Dealloc that's active when Py_TRACE_REFS is enabled does this (_Py_Dealloc is the element of Py_DECREF that performs the actual destruction). _Py_Dealloc first calls _Py_ForgetReference to remove the object from refchain, then calls the object's destructor (op->ob_type->tp_dealloc). If WANT_SUBCLASSABLE_TYPES is not defined (it is not in my case), the destructor for mxDateTime_Type is mxDateTime_Free. So, if a DateTime object is deallocated normally, as a result of its reference count falling to zero, _Py_Dealloc is called on the object, which first removes it from refchain, then passes it to mxDateTime_Free. If a DateTime object is destroyed prematurely, as a result of invalid arguments to its destructor, the onError handler calls mxDateTime_Free, so the object is "conceptually deallocated" (placed in the free list), *but* the object is not removed from refchain. So if a refchain-membership-integrity-check is performed on the object in question or one of its immediate neighbors in refchain, that integrity check fails, leading to the fatal error. --- The solution is to 'Py_DECREF(...)' the object in the onError handler of its constructor, instead of passing the object directly to mxDateTime_Free. That change solves two problems: 1) It causes _Py_Dealloc to execute, which in turn executes _Py_ForgetReference, so the object is removed from refchain, as it should be. 2) At present, objects that are created successfully and later deallocated by normal reference count mechanics have a reference count of 0 when they enter the free list, whereas objects whose constructors abort their creation due to invalid arguments have a reference count of 1 when they enter the free list. Although AFAIK this doesn't cause an actual execution problem (because the object's reference count is *explicitly set to 1* rather than *incremented by 1* when the object is later "conceptually allocated" by _Py_NewReference), it is likely to confuse future maintainers and thereby lead to the introduction of an actual execution problem. I assume that if you agree that this is a reasonable solution, you'll want to apply the change not only to mxDateTime_FromDateAndTime, but to all similar constructors in mxDateTime.c. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From rj at maxxian.com Thu May 5 01:57:40 2005 From: rj at maxxian.com (RJ Juneau) Date: Wed Feb 1 16:01:19 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c5512e$f72798c0$6505a8c0@rjlaptop> I'm on the 30 day evaluation for mxodbc_zope_da. I'm getting the following error when I submit some queries: Error Type: KeyError Error Value: 'query' I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 with UCS4. The error seems to be caused by multiple rows being returned. I did see an earlier posting with the same error message. The response suggested a template error, but this is clearly not the case here. The additional evidence I've gathered so far: - I'm running the test directly from the ZSQL method, so there's no template involved. - If I use the same query with an additional "where" clause to ensure that only one row is returned, it works - If I use a value in the 'where' clause with no rows returned, it works - The same ZSQL query is being used on a Windows machine running Zope and the free ZODBC module without a problem - The query has been verified directly in mysql-client-browser Other info: - The database is MySQL 4.1.10A-0 - iODBC is the DB driver RJ Juneau -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050505/68d278bf/attachment-0079.htm From mal at egenix.com Thu May 5 12:37:43 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 1 16:01:19 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c5512e$f72798c0$6505a8c0@rjlaptop> References: <000301c5512e$f72798c0$6505a8c0@rjlaptop> Message-ID: <4279E967.6010904@egenix.com> RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 > with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 09:37:42 2005 From: rj at maxxian.com (RJ Juneau) Date: Wed Feb 1 16:01:19 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000101c5516f$3b96de90$6505a8c0@rjlaptop> More interesting info on the problem: If I execute the query directly in the "test" window of the base eGenix mxODBC Database Connection window, it works fine and returns the 20 lines expected. That could point to a problem in the rendering, which seems to be where the traceback ends. Note that within the same Zope system I also have an ODBC connection to a Sybase database, and I have successfully tested multi-line ZSQL queries there. This is the traceback: Time 2005/05/05 07:55:15.294 GMT-4 Exception Type KeyError Exception Value 'query' Traceback (innermost last): Module ZPublisher.Publish, line 101, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 39, in call_object Module Shared.DC.ZRDB.DA, line 337, in manage_test Module DocumentTemplate.DT_String, line 474, in __call__ Module DocumentTemplate.DT_In, line 602, in renderwb Module DocumentTemplate.DT_Var, line 219, in render KeyError: 'query' I don't think the following is an issue, but I'll include it for completeness.I am also getting the following iODBC warnings and errors in the Zope console log, which are related to the ODBC parameters being passed by iODBC. Note that these errors also appear for all of the successful queries. [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (Setup). [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (UsageCount). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Timeout). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Reuse). As for the ZSQL snippet from the template... Since there's no template involved yet (I'm still testing directly from the ZSQL method), I assume you mean the SQL code? select h.host_name, s.system_name, s.system_handle, count(*) from terminal t, system_map s, host h where t.system_index = s.system_index and s.host_index = h.host_index group by s.system_name order by h.host_name Nothing complicated here. There are no parameters passed to the query. RJ -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: May 5, 2005 5:38 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: Re: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is > 2.3.4 with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ---------------------------------------------------------------------- > -- > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 16:00:32 2005 From: charlie at egenix.com (Charlie Clark) Date: Wed Feb 1 16:01:20 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000101c5516f$3b96de90$6505a8c0@rjlaptop> References: <000101c5516f$3b96de90$6505a8c0@rjlaptop> Message-ID: <20050505150032.644.1@bepc.1115296715.fake> On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base eGenix > mxODBC Database Connection window, it works fine and returns the 20 > lines expected. That could point to a problem in the rendering, which > seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection to > a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 10:22:17 2005 From: rj at maxxian.com (RJ Juneau) Date: Wed Feb 1 16:01:20 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505150032.644.1@bepc.1115296715.fake> Message-ID: <000201c55175$75bcad10$6505a8c0@rjlaptop> At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 11:47:14 2005 From: rj at maxxian.com (RJ Juneau) Date: Wed Feb 1 16:01:20 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c55181$549be0e0$6505a8c0@rjlaptop> Charlie, I found a fix. Here it is in case anyone else runs into this. You were correct - the problem is in another part of Zope. Based on your feedback, I did a bit more searching and found something here: http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. html The problem appears to be in Zope versions after 2.7.0. I'm running 2.7.6, and the post indicates that it also happens in 2.7.4. The solution: Edit file /lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. There are two lines in the file that start with . Edit them as follows: Change first line to: Change second line to: Just to be after, I shut down Zope before I made the changes and restarted it after. Thanks for the help! RJ -----Original Message----- From: RJ Juneau [mailto:rj@maxxian.com] Sent: May 5, 2005 9:22 AM To: 'Charlie Clark' Cc: 'egenix-users@lists.egenix.com' Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 17:57:25 2005 From: charlie at egenix.com (Charlie Clark) Date: Wed Feb 1 16:01:20 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <20050505165725.3380.2@bepc.1115296715.fake> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Thu May 5 09:15:21 2005 From: charlie at egenix.com (Charlie Clark) Date: Wed Feb 1 16:01:20 2006 Subject: [Zope-DB] RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <000001c55185$41477730$6b00a8c0@fonacier.local> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________ Zope-DB mailing list Zope-DB@zope.org http://mail.zope.org/mailman/listinfo/zope-db From rj at maxxian.com Thu May 5 12:38:00 2005 From: rj at maxxian.com (RJ Juneau) Date: Wed Feb 1 16:01:20 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000001c55188$6b841eb0$6505a8c0@rjlaptop> I just double-checked. Zope-2.7.6-final. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 12:49:16 2005 From: rj at maxxian.com (RJ Juneau) Date: Wed Feb 1 16:01:20 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000501c55189$fe149ba0$6505a8c0@rjlaptop> Charlie, The fix has only been applied for 2.7.7, 2.8b2. The info is in the original bug report which is closed and can be found here: http://www.zope.org/Collectors/Zope/1745 RJ -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Fri May 6 11:50:09 2005 From: rj at maxxian.com (RJ Juneau) Date: Wed Feb 1 16:01:20 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC Message-ID: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Still on eval for the product. I cannot get a stable connection to Sybase via the iODBC drivers. - The Sybase ODBC connection - including a query - have been verified at the iODBC level. - The setup is already working well for ODBC connection to MySQL. Symptoms include: - If I click on "Open Connection", it still comes back with "Connection Closed" when I go to a ZSQL method - Using 'Connect on Demand' is not working either. - Clicking "Open Connection" gives me the following error: Connection string: DSN=lixbox_sybase; UID=sa; PWD=XXXXXXX Connection pool entry: 0 Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection rejected by data source', 7952) The odbc.ini definition for DSN "lixbox_sybase" is as follows: [lixbox_sybase] JetFix = No NoRowSetSizeLimit = No Description = Test connection to listbox Options = LIXBOX DSQUERY = SQLSERVER TDSHOST = lixbox TDSPORT = 5000 TDSVER = 5.0 SQLSERVER_CATALOG = N CURSOR_SENSITIVITY = LOW UserName = sa Password = XXXXXXXX ServerType = Sybase 10/11/12 Driver = /opt/openlink/lib/sql_mt_lt.so Database = pubs2 ReadOnly = no NoAutoCommit = No NoLoginBox = No FetchBufferSize = 60 Other relevant data: - Connecting via OpenLink's iODBC - Zope 2.7.6-final - Python 2.3.4 - Connection to Sybase has been successfully tested with iODBC, including issuing a query - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC connection RJ Juneau Chief Technology Officer Maxxian Integration Inc. 155 Westhampton Drive Thornhill, Ontario Canada L4J 7X2 E-mail: rj@maxxian.com Phone: +1 905 482 9429 Cell: +1 416 897 6682 Toll free: +1 866 758 9161 Fax: +1 647 722 2038 -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050506/aef33361/attachment-0079.htm From mal at egenix.com Fri May 6 18:27:37 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 1 16:01:20 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC In-Reply-To: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> References: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Message-ID: <427B8CE9.1010601@egenix.com> RJ Juneau wrote: > Still on eval for the product. > > I cannot get a stable connection to Sybase via the iODBC drivers. > > - The Sybase ODBC connection - including a query - have been verified at > the iODBC level. > - The setup is already working well for ODBC connection to MySQL. > > Symptoms include: > > - If I click on "Open Connection", it still comes back with "Connection > Closed" when I go to a ZSQL method > - Using 'Connect on Demand' is not working either. > - Clicking "Open Connection" gives me the following error: > > Connection string: DSN=lixbox_sybase; > UID=sa; > PWD=XXXXXXX Try writing the connection string on one line and without whitespace. ODBC drivers sometimes have problems with this. > Connection pool entry: 0 > Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection > rejected by data source', 7952) This is a generic error that relates to authentication or firewall problems. It is possible that turning on ODBC tracing the ODBC manager will give more clues as to the real cause of the problem. > The odbc.ini definition for DSN "lixbox_sybase" is as follows: > > [lixbox_sybase] > JetFix = No > NoRowSetSizeLimit = No > Description = Test connection to listbox > Options = LIXBOX > DSQUERY = SQLSERVER > TDSHOST = lixbox > TDSPORT = 5000 > TDSVER = 5.0 > SQLSERVER_CATALOG = N > CURSOR_SENSITIVITY = LOW > UserName = sa > Password = XXXXXXXX > ServerType = Sybase 10/11/12 > Driver = /opt/openlink/lib/sql_mt_lt.so > Database = pubs2 > ReadOnly = no > NoAutoCommit = No > NoLoginBox = No > FetchBufferSize = 60 > > > Other relevant data: > - Connecting via OpenLink's iODBC > - Zope 2.7.6-final > - Python 2.3.4 > - Connection to Sybase has been successfully tested with iODBC, > including issuing a query > - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC > connection > > > > RJ Juneau > Chief Technology Officer > Maxxian Integration Inc. > 155 Westhampton Drive > Thornhill, Ontario > Canada L4J 7X2 > E-mail: rj@maxxian.com > Phone: +1 905 482 9429 > Cell: +1 416 897 6682 > Toll free: +1 866 758 9161 > Fax: +1 647 722 2038 > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 06 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From calisp at gmail.com Sun May 15 23:49:03 2005 From: calisp at gmail.com (calisp@gmail.com) Date: Wed Feb 1 16:01:20 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK Message-ID: Hi, I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the following error... 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the last phase of a two-phase commit. This shouldn't happen. Traceback (most recent call last): File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one jar.tpc_finish(self) File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish try: self._finish() File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could not perform COMMIT or ROLLBACK', 1023) What could be causing this? Can I get the mxODBCZopeDA source from somewhere? It would make debugging this much easier. Thanks, Calisp. From mal at egenix.com Mon May 16 13:52:12 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 1 16:01:20 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK In-Reply-To: References: Message-ID: <42887B5C.4010109@egenix.com> calisp@gmail.com wrote: > Hi, > > I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with > unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the > following error... > > 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the > last phase of a two-phase commit. This shouldn't happen. > Traceback (most recent call last): > File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one > jar.tpc_finish(self) > File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish > try: self._finish() > File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish > File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler > ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could > not perform COMMIT or ROLLBACK', 1023) You should have a look at the database logs to see what prevented the commit from being completed. > What could be causing this? Hard to say: mxODBCZopeDA is trying to commit the transaction, but the driver or database failed to complete the request. The above error was generated by the ODBC driver. This could be network or DNS problems, or be related to a bug in FreeTDS (which is getting more stable with every new release, but should still be considered beta quality software at the moment). > Can I get the mxODBCZopeDA source from > somewhere? It would make debugging this much easier. Getting the source is not an option and won't help much either since the source of the problem is not mxODBCZopeDA. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 16 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Sun May 1 21:29:25 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 1 20:01:14 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <427259F3.4090806@egenix.com> References: <20050427130906.52878.qmail@web30008.mail.mud.yahoo.com> <427259F3.4090806@egenix.com> Message-ID: <42752005.7080904@egenix.com> M.-A. Lemburg wrote: > David Rushby wrote: > >> --- "M.-A. Lemburg" wrote: >> >>> Are you using the standard mxDateTime build or one >>> with WANT_SUBCLASSABLE_TYPES defined... >> >> >> >> Presumably "the standard", since I just built with 'py24d setup.py >> build', making no attempt to enable special directives. >> >> >>> ... (mxDateTime_Deallocate is only used by the latter)? >> >> >> >> That's true in 2.1.0-2005-04-15, but not in 2.1.0b5. >> >> >>> In any case, please try our latest snapshot: >>> >>> >> >> http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-04-15.zip >> >>> to see if that makes any difference. >> >> >> >> I can't build it out of the box: > > > Hmm, looks like distutils' sdist command doesn't like our new > repository layout which uses symlinks (after we've switched to > subversion). > > We'll have to debug distutils first, I guess :-( Ok, we've found the problem and fixed it. Here's the new release (which does build out of the box at least on our boxes ;-): http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 01 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From davidrushby at yahoo.com Mon May 2 15:49:53 2005 From: davidrushby at yahoo.com (David Rushby) Date: Wed Feb 1 20:01:14 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Ok, we've found the problem and fixed it. Here's the new > release (which does build out of the box at least on our > boxes ;-): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip It does build now, but: py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" still behaves as it did when I submitted my original message: Fatal Python error: UNREF invalid object Aborted This is the same debug build of Python 2.4.1 that I was previously using, running the same configuration (CentOS Linux 4.0/i386, everything compiled with GCC 3.4.3). Have you examined my original claim as to the cause of the bug? __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 10:21:55 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 1 20:01:14 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> References: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> Message-ID: <42772693.8050306@egenix.com> David Rushby wrote: > --- "M.-A. Lemburg" wrote: > >>Ok, we've found the problem and fixed it. Here's the new >>release (which does build out of the box at least on our >>boxes ;-): >> >> > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip > > It does build now, but: > py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" > still behaves as it did when I submitted my original message: > Fatal Python error: UNREF invalid object > Aborted > > This is the same debug build of Python 2.4.1 that I was previously > using, running the same configuration (CentOS Linux 4.0/i386, > everything compiled with GCC 3.4.3). > > Have you examined my original claim as to the cause of the bug? No. We haven't had time for looking into it. I'm not sure whether your analysis of the problem is correct: if you don't define WANT_SUBCLASSABLE_TYPES, the API mxDateTime_Deallocate() is neither defined nor used. Furthermore, PyObject_Del() is only called by mxDateTime_Free() if you have explicitely edited mxDateTime.c to disabled the free list #defines. In a standard build, PyObject_Del() is only called at module finalization time. Note that the reason we call mxDateTime_Free() in the constructor is that we don't want the destructor of the object to be called. Py_DECREF() would call the destructor (mxDateTime_Deallocate). It is possible that the debug code in Python complains about the refcount in the object not being 0 at the time the object is finalized (module finalization time), but I don't see any such checks in PyObject_Free() (which is what PyObject_Del() maps to). Again, all of this does not happen in regular non-debug Python builds. Please be aware that we don't support debug builds, so fixing the problem (if there is one - gcc has some serious optimization problems on some combinations of platform and version) will take a while. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 09:27:37 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Wed Feb 1 20:01:15 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 Message-ID: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Hi all- I am trying to build the mx-base package, v.2.0.6. This will be used with postgresql 7.3.9, psycopg 1.1.18, and Roundup 0.8.2. RHEL 3.0 Python 2.3 egenix-mx-base-2.0.6.tar.gz I performed a: /usr/local/bin/python2.3 setup.py install Everything looks proper with the exeception of this series of warning statements: ----------------- gcc -pthread -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fno-strict-aliasing -fPIC -Imx/BeeBase/mxBeeBase -I/usr/local/incl ude/python2.3 -I/usr/local/include -c mx/BeeBase/mxBeeBase/btr.c -o build/temp.linux-i686-2.3/mx/BeeBase/mxBeeBase/mxBeeBa se/mx/BeeBase/mxBeeBase/btr.o mx/BeeBase/mxBeeBase/btr.c: In function `dumpBuf': mx/BeeBase/mxBeeBase/btr.c:249: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:250: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:255: warning: unsigned int format, long unsigned int arg (arg 4) mx/BeeBase/mxBeeBase/btr.c:256: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c: In function `_validateTree': mx/BeeBase/mxBeeBase/btr.c:330: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:337: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:339: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:349: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:351: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 3) creating build/lib.linux-i686-2.3/mx/BeeBase creating build/lib.linux-i686-2.3/mx/BeeBase/mxBeeBase -------------- Would someone be kind enough to let me know whether these messages were expected, and if not, how I might resolve these? Thanks! DC __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 22:06:33 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 1 20:01:15 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> References: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Message-ID: <4277CBB9.8020302@egenix.com> Dianne Chen wrote: > Hi all- > > I am trying to build the mx-base package, v.2.0.6. > This will be used with postgresql 7.3.9, psycopg > 1.1.18, and Roundup 0.8.2. > > RHEL 3.0 > Python 2.3 > egenix-mx-base-2.0.6.tar.gz > > I performed a: > > /usr/local/bin/python2.3 setup.py install > > Everything looks proper with the exeception of this > series of warning statements: > > ----------------- > ... > -------------- > > Would someone be kind enough to let me know whether > these messages were expected, and if not, how I might > resolve these? These warning can safely be ignored. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 13:41:14 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Wed Feb 1 20:01:15 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: 6667 Message-ID: <20050503194114.72091.qmail@web31414.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Dianne Chen wrote: > > Hi all- > > > > I am trying to build the mx-base package, v.2.0.6. > > This will be used with postgresql 7.3.9, psycopg > > 1.1.18, and Roundup 0.8.2. > > > > RHEL 3.0 > > Python 2.3 > > egenix-mx-base-2.0.6.tar.gz > > > > I performed a: > > > > /usr/local/bin/python2.3 setup.py install > > > > Everything looks proper with the exeception of > this > > series of warning statements: > > > > ----------------- > > ... > > -------------- > > > > Would someone be kind enough to let me know > whether > > these messages were expected, and if not, how I > might > > resolve these? > > These warning can safely be ignored. > > -- > Marc-Andre Lemburg > eGenix.com > Marc- Thank you very much for the reply. It helps greatly. With kind regards, DC __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From davidrushby at yahoo.com Tue May 3 17:18:46 2005 From: davidrushby at yahoo.com (David Rushby) Date: Wed Feb 1 20:01:15 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050503231846.35012.qmail@web30009.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > I'm not sure whether your analysis of the problem is correct... Indeed, my original analysis wasn't correct; I think this one is. The fatal error I'm complaining about only arises if the arguments to DateTime.DateTime are invalid, so that the object is deallocated in the onError block of mxDateTime_FromDateAndTime. If the object is created successfully, and later deallocated by Python's garbage collector, the fatal error doesn't arise. Here's my analysis of the problem: --- If the debugging directive Py_TRACE_REFS is enabled, as it is in my case, the Python interpreter maintains a doubly linked list of all Python objects (named refchain) via the _ob_next and _ob_prev pointers added to PyObject via _PyObject_HEAD_EXTRA. Each object is inserted into refchain by the _Py_AddToAllObjects call in _Py_NewReference, and removed from refchain by the _Py_ForgetReference call in _Py_Dealloc. _Py_ForgetReference performs an integrity check on the object being deallocated (op) to make sure that its neighbors in refchain recognize it. Specifically, _Py_ForgetReference verifies that the _ob_next pointer of the previous object in refchain (op->_ob_prev->_ob_next) points to op, and that the _ob_prev pointer of the next object in refchain (op->_ob_next->_ob_prev) points to op. If either of those conditions is false, the interpreter raises the fatal error I'm seeing. After mxDateTime_New pulls an mxDateTimeObject out of the free list, it calls _Py_NewReference on that object to transform it from a "conceptually deallocated" object to a "conceptually allocated" one. _Py_NewReference inserts the object into refchain. Later, when the object is being "conceptually deallocated", it should be removed from refchain with _Py_ForgetReference. The version of _Py_Dealloc that's active when Py_TRACE_REFS is enabled does this (_Py_Dealloc is the element of Py_DECREF that performs the actual destruction). _Py_Dealloc first calls _Py_ForgetReference to remove the object from refchain, then calls the object's destructor (op->ob_type->tp_dealloc). If WANT_SUBCLASSABLE_TYPES is not defined (it is not in my case), the destructor for mxDateTime_Type is mxDateTime_Free. So, if a DateTime object is deallocated normally, as a result of its reference count falling to zero, _Py_Dealloc is called on the object, which first removes it from refchain, then passes it to mxDateTime_Free. If a DateTime object is destroyed prematurely, as a result of invalid arguments to its destructor, the onError handler calls mxDateTime_Free, so the object is "conceptually deallocated" (placed in the free list), *but* the object is not removed from refchain. So if a refchain-membership-integrity-check is performed on the object in question or one of its immediate neighbors in refchain, that integrity check fails, leading to the fatal error. --- The solution is to 'Py_DECREF(...)' the object in the onError handler of its constructor, instead of passing the object directly to mxDateTime_Free. That change solves two problems: 1) It causes _Py_Dealloc to execute, which in turn executes _Py_ForgetReference, so the object is removed from refchain, as it should be. 2) At present, objects that are created successfully and later deallocated by normal reference count mechanics have a reference count of 0 when they enter the free list, whereas objects whose constructors abort their creation due to invalid arguments have a reference count of 1 when they enter the free list. Although AFAIK this doesn't cause an actual execution problem (because the object's reference count is *explicitly set to 1* rather than *incremented by 1* when the object is later "conceptually allocated" by _Py_NewReference), it is likely to confuse future maintainers and thereby lead to the introduction of an actual execution problem. I assume that if you agree that this is a reasonable solution, you'll want to apply the change not only to mxDateTime_FromDateAndTime, but to all similar constructors in mxDateTime.c. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From rj at maxxian.com Thu May 5 01:57:40 2005 From: rj at maxxian.com (RJ Juneau) Date: Wed Feb 1 20:01:15 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c5512e$f72798c0$6505a8c0@rjlaptop> I'm on the 30 day evaluation for mxodbc_zope_da. I'm getting the following error when I submit some queries: Error Type: KeyError Error Value: 'query' I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 with UCS4. The error seems to be caused by multiple rows being returned. I did see an earlier posting with the same error message. The response suggested a template error, but this is clearly not the case here. The additional evidence I've gathered so far: - I'm running the test directly from the ZSQL method, so there's no template involved. - If I use the same query with an additional "where" clause to ensure that only one row is returned, it works - If I use a value in the 'where' clause with no rows returned, it works - The same ZSQL query is being used on a Windows machine running Zope and the free ZODBC module without a problem - The query has been verified directly in mysql-client-browser Other info: - The database is MySQL 4.1.10A-0 - iODBC is the DB driver RJ Juneau -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050505/68d278bf/attachment-0080.htm From mal at egenix.com Thu May 5 12:37:43 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 1 20:01:15 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c5512e$f72798c0$6505a8c0@rjlaptop> References: <000301c5512e$f72798c0$6505a8c0@rjlaptop> Message-ID: <4279E967.6010904@egenix.com> RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 > with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 09:37:42 2005 From: rj at maxxian.com (RJ Juneau) Date: Wed Feb 1 20:01:15 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000101c5516f$3b96de90$6505a8c0@rjlaptop> More interesting info on the problem: If I execute the query directly in the "test" window of the base eGenix mxODBC Database Connection window, it works fine and returns the 20 lines expected. That could point to a problem in the rendering, which seems to be where the traceback ends. Note that within the same Zope system I also have an ODBC connection to a Sybase database, and I have successfully tested multi-line ZSQL queries there. This is the traceback: Time 2005/05/05 07:55:15.294 GMT-4 Exception Type KeyError Exception Value 'query' Traceback (innermost last): Module ZPublisher.Publish, line 101, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 39, in call_object Module Shared.DC.ZRDB.DA, line 337, in manage_test Module DocumentTemplate.DT_String, line 474, in __call__ Module DocumentTemplate.DT_In, line 602, in renderwb Module DocumentTemplate.DT_Var, line 219, in render KeyError: 'query' I don't think the following is an issue, but I'll include it for completeness.I am also getting the following iODBC warnings and errors in the Zope console log, which are related to the ODBC parameters being passed by iODBC. Note that these errors also appear for all of the successful queries. [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (Setup). [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (UsageCount). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Timeout). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Reuse). As for the ZSQL snippet from the template... Since there's no template involved yet (I'm still testing directly from the ZSQL method), I assume you mean the SQL code? select h.host_name, s.system_name, s.system_handle, count(*) from terminal t, system_map s, host h where t.system_index = s.system_index and s.host_index = h.host_index group by s.system_name order by h.host_name Nothing complicated here. There are no parameters passed to the query. RJ -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: May 5, 2005 5:38 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: Re: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is > 2.3.4 with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ---------------------------------------------------------------------- > -- > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 16:00:32 2005 From: charlie at egenix.com (Charlie Clark) Date: Wed Feb 1 20:01:15 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000101c5516f$3b96de90$6505a8c0@rjlaptop> References: <000101c5516f$3b96de90$6505a8c0@rjlaptop> Message-ID: <20050505150032.644.1@bepc.1115296715.fake> On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base eGenix > mxODBC Database Connection window, it works fine and returns the 20 > lines expected. That could point to a problem in the rendering, which > seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection to > a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 10:22:17 2005 From: rj at maxxian.com (RJ Juneau) Date: Wed Feb 1 20:01:15 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505150032.644.1@bepc.1115296715.fake> Message-ID: <000201c55175$75bcad10$6505a8c0@rjlaptop> At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 11:47:14 2005 From: rj at maxxian.com (RJ Juneau) Date: Wed Feb 1 20:01:15 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c55181$549be0e0$6505a8c0@rjlaptop> Charlie, I found a fix. Here it is in case anyone else runs into this. You were correct - the problem is in another part of Zope. Based on your feedback, I did a bit more searching and found something here: http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. html The problem appears to be in Zope versions after 2.7.0. I'm running 2.7.6, and the post indicates that it also happens in 2.7.4. The solution: Edit file /lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. There are two lines in the file that start with . Edit them as follows: Change first line to: Change second line to: Just to be after, I shut down Zope before I made the changes and restarted it after. Thanks for the help! RJ -----Original Message----- From: RJ Juneau [mailto:rj@maxxian.com] Sent: May 5, 2005 9:22 AM To: 'Charlie Clark' Cc: 'egenix-users@lists.egenix.com' Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 17:57:25 2005 From: charlie at egenix.com (Charlie Clark) Date: Wed Feb 1 20:01:15 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <20050505165725.3380.2@bepc.1115296715.fake> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Thu May 5 09:15:21 2005 From: charlie at egenix.com (Charlie Clark) Date: Wed Feb 1 20:01:15 2006 Subject: [Zope-DB] RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <000001c55185$41477730$6b00a8c0@fonacier.local> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________ Zope-DB mailing list Zope-DB@zope.org http://mail.zope.org/mailman/listinfo/zope-db From rj at maxxian.com Thu May 5 12:38:00 2005 From: rj at maxxian.com (RJ Juneau) Date: Wed Feb 1 20:01:15 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000001c55188$6b841eb0$6505a8c0@rjlaptop> I just double-checked. Zope-2.7.6-final. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 12:49:16 2005 From: rj at maxxian.com (RJ Juneau) Date: Wed Feb 1 20:01:15 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000501c55189$fe149ba0$6505a8c0@rjlaptop> Charlie, The fix has only been applied for 2.7.7, 2.8b2. The info is in the original bug report which is closed and can be found here: http://www.zope.org/Collectors/Zope/1745 RJ -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Fri May 6 11:50:09 2005 From: rj at maxxian.com (RJ Juneau) Date: Wed Feb 1 20:01:15 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC Message-ID: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Still on eval for the product. I cannot get a stable connection to Sybase via the iODBC drivers. - The Sybase ODBC connection - including a query - have been verified at the iODBC level. - The setup is already working well for ODBC connection to MySQL. Symptoms include: - If I click on "Open Connection", it still comes back with "Connection Closed" when I go to a ZSQL method - Using 'Connect on Demand' is not working either. - Clicking "Open Connection" gives me the following error: Connection string: DSN=lixbox_sybase; UID=sa; PWD=XXXXXXX Connection pool entry: 0 Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection rejected by data source', 7952) The odbc.ini definition for DSN "lixbox_sybase" is as follows: [lixbox_sybase] JetFix = No NoRowSetSizeLimit = No Description = Test connection to listbox Options = LIXBOX DSQUERY = SQLSERVER TDSHOST = lixbox TDSPORT = 5000 TDSVER = 5.0 SQLSERVER_CATALOG = N CURSOR_SENSITIVITY = LOW UserName = sa Password = XXXXXXXX ServerType = Sybase 10/11/12 Driver = /opt/openlink/lib/sql_mt_lt.so Database = pubs2 ReadOnly = no NoAutoCommit = No NoLoginBox = No FetchBufferSize = 60 Other relevant data: - Connecting via OpenLink's iODBC - Zope 2.7.6-final - Python 2.3.4 - Connection to Sybase has been successfully tested with iODBC, including issuing a query - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC connection RJ Juneau Chief Technology Officer Maxxian Integration Inc. 155 Westhampton Drive Thornhill, Ontario Canada L4J 7X2 E-mail: rj@maxxian.com Phone: +1 905 482 9429 Cell: +1 416 897 6682 Toll free: +1 866 758 9161 Fax: +1 647 722 2038 -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050506/aef33361/attachment-0080.htm From mal at egenix.com Fri May 6 18:27:37 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 1 20:01:15 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC In-Reply-To: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> References: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Message-ID: <427B8CE9.1010601@egenix.com> RJ Juneau wrote: > Still on eval for the product. > > I cannot get a stable connection to Sybase via the iODBC drivers. > > - The Sybase ODBC connection - including a query - have been verified at > the iODBC level. > - The setup is already working well for ODBC connection to MySQL. > > Symptoms include: > > - If I click on "Open Connection", it still comes back with "Connection > Closed" when I go to a ZSQL method > - Using 'Connect on Demand' is not working either. > - Clicking "Open Connection" gives me the following error: > > Connection string: DSN=lixbox_sybase; > UID=sa; > PWD=XXXXXXX Try writing the connection string on one line and without whitespace. ODBC drivers sometimes have problems with this. > Connection pool entry: 0 > Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection > rejected by data source', 7952) This is a generic error that relates to authentication or firewall problems. It is possible that turning on ODBC tracing the ODBC manager will give more clues as to the real cause of the problem. > The odbc.ini definition for DSN "lixbox_sybase" is as follows: > > [lixbox_sybase] > JetFix = No > NoRowSetSizeLimit = No > Description = Test connection to listbox > Options = LIXBOX > DSQUERY = SQLSERVER > TDSHOST = lixbox > TDSPORT = 5000 > TDSVER = 5.0 > SQLSERVER_CATALOG = N > CURSOR_SENSITIVITY = LOW > UserName = sa > Password = XXXXXXXX > ServerType = Sybase 10/11/12 > Driver = /opt/openlink/lib/sql_mt_lt.so > Database = pubs2 > ReadOnly = no > NoAutoCommit = No > NoLoginBox = No > FetchBufferSize = 60 > > > Other relevant data: > - Connecting via OpenLink's iODBC > - Zope 2.7.6-final > - Python 2.3.4 > - Connection to Sybase has been successfully tested with iODBC, > including issuing a query > - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC > connection > > > > RJ Juneau > Chief Technology Officer > Maxxian Integration Inc. > 155 Westhampton Drive > Thornhill, Ontario > Canada L4J 7X2 > E-mail: rj@maxxian.com > Phone: +1 905 482 9429 > Cell: +1 416 897 6682 > Toll free: +1 866 758 9161 > Fax: +1 647 722 2038 > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 06 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From calisp at gmail.com Sun May 15 23:49:03 2005 From: calisp at gmail.com (calisp@gmail.com) Date: Wed Feb 1 20:01:15 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK Message-ID: Hi, I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the following error... 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the last phase of a two-phase commit. This shouldn't happen. Traceback (most recent call last): File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one jar.tpc_finish(self) File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish try: self._finish() File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could not perform COMMIT or ROLLBACK', 1023) What could be causing this? Can I get the mxODBCZopeDA source from somewhere? It would make debugging this much easier. Thanks, Calisp. From mal at egenix.com Mon May 16 13:52:12 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 1 20:01:15 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK In-Reply-To: References: Message-ID: <42887B5C.4010109@egenix.com> calisp@gmail.com wrote: > Hi, > > I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with > unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the > following error... > > 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the > last phase of a two-phase commit. This shouldn't happen. > Traceback (most recent call last): > File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one > jar.tpc_finish(self) > File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish > try: self._finish() > File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish > File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler > ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could > not perform COMMIT or ROLLBACK', 1023) You should have a look at the database logs to see what prevented the commit from being completed. > What could be causing this? Hard to say: mxODBCZopeDA is trying to commit the transaction, but the driver or database failed to complete the request. The above error was generated by the ODBC driver. This could be network or DNS problems, or be related to a bug in FreeTDS (which is getting more stable with every new release, but should still be considered beta quality software at the moment). > Can I get the mxODBCZopeDA source from > somewhere? It would make debugging this much easier. Getting the source is not an option and won't help much either since the source of the problem is not mxODBCZopeDA. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 16 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Sun May 1 21:29:25 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Feb 2 08:14:36 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <427259F3.4090806@egenix.com> References: <20050427130906.52878.qmail@web30008.mail.mud.yahoo.com> <427259F3.4090806@egenix.com> Message-ID: <42752005.7080904@egenix.com> M.-A. Lemburg wrote: > David Rushby wrote: > >> --- "M.-A. Lemburg" wrote: >> >>> Are you using the standard mxDateTime build or one >>> with WANT_SUBCLASSABLE_TYPES defined... >> >> >> >> Presumably "the standard", since I just built with 'py24d setup.py >> build', making no attempt to enable special directives. >> >> >>> ... (mxDateTime_Deallocate is only used by the latter)? >> >> >> >> That's true in 2.1.0-2005-04-15, but not in 2.1.0b5. >> >> >>> In any case, please try our latest snapshot: >>> >>> >> >> http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-04-15.zip >> >>> to see if that makes any difference. >> >> >> >> I can't build it out of the box: > > > Hmm, looks like distutils' sdist command doesn't like our new > repository layout which uses symlinks (after we've switched to > subversion). > > We'll have to debug distutils first, I guess :-( Ok, we've found the problem and fixed it. Here's the new release (which does build out of the box at least on our boxes ;-): http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 01 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From davidrushby at yahoo.com Mon May 2 15:49:53 2005 From: davidrushby at yahoo.com (David Rushby) Date: Thu Feb 2 08:14:37 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Ok, we've found the problem and fixed it. Here's the new > release (which does build out of the box at least on our > boxes ;-): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip It does build now, but: py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" still behaves as it did when I submitted my original message: Fatal Python error: UNREF invalid object Aborted This is the same debug build of Python 2.4.1 that I was previously using, running the same configuration (CentOS Linux 4.0/i386, everything compiled with GCC 3.4.3). Have you examined my original claim as to the cause of the bug? __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 10:21:55 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Feb 2 08:14:37 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> References: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> Message-ID: <42772693.8050306@egenix.com> David Rushby wrote: > --- "M.-A. Lemburg" wrote: > >>Ok, we've found the problem and fixed it. Here's the new >>release (which does build out of the box at least on our >>boxes ;-): >> >> > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip > > It does build now, but: > py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" > still behaves as it did when I submitted my original message: > Fatal Python error: UNREF invalid object > Aborted > > This is the same debug build of Python 2.4.1 that I was previously > using, running the same configuration (CentOS Linux 4.0/i386, > everything compiled with GCC 3.4.3). > > Have you examined my original claim as to the cause of the bug? No. We haven't had time for looking into it. I'm not sure whether your analysis of the problem is correct: if you don't define WANT_SUBCLASSABLE_TYPES, the API mxDateTime_Deallocate() is neither defined nor used. Furthermore, PyObject_Del() is only called by mxDateTime_Free() if you have explicitely edited mxDateTime.c to disabled the free list #defines. In a standard build, PyObject_Del() is only called at module finalization time. Note that the reason we call mxDateTime_Free() in the constructor is that we don't want the destructor of the object to be called. Py_DECREF() would call the destructor (mxDateTime_Deallocate). It is possible that the debug code in Python complains about the refcount in the object not being 0 at the time the object is finalized (module finalization time), but I don't see any such checks in PyObject_Free() (which is what PyObject_Del() maps to). Again, all of this does not happen in regular non-debug Python builds. Please be aware that we don't support debug builds, so fixing the problem (if there is one - gcc has some serious optimization problems on some combinations of platform and version) will take a while. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 09:27:37 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Thu Feb 2 08:14:37 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 Message-ID: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Hi all- I am trying to build the mx-base package, v.2.0.6. This will be used with postgresql 7.3.9, psycopg 1.1.18, and Roundup 0.8.2. RHEL 3.0 Python 2.3 egenix-mx-base-2.0.6.tar.gz I performed a: /usr/local/bin/python2.3 setup.py install Everything looks proper with the exeception of this series of warning statements: ----------------- gcc -pthread -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fno-strict-aliasing -fPIC -Imx/BeeBase/mxBeeBase -I/usr/local/incl ude/python2.3 -I/usr/local/include -c mx/BeeBase/mxBeeBase/btr.c -o build/temp.linux-i686-2.3/mx/BeeBase/mxBeeBase/mxBeeBa se/mx/BeeBase/mxBeeBase/btr.o mx/BeeBase/mxBeeBase/btr.c: In function `dumpBuf': mx/BeeBase/mxBeeBase/btr.c:249: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:250: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:255: warning: unsigned int format, long unsigned int arg (arg 4) mx/BeeBase/mxBeeBase/btr.c:256: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c: In function `_validateTree': mx/BeeBase/mxBeeBase/btr.c:330: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:337: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:339: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:349: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:351: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 3) creating build/lib.linux-i686-2.3/mx/BeeBase creating build/lib.linux-i686-2.3/mx/BeeBase/mxBeeBase -------------- Would someone be kind enough to let me know whether these messages were expected, and if not, how I might resolve these? Thanks! DC __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 22:06:33 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Feb 2 08:14:37 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> References: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Message-ID: <4277CBB9.8020302@egenix.com> Dianne Chen wrote: > Hi all- > > I am trying to build the mx-base package, v.2.0.6. > This will be used with postgresql 7.3.9, psycopg > 1.1.18, and Roundup 0.8.2. > > RHEL 3.0 > Python 2.3 > egenix-mx-base-2.0.6.tar.gz > > I performed a: > > /usr/local/bin/python2.3 setup.py install > > Everything looks proper with the exeception of this > series of warning statements: > > ----------------- > ... > -------------- > > Would someone be kind enough to let me know whether > these messages were expected, and if not, how I might > resolve these? These warning can safely be ignored. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 13:41:14 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Thu Feb 2 08:14:38 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: 6667 Message-ID: <20050503194114.72091.qmail@web31414.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Dianne Chen wrote: > > Hi all- > > > > I am trying to build the mx-base package, v.2.0.6. > > This will be used with postgresql 7.3.9, psycopg > > 1.1.18, and Roundup 0.8.2. > > > > RHEL 3.0 > > Python 2.3 > > egenix-mx-base-2.0.6.tar.gz > > > > I performed a: > > > > /usr/local/bin/python2.3 setup.py install > > > > Everything looks proper with the exeception of > this > > series of warning statements: > > > > ----------------- > > ... > > -------------- > > > > Would someone be kind enough to let me know > whether > > these messages were expected, and if not, how I > might > > resolve these? > > These warning can safely be ignored. > > -- > Marc-Andre Lemburg > eGenix.com > Marc- Thank you very much for the reply. It helps greatly. With kind regards, DC __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From davidrushby at yahoo.com Tue May 3 17:18:46 2005 From: davidrushby at yahoo.com (David Rushby) Date: Thu Feb 2 08:14:38 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050503231846.35012.qmail@web30009.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > I'm not sure whether your analysis of the problem is correct... Indeed, my original analysis wasn't correct; I think this one is. The fatal error I'm complaining about only arises if the arguments to DateTime.DateTime are invalid, so that the object is deallocated in the onError block of mxDateTime_FromDateAndTime. If the object is created successfully, and later deallocated by Python's garbage collector, the fatal error doesn't arise. Here's my analysis of the problem: --- If the debugging directive Py_TRACE_REFS is enabled, as it is in my case, the Python interpreter maintains a doubly linked list of all Python objects (named refchain) via the _ob_next and _ob_prev pointers added to PyObject via _PyObject_HEAD_EXTRA. Each object is inserted into refchain by the _Py_AddToAllObjects call in _Py_NewReference, and removed from refchain by the _Py_ForgetReference call in _Py_Dealloc. _Py_ForgetReference performs an integrity check on the object being deallocated (op) to make sure that its neighbors in refchain recognize it. Specifically, _Py_ForgetReference verifies that the _ob_next pointer of the previous object in refchain (op->_ob_prev->_ob_next) points to op, and that the _ob_prev pointer of the next object in refchain (op->_ob_next->_ob_prev) points to op. If either of those conditions is false, the interpreter raises the fatal error I'm seeing. After mxDateTime_New pulls an mxDateTimeObject out of the free list, it calls _Py_NewReference on that object to transform it from a "conceptually deallocated" object to a "conceptually allocated" one. _Py_NewReference inserts the object into refchain. Later, when the object is being "conceptually deallocated", it should be removed from refchain with _Py_ForgetReference. The version of _Py_Dealloc that's active when Py_TRACE_REFS is enabled does this (_Py_Dealloc is the element of Py_DECREF that performs the actual destruction). _Py_Dealloc first calls _Py_ForgetReference to remove the object from refchain, then calls the object's destructor (op->ob_type->tp_dealloc). If WANT_SUBCLASSABLE_TYPES is not defined (it is not in my case), the destructor for mxDateTime_Type is mxDateTime_Free. So, if a DateTime object is deallocated normally, as a result of its reference count falling to zero, _Py_Dealloc is called on the object, which first removes it from refchain, then passes it to mxDateTime_Free. If a DateTime object is destroyed prematurely, as a result of invalid arguments to its destructor, the onError handler calls mxDateTime_Free, so the object is "conceptually deallocated" (placed in the free list), *but* the object is not removed from refchain. So if a refchain-membership-integrity-check is performed on the object in question or one of its immediate neighbors in refchain, that integrity check fails, leading to the fatal error. --- The solution is to 'Py_DECREF(...)' the object in the onError handler of its constructor, instead of passing the object directly to mxDateTime_Free. That change solves two problems: 1) It causes _Py_Dealloc to execute, which in turn executes _Py_ForgetReference, so the object is removed from refchain, as it should be. 2) At present, objects that are created successfully and later deallocated by normal reference count mechanics have a reference count of 0 when they enter the free list, whereas objects whose constructors abort their creation due to invalid arguments have a reference count of 1 when they enter the free list. Although AFAIK this doesn't cause an actual execution problem (because the object's reference count is *explicitly set to 1* rather than *incremented by 1* when the object is later "conceptually allocated" by _Py_NewReference), it is likely to confuse future maintainers and thereby lead to the introduction of an actual execution problem. I assume that if you agree that this is a reasonable solution, you'll want to apply the change not only to mxDateTime_FromDateAndTime, but to all similar constructors in mxDateTime.c. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From rj at maxxian.com Thu May 5 01:57:40 2005 From: rj at maxxian.com (RJ Juneau) Date: Thu Feb 2 08:14:40 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c5512e$f72798c0$6505a8c0@rjlaptop> I'm on the 30 day evaluation for mxodbc_zope_da. I'm getting the following error when I submit some queries: Error Type: KeyError Error Value: 'query' I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 with UCS4. The error seems to be caused by multiple rows being returned. I did see an earlier posting with the same error message. The response suggested a template error, but this is clearly not the case here. The additional evidence I've gathered so far: - I'm running the test directly from the ZSQL method, so there's no template involved. - If I use the same query with an additional "where" clause to ensure that only one row is returned, it works - If I use a value in the 'where' clause with no rows returned, it works - The same ZSQL query is being used on a Windows machine running Zope and the free ZODBC module without a problem - The query has been verified directly in mysql-client-browser Other info: - The database is MySQL 4.1.10A-0 - iODBC is the DB driver RJ Juneau -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050505/68d278bf/attachment-0081.htm From mal at egenix.com Thu May 5 12:37:43 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Feb 2 08:14:40 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c5512e$f72798c0$6505a8c0@rjlaptop> References: <000301c5512e$f72798c0$6505a8c0@rjlaptop> Message-ID: <4279E967.6010904@egenix.com> RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 > with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 09:37:42 2005 From: rj at maxxian.com (RJ Juneau) Date: Thu Feb 2 08:14:40 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000101c5516f$3b96de90$6505a8c0@rjlaptop> More interesting info on the problem: If I execute the query directly in the "test" window of the base eGenix mxODBC Database Connection window, it works fine and returns the 20 lines expected. That could point to a problem in the rendering, which seems to be where the traceback ends. Note that within the same Zope system I also have an ODBC connection to a Sybase database, and I have successfully tested multi-line ZSQL queries there. This is the traceback: Time 2005/05/05 07:55:15.294 GMT-4 Exception Type KeyError Exception Value 'query' Traceback (innermost last): Module ZPublisher.Publish, line 101, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 39, in call_object Module Shared.DC.ZRDB.DA, line 337, in manage_test Module DocumentTemplate.DT_String, line 474, in __call__ Module DocumentTemplate.DT_In, line 602, in renderwb Module DocumentTemplate.DT_Var, line 219, in render KeyError: 'query' I don't think the following is an issue, but I'll include it for completeness.I am also getting the following iODBC warnings and errors in the Zope console log, which are related to the ODBC parameters being passed by iODBC. Note that these errors also appear for all of the successful queries. [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (Setup). [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (UsageCount). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Timeout). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Reuse). As for the ZSQL snippet from the template... Since there's no template involved yet (I'm still testing directly from the ZSQL method), I assume you mean the SQL code? select h.host_name, s.system_name, s.system_handle, count(*) from terminal t, system_map s, host h where t.system_index = s.system_index and s.host_index = h.host_index group by s.system_name order by h.host_name Nothing complicated here. There are no parameters passed to the query. RJ -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: May 5, 2005 5:38 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: Re: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is > 2.3.4 with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ---------------------------------------------------------------------- > -- > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 16:00:32 2005 From: charlie at egenix.com (Charlie Clark) Date: Thu Feb 2 08:14:40 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000101c5516f$3b96de90$6505a8c0@rjlaptop> References: <000101c5516f$3b96de90$6505a8c0@rjlaptop> Message-ID: <20050505150032.644.1@bepc.1115296715.fake> On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base eGenix > mxODBC Database Connection window, it works fine and returns the 20 > lines expected. That could point to a problem in the rendering, which > seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection to > a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 10:22:17 2005 From: rj at maxxian.com (RJ Juneau) Date: Thu Feb 2 08:14:40 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505150032.644.1@bepc.1115296715.fake> Message-ID: <000201c55175$75bcad10$6505a8c0@rjlaptop> At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 11:47:14 2005 From: rj at maxxian.com (RJ Juneau) Date: Thu Feb 2 08:14:40 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c55181$549be0e0$6505a8c0@rjlaptop> Charlie, I found a fix. Here it is in case anyone else runs into this. You were correct - the problem is in another part of Zope. Based on your feedback, I did a bit more searching and found something here: http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. html The problem appears to be in Zope versions after 2.7.0. I'm running 2.7.6, and the post indicates that it also happens in 2.7.4. The solution: Edit file /lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. There are two lines in the file that start with . Edit them as follows: Change first line to: Change second line to: Just to be after, I shut down Zope before I made the changes and restarted it after. Thanks for the help! RJ -----Original Message----- From: RJ Juneau [mailto:rj@maxxian.com] Sent: May 5, 2005 9:22 AM To: 'Charlie Clark' Cc: 'egenix-users@lists.egenix.com' Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 17:57:25 2005 From: charlie at egenix.com (Charlie Clark) Date: Thu Feb 2 08:14:40 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <20050505165725.3380.2@bepc.1115296715.fake> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Thu May 5 09:15:21 2005 From: charlie at egenix.com (Charlie Clark) Date: Thu Feb 2 08:14:40 2006 Subject: [Zope-DB] RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <000001c55185$41477730$6b00a8c0@fonacier.local> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________ Zope-DB mailing list Zope-DB@zope.org http://mail.zope.org/mailman/listinfo/zope-db From rj at maxxian.com Thu May 5 12:38:00 2005 From: rj at maxxian.com (RJ Juneau) Date: Thu Feb 2 08:14:40 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000001c55188$6b841eb0$6505a8c0@rjlaptop> I just double-checked. Zope-2.7.6-final. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 12:49:16 2005 From: rj at maxxian.com (RJ Juneau) Date: Thu Feb 2 08:14:40 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000501c55189$fe149ba0$6505a8c0@rjlaptop> Charlie, The fix has only been applied for 2.7.7, 2.8b2. The info is in the original bug report which is closed and can be found here: http://www.zope.org/Collectors/Zope/1745 RJ -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Fri May 6 11:50:09 2005 From: rj at maxxian.com (RJ Juneau) Date: Thu Feb 2 08:14:42 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC Message-ID: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Still on eval for the product. I cannot get a stable connection to Sybase via the iODBC drivers. - The Sybase ODBC connection - including a query - have been verified at the iODBC level. - The setup is already working well for ODBC connection to MySQL. Symptoms include: - If I click on "Open Connection", it still comes back with "Connection Closed" when I go to a ZSQL method - Using 'Connect on Demand' is not working either. - Clicking "Open Connection" gives me the following error: Connection string: DSN=lixbox_sybase; UID=sa; PWD=XXXXXXX Connection pool entry: 0 Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection rejected by data source', 7952) The odbc.ini definition for DSN "lixbox_sybase" is as follows: [lixbox_sybase] JetFix = No NoRowSetSizeLimit = No Description = Test connection to listbox Options = LIXBOX DSQUERY = SQLSERVER TDSHOST = lixbox TDSPORT = 5000 TDSVER = 5.0 SQLSERVER_CATALOG = N CURSOR_SENSITIVITY = LOW UserName = sa Password = XXXXXXXX ServerType = Sybase 10/11/12 Driver = /opt/openlink/lib/sql_mt_lt.so Database = pubs2 ReadOnly = no NoAutoCommit = No NoLoginBox = No FetchBufferSize = 60 Other relevant data: - Connecting via OpenLink's iODBC - Zope 2.7.6-final - Python 2.3.4 - Connection to Sybase has been successfully tested with iODBC, including issuing a query - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC connection RJ Juneau Chief Technology Officer Maxxian Integration Inc. 155 Westhampton Drive Thornhill, Ontario Canada L4J 7X2 E-mail: rj@maxxian.com Phone: +1 905 482 9429 Cell: +1 416 897 6682 Toll free: +1 866 758 9161 Fax: +1 647 722 2038 -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050506/aef33361/attachment-0081.htm From mal at egenix.com Fri May 6 18:27:37 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Feb 2 08:14:42 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC In-Reply-To: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> References: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Message-ID: <427B8CE9.1010601@egenix.com> RJ Juneau wrote: > Still on eval for the product. > > I cannot get a stable connection to Sybase via the iODBC drivers. > > - The Sybase ODBC connection - including a query - have been verified at > the iODBC level. > - The setup is already working well for ODBC connection to MySQL. > > Symptoms include: > > - If I click on "Open Connection", it still comes back with "Connection > Closed" when I go to a ZSQL method > - Using 'Connect on Demand' is not working either. > - Clicking "Open Connection" gives me the following error: > > Connection string: DSN=lixbox_sybase; > UID=sa; > PWD=XXXXXXX Try writing the connection string on one line and without whitespace. ODBC drivers sometimes have problems with this. > Connection pool entry: 0 > Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection > rejected by data source', 7952) This is a generic error that relates to authentication or firewall problems. It is possible that turning on ODBC tracing the ODBC manager will give more clues as to the real cause of the problem. > The odbc.ini definition for DSN "lixbox_sybase" is as follows: > > [lixbox_sybase] > JetFix = No > NoRowSetSizeLimit = No > Description = Test connection to listbox > Options = LIXBOX > DSQUERY = SQLSERVER > TDSHOST = lixbox > TDSPORT = 5000 > TDSVER = 5.0 > SQLSERVER_CATALOG = N > CURSOR_SENSITIVITY = LOW > UserName = sa > Password = XXXXXXXX > ServerType = Sybase 10/11/12 > Driver = /opt/openlink/lib/sql_mt_lt.so > Database = pubs2 > ReadOnly = no > NoAutoCommit = No > NoLoginBox = No > FetchBufferSize = 60 > > > Other relevant data: > - Connecting via OpenLink's iODBC > - Zope 2.7.6-final > - Python 2.3.4 > - Connection to Sybase has been successfully tested with iODBC, > including issuing a query > - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC > connection > > > > RJ Juneau > Chief Technology Officer > Maxxian Integration Inc. > 155 Westhampton Drive > Thornhill, Ontario > Canada L4J 7X2 > E-mail: rj@maxxian.com > Phone: +1 905 482 9429 > Cell: +1 416 897 6682 > Toll free: +1 866 758 9161 > Fax: +1 647 722 2038 > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 06 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From calisp at gmail.com Sun May 15 23:49:03 2005 From: calisp at gmail.com (calisp@gmail.com) Date: Thu Feb 2 08:14:42 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK Message-ID: Hi, I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the following error... 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the last phase of a two-phase commit. This shouldn't happen. Traceback (most recent call last): File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one jar.tpc_finish(self) File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish try: self._finish() File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could not perform COMMIT or ROLLBACK', 1023) What could be causing this? Can I get the mxODBCZopeDA source from somewhere? It would make debugging this much easier. Thanks, Calisp. From mal at egenix.com Mon May 16 13:52:12 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Feb 2 08:14:42 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK In-Reply-To: References: Message-ID: <42887B5C.4010109@egenix.com> calisp@gmail.com wrote: > Hi, > > I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with > unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the > following error... > > 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the > last phase of a two-phase commit. This shouldn't happen. > Traceback (most recent call last): > File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one > jar.tpc_finish(self) > File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish > try: self._finish() > File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish > File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler > ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could > not perform COMMIT or ROLLBACK', 1023) You should have a look at the database logs to see what prevented the commit from being completed. > What could be causing this? Hard to say: mxODBCZopeDA is trying to commit the transaction, but the driver or database failed to complete the request. The above error was generated by the ODBC driver. This could be network or DNS problems, or be related to a bug in FreeTDS (which is getting more stable with every new release, but should still be considered beta quality software at the moment). > Can I get the mxODBCZopeDA source from > somewhere? It would make debugging this much easier. Getting the source is not an option and won't help much either since the source of the problem is not mxODBCZopeDA. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 16 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Sun May 1 21:29:25 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Feb 2 12:03:15 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <427259F3.4090806@egenix.com> References: <20050427130906.52878.qmail@web30008.mail.mud.yahoo.com> <427259F3.4090806@egenix.com> Message-ID: <42752005.7080904@egenix.com> M.-A. Lemburg wrote: > David Rushby wrote: > >> --- "M.-A. Lemburg" wrote: >> >>> Are you using the standard mxDateTime build or one >>> with WANT_SUBCLASSABLE_TYPES defined... >> >> >> >> Presumably "the standard", since I just built with 'py24d setup.py >> build', making no attempt to enable special directives. >> >> >>> ... (mxDateTime_Deallocate is only used by the latter)? >> >> >> >> That's true in 2.1.0-2005-04-15, but not in 2.1.0b5. >> >> >>> In any case, please try our latest snapshot: >>> >>> >> >> http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-04-15.zip >> >>> to see if that makes any difference. >> >> >> >> I can't build it out of the box: > > > Hmm, looks like distutils' sdist command doesn't like our new > repository layout which uses symlinks (after we've switched to > subversion). > > We'll have to debug distutils first, I guess :-( Ok, we've found the problem and fixed it. Here's the new release (which does build out of the box at least on our boxes ;-): http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 01 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From davidrushby at yahoo.com Mon May 2 15:49:53 2005 From: davidrushby at yahoo.com (David Rushby) Date: Thu Feb 2 12:03:15 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Ok, we've found the problem and fixed it. Here's the new > release (which does build out of the box at least on our > boxes ;-): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip It does build now, but: py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" still behaves as it did when I submitted my original message: Fatal Python error: UNREF invalid object Aborted This is the same debug build of Python 2.4.1 that I was previously using, running the same configuration (CentOS Linux 4.0/i386, everything compiled with GCC 3.4.3). Have you examined my original claim as to the cause of the bug? __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 10:21:55 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Feb 2 12:03:15 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> References: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> Message-ID: <42772693.8050306@egenix.com> David Rushby wrote: > --- "M.-A. Lemburg" wrote: > >>Ok, we've found the problem and fixed it. Here's the new >>release (which does build out of the box at least on our >>boxes ;-): >> >> > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip > > It does build now, but: > py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" > still behaves as it did when I submitted my original message: > Fatal Python error: UNREF invalid object > Aborted > > This is the same debug build of Python 2.4.1 that I was previously > using, running the same configuration (CentOS Linux 4.0/i386, > everything compiled with GCC 3.4.3). > > Have you examined my original claim as to the cause of the bug? No. We haven't had time for looking into it. I'm not sure whether your analysis of the problem is correct: if you don't define WANT_SUBCLASSABLE_TYPES, the API mxDateTime_Deallocate() is neither defined nor used. Furthermore, PyObject_Del() is only called by mxDateTime_Free() if you have explicitely edited mxDateTime.c to disabled the free list #defines. In a standard build, PyObject_Del() is only called at module finalization time. Note that the reason we call mxDateTime_Free() in the constructor is that we don't want the destructor of the object to be called. Py_DECREF() would call the destructor (mxDateTime_Deallocate). It is possible that the debug code in Python complains about the refcount in the object not being 0 at the time the object is finalized (module finalization time), but I don't see any such checks in PyObject_Free() (which is what PyObject_Del() maps to). Again, all of this does not happen in regular non-debug Python builds. Please be aware that we don't support debug builds, so fixing the problem (if there is one - gcc has some serious optimization problems on some combinations of platform and version) will take a while. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 09:27:37 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Thu Feb 2 12:03:15 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 Message-ID: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Hi all- I am trying to build the mx-base package, v.2.0.6. This will be used with postgresql 7.3.9, psycopg 1.1.18, and Roundup 0.8.2. RHEL 3.0 Python 2.3 egenix-mx-base-2.0.6.tar.gz I performed a: /usr/local/bin/python2.3 setup.py install Everything looks proper with the exeception of this series of warning statements: ----------------- gcc -pthread -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fno-strict-aliasing -fPIC -Imx/BeeBase/mxBeeBase -I/usr/local/incl ude/python2.3 -I/usr/local/include -c mx/BeeBase/mxBeeBase/btr.c -o build/temp.linux-i686-2.3/mx/BeeBase/mxBeeBase/mxBeeBa se/mx/BeeBase/mxBeeBase/btr.o mx/BeeBase/mxBeeBase/btr.c: In function `dumpBuf': mx/BeeBase/mxBeeBase/btr.c:249: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:250: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:255: warning: unsigned int format, long unsigned int arg (arg 4) mx/BeeBase/mxBeeBase/btr.c:256: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c: In function `_validateTree': mx/BeeBase/mxBeeBase/btr.c:330: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:337: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:339: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:349: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:351: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 3) creating build/lib.linux-i686-2.3/mx/BeeBase creating build/lib.linux-i686-2.3/mx/BeeBase/mxBeeBase -------------- Would someone be kind enough to let me know whether these messages were expected, and if not, how I might resolve these? Thanks! DC __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 22:06:33 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Feb 2 12:03:15 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> References: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Message-ID: <4277CBB9.8020302@egenix.com> Dianne Chen wrote: > Hi all- > > I am trying to build the mx-base package, v.2.0.6. > This will be used with postgresql 7.3.9, psycopg > 1.1.18, and Roundup 0.8.2. > > RHEL 3.0 > Python 2.3 > egenix-mx-base-2.0.6.tar.gz > > I performed a: > > /usr/local/bin/python2.3 setup.py install > > Everything looks proper with the exeception of this > series of warning statements: > > ----------------- > ... > -------------- > > Would someone be kind enough to let me know whether > these messages were expected, and if not, how I might > resolve these? These warning can safely be ignored. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 13:41:14 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Thu Feb 2 12:03:15 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: 6667 Message-ID: <20050503194114.72091.qmail@web31414.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Dianne Chen wrote: > > Hi all- > > > > I am trying to build the mx-base package, v.2.0.6. > > This will be used with postgresql 7.3.9, psycopg > > 1.1.18, and Roundup 0.8.2. > > > > RHEL 3.0 > > Python 2.3 > > egenix-mx-base-2.0.6.tar.gz > > > > I performed a: > > > > /usr/local/bin/python2.3 setup.py install > > > > Everything looks proper with the exeception of > this > > series of warning statements: > > > > ----------------- > > ... > > -------------- > > > > Would someone be kind enough to let me know > whether > > these messages were expected, and if not, how I > might > > resolve these? > > These warning can safely be ignored. > > -- > Marc-Andre Lemburg > eGenix.com > Marc- Thank you very much for the reply. It helps greatly. With kind regards, DC __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From davidrushby at yahoo.com Tue May 3 17:18:46 2005 From: davidrushby at yahoo.com (David Rushby) Date: Thu Feb 2 12:03:15 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050503231846.35012.qmail@web30009.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > I'm not sure whether your analysis of the problem is correct... Indeed, my original analysis wasn't correct; I think this one is. The fatal error I'm complaining about only arises if the arguments to DateTime.DateTime are invalid, so that the object is deallocated in the onError block of mxDateTime_FromDateAndTime. If the object is created successfully, and later deallocated by Python's garbage collector, the fatal error doesn't arise. Here's my analysis of the problem: --- If the debugging directive Py_TRACE_REFS is enabled, as it is in my case, the Python interpreter maintains a doubly linked list of all Python objects (named refchain) via the _ob_next and _ob_prev pointers added to PyObject via _PyObject_HEAD_EXTRA. Each object is inserted into refchain by the _Py_AddToAllObjects call in _Py_NewReference, and removed from refchain by the _Py_ForgetReference call in _Py_Dealloc. _Py_ForgetReference performs an integrity check on the object being deallocated (op) to make sure that its neighbors in refchain recognize it. Specifically, _Py_ForgetReference verifies that the _ob_next pointer of the previous object in refchain (op->_ob_prev->_ob_next) points to op, and that the _ob_prev pointer of the next object in refchain (op->_ob_next->_ob_prev) points to op. If either of those conditions is false, the interpreter raises the fatal error I'm seeing. After mxDateTime_New pulls an mxDateTimeObject out of the free list, it calls _Py_NewReference on that object to transform it from a "conceptually deallocated" object to a "conceptually allocated" one. _Py_NewReference inserts the object into refchain. Later, when the object is being "conceptually deallocated", it should be removed from refchain with _Py_ForgetReference. The version of _Py_Dealloc that's active when Py_TRACE_REFS is enabled does this (_Py_Dealloc is the element of Py_DECREF that performs the actual destruction). _Py_Dealloc first calls _Py_ForgetReference to remove the object from refchain, then calls the object's destructor (op->ob_type->tp_dealloc). If WANT_SUBCLASSABLE_TYPES is not defined (it is not in my case), the destructor for mxDateTime_Type is mxDateTime_Free. So, if a DateTime object is deallocated normally, as a result of its reference count falling to zero, _Py_Dealloc is called on the object, which first removes it from refchain, then passes it to mxDateTime_Free. If a DateTime object is destroyed prematurely, as a result of invalid arguments to its destructor, the onError handler calls mxDateTime_Free, so the object is "conceptually deallocated" (placed in the free list), *but* the object is not removed from refchain. So if a refchain-membership-integrity-check is performed on the object in question or one of its immediate neighbors in refchain, that integrity check fails, leading to the fatal error. --- The solution is to 'Py_DECREF(...)' the object in the onError handler of its constructor, instead of passing the object directly to mxDateTime_Free. That change solves two problems: 1) It causes _Py_Dealloc to execute, which in turn executes _Py_ForgetReference, so the object is removed from refchain, as it should be. 2) At present, objects that are created successfully and later deallocated by normal reference count mechanics have a reference count of 0 when they enter the free list, whereas objects whose constructors abort their creation due to invalid arguments have a reference count of 1 when they enter the free list. Although AFAIK this doesn't cause an actual execution problem (because the object's reference count is *explicitly set to 1* rather than *incremented by 1* when the object is later "conceptually allocated" by _Py_NewReference), it is likely to confuse future maintainers and thereby lead to the introduction of an actual execution problem. I assume that if you agree that this is a reasonable solution, you'll want to apply the change not only to mxDateTime_FromDateAndTime, but to all similar constructors in mxDateTime.c. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From rj at maxxian.com Thu May 5 01:57:40 2005 From: rj at maxxian.com (RJ Juneau) Date: Thu Feb 2 12:03:15 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c5512e$f72798c0$6505a8c0@rjlaptop> I'm on the 30 day evaluation for mxodbc_zope_da. I'm getting the following error when I submit some queries: Error Type: KeyError Error Value: 'query' I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 with UCS4. The error seems to be caused by multiple rows being returned. I did see an earlier posting with the same error message. The response suggested a template error, but this is clearly not the case here. The additional evidence I've gathered so far: - I'm running the test directly from the ZSQL method, so there's no template involved. - If I use the same query with an additional "where" clause to ensure that only one row is returned, it works - If I use a value in the 'where' clause with no rows returned, it works - The same ZSQL query is being used on a Windows machine running Zope and the free ZODBC module without a problem - The query has been verified directly in mysql-client-browser Other info: - The database is MySQL 4.1.10A-0 - iODBC is the DB driver RJ Juneau -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050505/68d278bf/attachment-0082.htm From mal at egenix.com Thu May 5 12:37:43 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Feb 2 12:03:15 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c5512e$f72798c0$6505a8c0@rjlaptop> References: <000301c5512e$f72798c0$6505a8c0@rjlaptop> Message-ID: <4279E967.6010904@egenix.com> RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 > with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 09:37:42 2005 From: rj at maxxian.com (RJ Juneau) Date: Thu Feb 2 12:03:15 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000101c5516f$3b96de90$6505a8c0@rjlaptop> More interesting info on the problem: If I execute the query directly in the "test" window of the base eGenix mxODBC Database Connection window, it works fine and returns the 20 lines expected. That could point to a problem in the rendering, which seems to be where the traceback ends. Note that within the same Zope system I also have an ODBC connection to a Sybase database, and I have successfully tested multi-line ZSQL queries there. This is the traceback: Time 2005/05/05 07:55:15.294 GMT-4 Exception Type KeyError Exception Value 'query' Traceback (innermost last): Module ZPublisher.Publish, line 101, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 39, in call_object Module Shared.DC.ZRDB.DA, line 337, in manage_test Module DocumentTemplate.DT_String, line 474, in __call__ Module DocumentTemplate.DT_In, line 602, in renderwb Module DocumentTemplate.DT_Var, line 219, in render KeyError: 'query' I don't think the following is an issue, but I'll include it for completeness.I am also getting the following iODBC warnings and errors in the Zope console log, which are related to the ODBC parameters being passed by iODBC. Note that these errors also appear for all of the successful queries. [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (Setup). [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (UsageCount). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Timeout). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Reuse). As for the ZSQL snippet from the template... Since there's no template involved yet (I'm still testing directly from the ZSQL method), I assume you mean the SQL code? select h.host_name, s.system_name, s.system_handle, count(*) from terminal t, system_map s, host h where t.system_index = s.system_index and s.host_index = h.host_index group by s.system_name order by h.host_name Nothing complicated here. There are no parameters passed to the query. RJ -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: May 5, 2005 5:38 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: Re: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is > 2.3.4 with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ---------------------------------------------------------------------- > -- > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 16:00:32 2005 From: charlie at egenix.com (Charlie Clark) Date: Thu Feb 2 12:03:15 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000101c5516f$3b96de90$6505a8c0@rjlaptop> References: <000101c5516f$3b96de90$6505a8c0@rjlaptop> Message-ID: <20050505150032.644.1@bepc.1115296715.fake> On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base eGenix > mxODBC Database Connection window, it works fine and returns the 20 > lines expected. That could point to a problem in the rendering, which > seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection to > a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 10:22:17 2005 From: rj at maxxian.com (RJ Juneau) Date: Thu Feb 2 12:03:15 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505150032.644.1@bepc.1115296715.fake> Message-ID: <000201c55175$75bcad10$6505a8c0@rjlaptop> At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 11:47:14 2005 From: rj at maxxian.com (RJ Juneau) Date: Thu Feb 2 12:03:15 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c55181$549be0e0$6505a8c0@rjlaptop> Charlie, I found a fix. Here it is in case anyone else runs into this. You were correct - the problem is in another part of Zope. Based on your feedback, I did a bit more searching and found something here: http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. html The problem appears to be in Zope versions after 2.7.0. I'm running 2.7.6, and the post indicates that it also happens in 2.7.4. The solution: Edit file /lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. There are two lines in the file that start with . Edit them as follows: Change first line to: Change second line to: Just to be after, I shut down Zope before I made the changes and restarted it after. Thanks for the help! RJ -----Original Message----- From: RJ Juneau [mailto:rj@maxxian.com] Sent: May 5, 2005 9:22 AM To: 'Charlie Clark' Cc: 'egenix-users@lists.egenix.com' Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 17:57:25 2005 From: charlie at egenix.com (Charlie Clark) Date: Thu Feb 2 12:03:15 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <20050505165725.3380.2@bepc.1115296715.fake> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Thu May 5 09:15:21 2005 From: charlie at egenix.com (Charlie Clark) Date: Thu Feb 2 12:03:15 2006 Subject: [Zope-DB] RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <000001c55185$41477730$6b00a8c0@fonacier.local> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________ Zope-DB mailing list Zope-DB@zope.org http://mail.zope.org/mailman/listinfo/zope-db From rj at maxxian.com Thu May 5 12:38:00 2005 From: rj at maxxian.com (RJ Juneau) Date: Thu Feb 2 12:03:15 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000001c55188$6b841eb0$6505a8c0@rjlaptop> I just double-checked. Zope-2.7.6-final. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 12:49:16 2005 From: rj at maxxian.com (RJ Juneau) Date: Thu Feb 2 12:03:15 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000501c55189$fe149ba0$6505a8c0@rjlaptop> Charlie, The fix has only been applied for 2.7.7, 2.8b2. The info is in the original bug report which is closed and can be found here: http://www.zope.org/Collectors/Zope/1745 RJ -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Fri May 6 11:50:09 2005 From: rj at maxxian.com (RJ Juneau) Date: Thu Feb 2 12:03:16 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC Message-ID: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Still on eval for the product. I cannot get a stable connection to Sybase via the iODBC drivers. - The Sybase ODBC connection - including a query - have been verified at the iODBC level. - The setup is already working well for ODBC connection to MySQL. Symptoms include: - If I click on "Open Connection", it still comes back with "Connection Closed" when I go to a ZSQL method - Using 'Connect on Demand' is not working either. - Clicking "Open Connection" gives me the following error: Connection string: DSN=lixbox_sybase; UID=sa; PWD=XXXXXXX Connection pool entry: 0 Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection rejected by data source', 7952) The odbc.ini definition for DSN "lixbox_sybase" is as follows: [lixbox_sybase] JetFix = No NoRowSetSizeLimit = No Description = Test connection to listbox Options = LIXBOX DSQUERY = SQLSERVER TDSHOST = lixbox TDSPORT = 5000 TDSVER = 5.0 SQLSERVER_CATALOG = N CURSOR_SENSITIVITY = LOW UserName = sa Password = XXXXXXXX ServerType = Sybase 10/11/12 Driver = /opt/openlink/lib/sql_mt_lt.so Database = pubs2 ReadOnly = no NoAutoCommit = No NoLoginBox = No FetchBufferSize = 60 Other relevant data: - Connecting via OpenLink's iODBC - Zope 2.7.6-final - Python 2.3.4 - Connection to Sybase has been successfully tested with iODBC, including issuing a query - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC connection RJ Juneau Chief Technology Officer Maxxian Integration Inc. 155 Westhampton Drive Thornhill, Ontario Canada L4J 7X2 E-mail: rj@maxxian.com Phone: +1 905 482 9429 Cell: +1 416 897 6682 Toll free: +1 866 758 9161 Fax: +1 647 722 2038 -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050506/aef33361/attachment-0082.htm From mal at egenix.com Fri May 6 18:27:37 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Feb 2 12:03:16 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC In-Reply-To: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> References: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Message-ID: <427B8CE9.1010601@egenix.com> RJ Juneau wrote: > Still on eval for the product. > > I cannot get a stable connection to Sybase via the iODBC drivers. > > - The Sybase ODBC connection - including a query - have been verified at > the iODBC level. > - The setup is already working well for ODBC connection to MySQL. > > Symptoms include: > > - If I click on "Open Connection", it still comes back with "Connection > Closed" when I go to a ZSQL method > - Using 'Connect on Demand' is not working either. > - Clicking "Open Connection" gives me the following error: > > Connection string: DSN=lixbox_sybase; > UID=sa; > PWD=XXXXXXX Try writing the connection string on one line and without whitespace. ODBC drivers sometimes have problems with this. > Connection pool entry: 0 > Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection > rejected by data source', 7952) This is a generic error that relates to authentication or firewall problems. It is possible that turning on ODBC tracing the ODBC manager will give more clues as to the real cause of the problem. > The odbc.ini definition for DSN "lixbox_sybase" is as follows: > > [lixbox_sybase] > JetFix = No > NoRowSetSizeLimit = No > Description = Test connection to listbox > Options = LIXBOX > DSQUERY = SQLSERVER > TDSHOST = lixbox > TDSPORT = 5000 > TDSVER = 5.0 > SQLSERVER_CATALOG = N > CURSOR_SENSITIVITY = LOW > UserName = sa > Password = XXXXXXXX > ServerType = Sybase 10/11/12 > Driver = /opt/openlink/lib/sql_mt_lt.so > Database = pubs2 > ReadOnly = no > NoAutoCommit = No > NoLoginBox = No > FetchBufferSize = 60 > > > Other relevant data: > - Connecting via OpenLink's iODBC > - Zope 2.7.6-final > - Python 2.3.4 > - Connection to Sybase has been successfully tested with iODBC, > including issuing a query > - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC > connection > > > > RJ Juneau > Chief Technology Officer > Maxxian Integration Inc. > 155 Westhampton Drive > Thornhill, Ontario > Canada L4J 7X2 > E-mail: rj@maxxian.com > Phone: +1 905 482 9429 > Cell: +1 416 897 6682 > Toll free: +1 866 758 9161 > Fax: +1 647 722 2038 > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 06 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From calisp at gmail.com Sun May 15 23:49:03 2005 From: calisp at gmail.com (calisp@gmail.com) Date: Thu Feb 2 12:03:16 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK Message-ID: Hi, I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the following error... 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the last phase of a two-phase commit. This shouldn't happen. Traceback (most recent call last): File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one jar.tpc_finish(self) File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish try: self._finish() File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could not perform COMMIT or ROLLBACK', 1023) What could be causing this? Can I get the mxODBCZopeDA source from somewhere? It would make debugging this much easier. Thanks, Calisp. From mal at egenix.com Mon May 16 13:52:12 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Feb 2 12:03:16 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK In-Reply-To: References: Message-ID: <42887B5C.4010109@egenix.com> calisp@gmail.com wrote: > Hi, > > I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with > unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the > following error... > > 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the > last phase of a two-phase commit. This shouldn't happen. > Traceback (most recent call last): > File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one > jar.tpc_finish(self) > File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish > try: self._finish() > File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish > File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler > ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could > not perform COMMIT or ROLLBACK', 1023) You should have a look at the database logs to see what prevented the commit from being completed. > What could be causing this? Hard to say: mxODBCZopeDA is trying to commit the transaction, but the driver or database failed to complete the request. The above error was generated by the ODBC driver. This could be network or DNS problems, or be related to a bug in FreeTDS (which is getting more stable with every new release, but should still be considered beta quality software at the moment). > Can I get the mxODBCZopeDA source from > somewhere? It would make debugging this much easier. Getting the source is not an option and won't help much either since the source of the problem is not mxODBCZopeDA. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 16 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Sun May 1 21:29:25 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Feb 2 16:01:23 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <427259F3.4090806@egenix.com> References: <20050427130906.52878.qmail@web30008.mail.mud.yahoo.com> <427259F3.4090806@egenix.com> Message-ID: <42752005.7080904@egenix.com> M.-A. Lemburg wrote: > David Rushby wrote: > >> --- "M.-A. Lemburg" wrote: >> >>> Are you using the standard mxDateTime build or one >>> with WANT_SUBCLASSABLE_TYPES defined... >> >> >> >> Presumably "the standard", since I just built with 'py24d setup.py >> build', making no attempt to enable special directives. >> >> >>> ... (mxDateTime_Deallocate is only used by the latter)? >> >> >> >> That's true in 2.1.0-2005-04-15, but not in 2.1.0b5. >> >> >>> In any case, please try our latest snapshot: >>> >>> >> >> http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-04-15.zip >> >>> to see if that makes any difference. >> >> >> >> I can't build it out of the box: > > > Hmm, looks like distutils' sdist command doesn't like our new > repository layout which uses symlinks (after we've switched to > subversion). > > We'll have to debug distutils first, I guess :-( Ok, we've found the problem and fixed it. Here's the new release (which does build out of the box at least on our boxes ;-): http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 01 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From davidrushby at yahoo.com Mon May 2 15:49:53 2005 From: davidrushby at yahoo.com (David Rushby) Date: Thu Feb 2 16:01:23 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Ok, we've found the problem and fixed it. Here's the new > release (which does build out of the box at least on our > boxes ;-): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip It does build now, but: py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" still behaves as it did when I submitted my original message: Fatal Python error: UNREF invalid object Aborted This is the same debug build of Python 2.4.1 that I was previously using, running the same configuration (CentOS Linux 4.0/i386, everything compiled with GCC 3.4.3). Have you examined my original claim as to the cause of the bug? __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 10:21:55 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Feb 2 16:01:23 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> References: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> Message-ID: <42772693.8050306@egenix.com> David Rushby wrote: > --- "M.-A. Lemburg" wrote: > >>Ok, we've found the problem and fixed it. Here's the new >>release (which does build out of the box at least on our >>boxes ;-): >> >> > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip > > It does build now, but: > py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" > still behaves as it did when I submitted my original message: > Fatal Python error: UNREF invalid object > Aborted > > This is the same debug build of Python 2.4.1 that I was previously > using, running the same configuration (CentOS Linux 4.0/i386, > everything compiled with GCC 3.4.3). > > Have you examined my original claim as to the cause of the bug? No. We haven't had time for looking into it. I'm not sure whether your analysis of the problem is correct: if you don't define WANT_SUBCLASSABLE_TYPES, the API mxDateTime_Deallocate() is neither defined nor used. Furthermore, PyObject_Del() is only called by mxDateTime_Free() if you have explicitely edited mxDateTime.c to disabled the free list #defines. In a standard build, PyObject_Del() is only called at module finalization time. Note that the reason we call mxDateTime_Free() in the constructor is that we don't want the destructor of the object to be called. Py_DECREF() would call the destructor (mxDateTime_Deallocate). It is possible that the debug code in Python complains about the refcount in the object not being 0 at the time the object is finalized (module finalization time), but I don't see any such checks in PyObject_Free() (which is what PyObject_Del() maps to). Again, all of this does not happen in regular non-debug Python builds. Please be aware that we don't support debug builds, so fixing the problem (if there is one - gcc has some serious optimization problems on some combinations of platform and version) will take a while. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 09:27:37 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Thu Feb 2 16:01:24 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 Message-ID: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Hi all- I am trying to build the mx-base package, v.2.0.6. This will be used with postgresql 7.3.9, psycopg 1.1.18, and Roundup 0.8.2. RHEL 3.0 Python 2.3 egenix-mx-base-2.0.6.tar.gz I performed a: /usr/local/bin/python2.3 setup.py install Everything looks proper with the exeception of this series of warning statements: ----------------- gcc -pthread -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fno-strict-aliasing -fPIC -Imx/BeeBase/mxBeeBase -I/usr/local/incl ude/python2.3 -I/usr/local/include -c mx/BeeBase/mxBeeBase/btr.c -o build/temp.linux-i686-2.3/mx/BeeBase/mxBeeBase/mxBeeBa se/mx/BeeBase/mxBeeBase/btr.o mx/BeeBase/mxBeeBase/btr.c: In function `dumpBuf': mx/BeeBase/mxBeeBase/btr.c:249: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:250: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:255: warning: unsigned int format, long unsigned int arg (arg 4) mx/BeeBase/mxBeeBase/btr.c:256: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c: In function `_validateTree': mx/BeeBase/mxBeeBase/btr.c:330: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:337: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:339: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:349: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:351: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 3) creating build/lib.linux-i686-2.3/mx/BeeBase creating build/lib.linux-i686-2.3/mx/BeeBase/mxBeeBase -------------- Would someone be kind enough to let me know whether these messages were expected, and if not, how I might resolve these? Thanks! DC __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 22:06:33 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Feb 2 16:01:24 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> References: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Message-ID: <4277CBB9.8020302@egenix.com> Dianne Chen wrote: > Hi all- > > I am trying to build the mx-base package, v.2.0.6. > This will be used with postgresql 7.3.9, psycopg > 1.1.18, and Roundup 0.8.2. > > RHEL 3.0 > Python 2.3 > egenix-mx-base-2.0.6.tar.gz > > I performed a: > > /usr/local/bin/python2.3 setup.py install > > Everything looks proper with the exeception of this > series of warning statements: > > ----------------- > ... > -------------- > > Would someone be kind enough to let me know whether > these messages were expected, and if not, how I might > resolve these? These warning can safely be ignored. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 13:41:14 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Thu Feb 2 16:01:24 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: 6667 Message-ID: <20050503194114.72091.qmail@web31414.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Dianne Chen wrote: > > Hi all- > > > > I am trying to build the mx-base package, v.2.0.6. > > This will be used with postgresql 7.3.9, psycopg > > 1.1.18, and Roundup 0.8.2. > > > > RHEL 3.0 > > Python 2.3 > > egenix-mx-base-2.0.6.tar.gz > > > > I performed a: > > > > /usr/local/bin/python2.3 setup.py install > > > > Everything looks proper with the exeception of > this > > series of warning statements: > > > > ----------------- > > ... > > -------------- > > > > Would someone be kind enough to let me know > whether > > these messages were expected, and if not, how I > might > > resolve these? > > These warning can safely be ignored. > > -- > Marc-Andre Lemburg > eGenix.com > Marc- Thank you very much for the reply. It helps greatly. With kind regards, DC __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From davidrushby at yahoo.com Tue May 3 17:18:46 2005 From: davidrushby at yahoo.com (David Rushby) Date: Thu Feb 2 16:01:24 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050503231846.35012.qmail@web30009.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > I'm not sure whether your analysis of the problem is correct... Indeed, my original analysis wasn't correct; I think this one is. The fatal error I'm complaining about only arises if the arguments to DateTime.DateTime are invalid, so that the object is deallocated in the onError block of mxDateTime_FromDateAndTime. If the object is created successfully, and later deallocated by Python's garbage collector, the fatal error doesn't arise. Here's my analysis of the problem: --- If the debugging directive Py_TRACE_REFS is enabled, as it is in my case, the Python interpreter maintains a doubly linked list of all Python objects (named refchain) via the _ob_next and _ob_prev pointers added to PyObject via _PyObject_HEAD_EXTRA. Each object is inserted into refchain by the _Py_AddToAllObjects call in _Py_NewReference, and removed from refchain by the _Py_ForgetReference call in _Py_Dealloc. _Py_ForgetReference performs an integrity check on the object being deallocated (op) to make sure that its neighbors in refchain recognize it. Specifically, _Py_ForgetReference verifies that the _ob_next pointer of the previous object in refchain (op->_ob_prev->_ob_next) points to op, and that the _ob_prev pointer of the next object in refchain (op->_ob_next->_ob_prev) points to op. If either of those conditions is false, the interpreter raises the fatal error I'm seeing. After mxDateTime_New pulls an mxDateTimeObject out of the free list, it calls _Py_NewReference on that object to transform it from a "conceptually deallocated" object to a "conceptually allocated" one. _Py_NewReference inserts the object into refchain. Later, when the object is being "conceptually deallocated", it should be removed from refchain with _Py_ForgetReference. The version of _Py_Dealloc that's active when Py_TRACE_REFS is enabled does this (_Py_Dealloc is the element of Py_DECREF that performs the actual destruction). _Py_Dealloc first calls _Py_ForgetReference to remove the object from refchain, then calls the object's destructor (op->ob_type->tp_dealloc). If WANT_SUBCLASSABLE_TYPES is not defined (it is not in my case), the destructor for mxDateTime_Type is mxDateTime_Free. So, if a DateTime object is deallocated normally, as a result of its reference count falling to zero, _Py_Dealloc is called on the object, which first removes it from refchain, then passes it to mxDateTime_Free. If a DateTime object is destroyed prematurely, as a result of invalid arguments to its destructor, the onError handler calls mxDateTime_Free, so the object is "conceptually deallocated" (placed in the free list), *but* the object is not removed from refchain. So if a refchain-membership-integrity-check is performed on the object in question or one of its immediate neighbors in refchain, that integrity check fails, leading to the fatal error. --- The solution is to 'Py_DECREF(...)' the object in the onError handler of its constructor, instead of passing the object directly to mxDateTime_Free. That change solves two problems: 1) It causes _Py_Dealloc to execute, which in turn executes _Py_ForgetReference, so the object is removed from refchain, as it should be. 2) At present, objects that are created successfully and later deallocated by normal reference count mechanics have a reference count of 0 when they enter the free list, whereas objects whose constructors abort their creation due to invalid arguments have a reference count of 1 when they enter the free list. Although AFAIK this doesn't cause an actual execution problem (because the object's reference count is *explicitly set to 1* rather than *incremented by 1* when the object is later "conceptually allocated" by _Py_NewReference), it is likely to confuse future maintainers and thereby lead to the introduction of an actual execution problem. I assume that if you agree that this is a reasonable solution, you'll want to apply the change not only to mxDateTime_FromDateAndTime, but to all similar constructors in mxDateTime.c. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From rj at maxxian.com Thu May 5 01:57:40 2005 From: rj at maxxian.com (RJ Juneau) Date: Thu Feb 2 16:01:24 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c5512e$f72798c0$6505a8c0@rjlaptop> I'm on the 30 day evaluation for mxodbc_zope_da. I'm getting the following error when I submit some queries: Error Type: KeyError Error Value: 'query' I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 with UCS4. The error seems to be caused by multiple rows being returned. I did see an earlier posting with the same error message. The response suggested a template error, but this is clearly not the case here. The additional evidence I've gathered so far: - I'm running the test directly from the ZSQL method, so there's no template involved. - If I use the same query with an additional "where" clause to ensure that only one row is returned, it works - If I use a value in the 'where' clause with no rows returned, it works - The same ZSQL query is being used on a Windows machine running Zope and the free ZODBC module without a problem - The query has been verified directly in mysql-client-browser Other info: - The database is MySQL 4.1.10A-0 - iODBC is the DB driver RJ Juneau -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050505/68d278bf/attachment-0083.htm From mal at egenix.com Thu May 5 12:37:43 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Feb 2 16:01:24 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c5512e$f72798c0$6505a8c0@rjlaptop> References: <000301c5512e$f72798c0$6505a8c0@rjlaptop> Message-ID: <4279E967.6010904@egenix.com> RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 > with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 09:37:42 2005 From: rj at maxxian.com (RJ Juneau) Date: Thu Feb 2 16:01:24 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000101c5516f$3b96de90$6505a8c0@rjlaptop> More interesting info on the problem: If I execute the query directly in the "test" window of the base eGenix mxODBC Database Connection window, it works fine and returns the 20 lines expected. That could point to a problem in the rendering, which seems to be where the traceback ends. Note that within the same Zope system I also have an ODBC connection to a Sybase database, and I have successfully tested multi-line ZSQL queries there. This is the traceback: Time 2005/05/05 07:55:15.294 GMT-4 Exception Type KeyError Exception Value 'query' Traceback (innermost last): Module ZPublisher.Publish, line 101, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 39, in call_object Module Shared.DC.ZRDB.DA, line 337, in manage_test Module DocumentTemplate.DT_String, line 474, in __call__ Module DocumentTemplate.DT_In, line 602, in renderwb Module DocumentTemplate.DT_Var, line 219, in render KeyError: 'query' I don't think the following is an issue, but I'll include it for completeness.I am also getting the following iODBC warnings and errors in the Zope console log, which are related to the ODBC parameters being passed by iODBC. Note that these errors also appear for all of the successful queries. [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (Setup). [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (UsageCount). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Timeout). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Reuse). As for the ZSQL snippet from the template... Since there's no template involved yet (I'm still testing directly from the ZSQL method), I assume you mean the SQL code? select h.host_name, s.system_name, s.system_handle, count(*) from terminal t, system_map s, host h where t.system_index = s.system_index and s.host_index = h.host_index group by s.system_name order by h.host_name Nothing complicated here. There are no parameters passed to the query. RJ -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: May 5, 2005 5:38 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: Re: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is > 2.3.4 with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ---------------------------------------------------------------------- > -- > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 16:00:32 2005 From: charlie at egenix.com (Charlie Clark) Date: Thu Feb 2 16:01:24 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000101c5516f$3b96de90$6505a8c0@rjlaptop> References: <000101c5516f$3b96de90$6505a8c0@rjlaptop> Message-ID: <20050505150032.644.1@bepc.1115296715.fake> On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base eGenix > mxODBC Database Connection window, it works fine and returns the 20 > lines expected. That could point to a problem in the rendering, which > seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection to > a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 10:22:17 2005 From: rj at maxxian.com (RJ Juneau) Date: Thu Feb 2 16:01:24 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505150032.644.1@bepc.1115296715.fake> Message-ID: <000201c55175$75bcad10$6505a8c0@rjlaptop> At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 11:47:14 2005 From: rj at maxxian.com (RJ Juneau) Date: Thu Feb 2 16:01:24 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c55181$549be0e0$6505a8c0@rjlaptop> Charlie, I found a fix. Here it is in case anyone else runs into this. You were correct - the problem is in another part of Zope. Based on your feedback, I did a bit more searching and found something here: http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. html The problem appears to be in Zope versions after 2.7.0. I'm running 2.7.6, and the post indicates that it also happens in 2.7.4. The solution: Edit file /lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. There are two lines in the file that start with . Edit them as follows: Change first line to: Change second line to: Just to be after, I shut down Zope before I made the changes and restarted it after. Thanks for the help! RJ -----Original Message----- From: RJ Juneau [mailto:rj@maxxian.com] Sent: May 5, 2005 9:22 AM To: 'Charlie Clark' Cc: 'egenix-users@lists.egenix.com' Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 17:57:25 2005 From: charlie at egenix.com (Charlie Clark) Date: Thu Feb 2 16:01:24 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <20050505165725.3380.2@bepc.1115296715.fake> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Thu May 5 09:15:21 2005 From: charlie at egenix.com (Charlie Clark) Date: Thu Feb 2 16:01:24 2006 Subject: [Zope-DB] RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <000001c55185$41477730$6b00a8c0@fonacier.local> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________ Zope-DB mailing list Zope-DB@zope.org http://mail.zope.org/mailman/listinfo/zope-db From rj at maxxian.com Thu May 5 12:38:00 2005 From: rj at maxxian.com (RJ Juneau) Date: Thu Feb 2 16:01:24 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000001c55188$6b841eb0$6505a8c0@rjlaptop> I just double-checked. Zope-2.7.6-final. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 12:49:16 2005 From: rj at maxxian.com (RJ Juneau) Date: Thu Feb 2 16:01:24 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000501c55189$fe149ba0$6505a8c0@rjlaptop> Charlie, The fix has only been applied for 2.7.7, 2.8b2. The info is in the original bug report which is closed and can be found here: http://www.zope.org/Collectors/Zope/1745 RJ -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Fri May 6 11:50:09 2005 From: rj at maxxian.com (RJ Juneau) Date: Thu Feb 2 16:01:24 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC Message-ID: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Still on eval for the product. I cannot get a stable connection to Sybase via the iODBC drivers. - The Sybase ODBC connection - including a query - have been verified at the iODBC level. - The setup is already working well for ODBC connection to MySQL. Symptoms include: - If I click on "Open Connection", it still comes back with "Connection Closed" when I go to a ZSQL method - Using 'Connect on Demand' is not working either. - Clicking "Open Connection" gives me the following error: Connection string: DSN=lixbox_sybase; UID=sa; PWD=XXXXXXX Connection pool entry: 0 Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection rejected by data source', 7952) The odbc.ini definition for DSN "lixbox_sybase" is as follows: [lixbox_sybase] JetFix = No NoRowSetSizeLimit = No Description = Test connection to listbox Options = LIXBOX DSQUERY = SQLSERVER TDSHOST = lixbox TDSPORT = 5000 TDSVER = 5.0 SQLSERVER_CATALOG = N CURSOR_SENSITIVITY = LOW UserName = sa Password = XXXXXXXX ServerType = Sybase 10/11/12 Driver = /opt/openlink/lib/sql_mt_lt.so Database = pubs2 ReadOnly = no NoAutoCommit = No NoLoginBox = No FetchBufferSize = 60 Other relevant data: - Connecting via OpenLink's iODBC - Zope 2.7.6-final - Python 2.3.4 - Connection to Sybase has been successfully tested with iODBC, including issuing a query - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC connection RJ Juneau Chief Technology Officer Maxxian Integration Inc. 155 Westhampton Drive Thornhill, Ontario Canada L4J 7X2 E-mail: rj@maxxian.com Phone: +1 905 482 9429 Cell: +1 416 897 6682 Toll free: +1 866 758 9161 Fax: +1 647 722 2038 -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050506/aef33361/attachment-0083.htm From mal at egenix.com Fri May 6 18:27:37 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Feb 2 16:01:24 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC In-Reply-To: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> References: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Message-ID: <427B8CE9.1010601@egenix.com> RJ Juneau wrote: > Still on eval for the product. > > I cannot get a stable connection to Sybase via the iODBC drivers. > > - The Sybase ODBC connection - including a query - have been verified at > the iODBC level. > - The setup is already working well for ODBC connection to MySQL. > > Symptoms include: > > - If I click on "Open Connection", it still comes back with "Connection > Closed" when I go to a ZSQL method > - Using 'Connect on Demand' is not working either. > - Clicking "Open Connection" gives me the following error: > > Connection string: DSN=lixbox_sybase; > UID=sa; > PWD=XXXXXXX Try writing the connection string on one line and without whitespace. ODBC drivers sometimes have problems with this. > Connection pool entry: 0 > Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection > rejected by data source', 7952) This is a generic error that relates to authentication or firewall problems. It is possible that turning on ODBC tracing the ODBC manager will give more clues as to the real cause of the problem. > The odbc.ini definition for DSN "lixbox_sybase" is as follows: > > [lixbox_sybase] > JetFix = No > NoRowSetSizeLimit = No > Description = Test connection to listbox > Options = LIXBOX > DSQUERY = SQLSERVER > TDSHOST = lixbox > TDSPORT = 5000 > TDSVER = 5.0 > SQLSERVER_CATALOG = N > CURSOR_SENSITIVITY = LOW > UserName = sa > Password = XXXXXXXX > ServerType = Sybase 10/11/12 > Driver = /opt/openlink/lib/sql_mt_lt.so > Database = pubs2 > ReadOnly = no > NoAutoCommit = No > NoLoginBox = No > FetchBufferSize = 60 > > > Other relevant data: > - Connecting via OpenLink's iODBC > - Zope 2.7.6-final > - Python 2.3.4 > - Connection to Sybase has been successfully tested with iODBC, > including issuing a query > - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC > connection > > > > RJ Juneau > Chief Technology Officer > Maxxian Integration Inc. > 155 Westhampton Drive > Thornhill, Ontario > Canada L4J 7X2 > E-mail: rj@maxxian.com > Phone: +1 905 482 9429 > Cell: +1 416 897 6682 > Toll free: +1 866 758 9161 > Fax: +1 647 722 2038 > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 06 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From calisp at gmail.com Sun May 15 23:49:03 2005 From: calisp at gmail.com (calisp@gmail.com) Date: Thu Feb 2 16:01:24 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK Message-ID: Hi, I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the following error... 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the last phase of a two-phase commit. This shouldn't happen. Traceback (most recent call last): File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one jar.tpc_finish(self) File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish try: self._finish() File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could not perform COMMIT or ROLLBACK', 1023) What could be causing this? Can I get the mxODBCZopeDA source from somewhere? It would make debugging this much easier. Thanks, Calisp. From mal at egenix.com Mon May 16 13:52:12 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Feb 2 16:01:24 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK In-Reply-To: References: Message-ID: <42887B5C.4010109@egenix.com> calisp@gmail.com wrote: > Hi, > > I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with > unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the > following error... > > 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the > last phase of a two-phase commit. This shouldn't happen. > Traceback (most recent call last): > File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one > jar.tpc_finish(self) > File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish > try: self._finish() > File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish > File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler > ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could > not perform COMMIT or ROLLBACK', 1023) You should have a look at the database logs to see what prevented the commit from being completed. > What could be causing this? Hard to say: mxODBCZopeDA is trying to commit the transaction, but the driver or database failed to complete the request. The above error was generated by the ODBC driver. This could be network or DNS problems, or be related to a bug in FreeTDS (which is getting more stable with every new release, but should still be considered beta quality software at the moment). > Can I get the mxODBCZopeDA source from > somewhere? It would make debugging this much easier. Getting the source is not an option and won't help much either since the source of the problem is not mxODBCZopeDA. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 16 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Sun May 1 21:29:25 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Feb 2 20:01:16 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <427259F3.4090806@egenix.com> References: <20050427130906.52878.qmail@web30008.mail.mud.yahoo.com> <427259F3.4090806@egenix.com> Message-ID: <42752005.7080904@egenix.com> M.-A. Lemburg wrote: > David Rushby wrote: > >> --- "M.-A. Lemburg" wrote: >> >>> Are you using the standard mxDateTime build or one >>> with WANT_SUBCLASSABLE_TYPES defined... >> >> >> >> Presumably "the standard", since I just built with 'py24d setup.py >> build', making no attempt to enable special directives. >> >> >>> ... (mxDateTime_Deallocate is only used by the latter)? >> >> >> >> That's true in 2.1.0-2005-04-15, but not in 2.1.0b5. >> >> >>> In any case, please try our latest snapshot: >>> >>> >> >> http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-04-15.zip >> >>> to see if that makes any difference. >> >> >> >> I can't build it out of the box: > > > Hmm, looks like distutils' sdist command doesn't like our new > repository layout which uses symlinks (after we've switched to > subversion). > > We'll have to debug distutils first, I guess :-( Ok, we've found the problem and fixed it. Here's the new release (which does build out of the box at least on our boxes ;-): http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 01 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From davidrushby at yahoo.com Mon May 2 15:49:53 2005 From: davidrushby at yahoo.com (David Rushby) Date: Thu Feb 2 20:01:16 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Ok, we've found the problem and fixed it. Here's the new > release (which does build out of the box at least on our > boxes ;-): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip It does build now, but: py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" still behaves as it did when I submitted my original message: Fatal Python error: UNREF invalid object Aborted This is the same debug build of Python 2.4.1 that I was previously using, running the same configuration (CentOS Linux 4.0/i386, everything compiled with GCC 3.4.3). Have you examined my original claim as to the cause of the bug? __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 10:21:55 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Feb 2 20:01:16 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> References: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> Message-ID: <42772693.8050306@egenix.com> David Rushby wrote: > --- "M.-A. Lemburg" wrote: > >>Ok, we've found the problem and fixed it. Here's the new >>release (which does build out of the box at least on our >>boxes ;-): >> >> > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip > > It does build now, but: > py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" > still behaves as it did when I submitted my original message: > Fatal Python error: UNREF invalid object > Aborted > > This is the same debug build of Python 2.4.1 that I was previously > using, running the same configuration (CentOS Linux 4.0/i386, > everything compiled with GCC 3.4.3). > > Have you examined my original claim as to the cause of the bug? No. We haven't had time for looking into it. I'm not sure whether your analysis of the problem is correct: if you don't define WANT_SUBCLASSABLE_TYPES, the API mxDateTime_Deallocate() is neither defined nor used. Furthermore, PyObject_Del() is only called by mxDateTime_Free() if you have explicitely edited mxDateTime.c to disabled the free list #defines. In a standard build, PyObject_Del() is only called at module finalization time. Note that the reason we call mxDateTime_Free() in the constructor is that we don't want the destructor of the object to be called. Py_DECREF() would call the destructor (mxDateTime_Deallocate). It is possible that the debug code in Python complains about the refcount in the object not being 0 at the time the object is finalized (module finalization time), but I don't see any such checks in PyObject_Free() (which is what PyObject_Del() maps to). Again, all of this does not happen in regular non-debug Python builds. Please be aware that we don't support debug builds, so fixing the problem (if there is one - gcc has some serious optimization problems on some combinations of platform and version) will take a while. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 09:27:37 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Thu Feb 2 20:01:16 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 Message-ID: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Hi all- I am trying to build the mx-base package, v.2.0.6. This will be used with postgresql 7.3.9, psycopg 1.1.18, and Roundup 0.8.2. RHEL 3.0 Python 2.3 egenix-mx-base-2.0.6.tar.gz I performed a: /usr/local/bin/python2.3 setup.py install Everything looks proper with the exeception of this series of warning statements: ----------------- gcc -pthread -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fno-strict-aliasing -fPIC -Imx/BeeBase/mxBeeBase -I/usr/local/incl ude/python2.3 -I/usr/local/include -c mx/BeeBase/mxBeeBase/btr.c -o build/temp.linux-i686-2.3/mx/BeeBase/mxBeeBase/mxBeeBa se/mx/BeeBase/mxBeeBase/btr.o mx/BeeBase/mxBeeBase/btr.c: In function `dumpBuf': mx/BeeBase/mxBeeBase/btr.c:249: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:250: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:255: warning: unsigned int format, long unsigned int arg (arg 4) mx/BeeBase/mxBeeBase/btr.c:256: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c: In function `_validateTree': mx/BeeBase/mxBeeBase/btr.c:330: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:337: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:339: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:349: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:351: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 3) creating build/lib.linux-i686-2.3/mx/BeeBase creating build/lib.linux-i686-2.3/mx/BeeBase/mxBeeBase -------------- Would someone be kind enough to let me know whether these messages were expected, and if not, how I might resolve these? Thanks! DC __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 22:06:33 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Feb 2 20:01:16 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> References: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Message-ID: <4277CBB9.8020302@egenix.com> Dianne Chen wrote: > Hi all- > > I am trying to build the mx-base package, v.2.0.6. > This will be used with postgresql 7.3.9, psycopg > 1.1.18, and Roundup 0.8.2. > > RHEL 3.0 > Python 2.3 > egenix-mx-base-2.0.6.tar.gz > > I performed a: > > /usr/local/bin/python2.3 setup.py install > > Everything looks proper with the exeception of this > series of warning statements: > > ----------------- > ... > -------------- > > Would someone be kind enough to let me know whether > these messages were expected, and if not, how I might > resolve these? These warning can safely be ignored. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 13:41:14 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Thu Feb 2 20:01:16 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: 6667 Message-ID: <20050503194114.72091.qmail@web31414.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Dianne Chen wrote: > > Hi all- > > > > I am trying to build the mx-base package, v.2.0.6. > > This will be used with postgresql 7.3.9, psycopg > > 1.1.18, and Roundup 0.8.2. > > > > RHEL 3.0 > > Python 2.3 > > egenix-mx-base-2.0.6.tar.gz > > > > I performed a: > > > > /usr/local/bin/python2.3 setup.py install > > > > Everything looks proper with the exeception of > this > > series of warning statements: > > > > ----------------- > > ... > > -------------- > > > > Would someone be kind enough to let me know > whether > > these messages were expected, and if not, how I > might > > resolve these? > > These warning can safely be ignored. > > -- > Marc-Andre Lemburg > eGenix.com > Marc- Thank you very much for the reply. It helps greatly. With kind regards, DC __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From davidrushby at yahoo.com Tue May 3 17:18:46 2005 From: davidrushby at yahoo.com (David Rushby) Date: Thu Feb 2 20:01:16 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050503231846.35012.qmail@web30009.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > I'm not sure whether your analysis of the problem is correct... Indeed, my original analysis wasn't correct; I think this one is. The fatal error I'm complaining about only arises if the arguments to DateTime.DateTime are invalid, so that the object is deallocated in the onError block of mxDateTime_FromDateAndTime. If the object is created successfully, and later deallocated by Python's garbage collector, the fatal error doesn't arise. Here's my analysis of the problem: --- If the debugging directive Py_TRACE_REFS is enabled, as it is in my case, the Python interpreter maintains a doubly linked list of all Python objects (named refchain) via the _ob_next and _ob_prev pointers added to PyObject via _PyObject_HEAD_EXTRA. Each object is inserted into refchain by the _Py_AddToAllObjects call in _Py_NewReference, and removed from refchain by the _Py_ForgetReference call in _Py_Dealloc. _Py_ForgetReference performs an integrity check on the object being deallocated (op) to make sure that its neighbors in refchain recognize it. Specifically, _Py_ForgetReference verifies that the _ob_next pointer of the previous object in refchain (op->_ob_prev->_ob_next) points to op, and that the _ob_prev pointer of the next object in refchain (op->_ob_next->_ob_prev) points to op. If either of those conditions is false, the interpreter raises the fatal error I'm seeing. After mxDateTime_New pulls an mxDateTimeObject out of the free list, it calls _Py_NewReference on that object to transform it from a "conceptually deallocated" object to a "conceptually allocated" one. _Py_NewReference inserts the object into refchain. Later, when the object is being "conceptually deallocated", it should be removed from refchain with _Py_ForgetReference. The version of _Py_Dealloc that's active when Py_TRACE_REFS is enabled does this (_Py_Dealloc is the element of Py_DECREF that performs the actual destruction). _Py_Dealloc first calls _Py_ForgetReference to remove the object from refchain, then calls the object's destructor (op->ob_type->tp_dealloc). If WANT_SUBCLASSABLE_TYPES is not defined (it is not in my case), the destructor for mxDateTime_Type is mxDateTime_Free. So, if a DateTime object is deallocated normally, as a result of its reference count falling to zero, _Py_Dealloc is called on the object, which first removes it from refchain, then passes it to mxDateTime_Free. If a DateTime object is destroyed prematurely, as a result of invalid arguments to its destructor, the onError handler calls mxDateTime_Free, so the object is "conceptually deallocated" (placed in the free list), *but* the object is not removed from refchain. So if a refchain-membership-integrity-check is performed on the object in question or one of its immediate neighbors in refchain, that integrity check fails, leading to the fatal error. --- The solution is to 'Py_DECREF(...)' the object in the onError handler of its constructor, instead of passing the object directly to mxDateTime_Free. That change solves two problems: 1) It causes _Py_Dealloc to execute, which in turn executes _Py_ForgetReference, so the object is removed from refchain, as it should be. 2) At present, objects that are created successfully and later deallocated by normal reference count mechanics have a reference count of 0 when they enter the free list, whereas objects whose constructors abort their creation due to invalid arguments have a reference count of 1 when they enter the free list. Although AFAIK this doesn't cause an actual execution problem (because the object's reference count is *explicitly set to 1* rather than *incremented by 1* when the object is later "conceptually allocated" by _Py_NewReference), it is likely to confuse future maintainers and thereby lead to the introduction of an actual execution problem. I assume that if you agree that this is a reasonable solution, you'll want to apply the change not only to mxDateTime_FromDateAndTime, but to all similar constructors in mxDateTime.c. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From rj at maxxian.com Thu May 5 01:57:40 2005 From: rj at maxxian.com (RJ Juneau) Date: Thu Feb 2 20:01:16 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c5512e$f72798c0$6505a8c0@rjlaptop> I'm on the 30 day evaluation for mxodbc_zope_da. I'm getting the following error when I submit some queries: Error Type: KeyError Error Value: 'query' I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 with UCS4. The error seems to be caused by multiple rows being returned. I did see an earlier posting with the same error message. The response suggested a template error, but this is clearly not the case here. The additional evidence I've gathered so far: - I'm running the test directly from the ZSQL method, so there's no template involved. - If I use the same query with an additional "where" clause to ensure that only one row is returned, it works - If I use a value in the 'where' clause with no rows returned, it works - The same ZSQL query is being used on a Windows machine running Zope and the free ZODBC module without a problem - The query has been verified directly in mysql-client-browser Other info: - The database is MySQL 4.1.10A-0 - iODBC is the DB driver RJ Juneau -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050505/68d278bf/attachment-0084.htm From mal at egenix.com Thu May 5 12:37:43 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Feb 2 20:01:16 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c5512e$f72798c0$6505a8c0@rjlaptop> References: <000301c5512e$f72798c0$6505a8c0@rjlaptop> Message-ID: <4279E967.6010904@egenix.com> RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 > with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 09:37:42 2005 From: rj at maxxian.com (RJ Juneau) Date: Thu Feb 2 20:01:16 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000101c5516f$3b96de90$6505a8c0@rjlaptop> More interesting info on the problem: If I execute the query directly in the "test" window of the base eGenix mxODBC Database Connection window, it works fine and returns the 20 lines expected. That could point to a problem in the rendering, which seems to be where the traceback ends. Note that within the same Zope system I also have an ODBC connection to a Sybase database, and I have successfully tested multi-line ZSQL queries there. This is the traceback: Time 2005/05/05 07:55:15.294 GMT-4 Exception Type KeyError Exception Value 'query' Traceback (innermost last): Module ZPublisher.Publish, line 101, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 39, in call_object Module Shared.DC.ZRDB.DA, line 337, in manage_test Module DocumentTemplate.DT_String, line 474, in __call__ Module DocumentTemplate.DT_In, line 602, in renderwb Module DocumentTemplate.DT_Var, line 219, in render KeyError: 'query' I don't think the following is an issue, but I'll include it for completeness.I am also getting the following iODBC warnings and errors in the Zope console log, which are related to the ODBC parameters being passed by iODBC. Note that these errors also appear for all of the successful queries. [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (Setup). [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (UsageCount). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Timeout). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Reuse). As for the ZSQL snippet from the template... Since there's no template involved yet (I'm still testing directly from the ZSQL method), I assume you mean the SQL code? select h.host_name, s.system_name, s.system_handle, count(*) from terminal t, system_map s, host h where t.system_index = s.system_index and s.host_index = h.host_index group by s.system_name order by h.host_name Nothing complicated here. There are no parameters passed to the query. RJ -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: May 5, 2005 5:38 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: Re: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is > 2.3.4 with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ---------------------------------------------------------------------- > -- > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 16:00:32 2005 From: charlie at egenix.com (Charlie Clark) Date: Thu Feb 2 20:01:16 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000101c5516f$3b96de90$6505a8c0@rjlaptop> References: <000101c5516f$3b96de90$6505a8c0@rjlaptop> Message-ID: <20050505150032.644.1@bepc.1115296715.fake> On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base eGenix > mxODBC Database Connection window, it works fine and returns the 20 > lines expected. That could point to a problem in the rendering, which > seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection to > a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 10:22:17 2005 From: rj at maxxian.com (RJ Juneau) Date: Thu Feb 2 20:01:16 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505150032.644.1@bepc.1115296715.fake> Message-ID: <000201c55175$75bcad10$6505a8c0@rjlaptop> At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 11:47:14 2005 From: rj at maxxian.com (RJ Juneau) Date: Thu Feb 2 20:01:16 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c55181$549be0e0$6505a8c0@rjlaptop> Charlie, I found a fix. Here it is in case anyone else runs into this. You were correct - the problem is in another part of Zope. Based on your feedback, I did a bit more searching and found something here: http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. html The problem appears to be in Zope versions after 2.7.0. I'm running 2.7.6, and the post indicates that it also happens in 2.7.4. The solution: Edit file /lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. There are two lines in the file that start with . Edit them as follows: Change first line to: Change second line to: Just to be after, I shut down Zope before I made the changes and restarted it after. Thanks for the help! RJ -----Original Message----- From: RJ Juneau [mailto:rj@maxxian.com] Sent: May 5, 2005 9:22 AM To: 'Charlie Clark' Cc: 'egenix-users@lists.egenix.com' Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 17:57:25 2005 From: charlie at egenix.com (Charlie Clark) Date: Thu Feb 2 20:01:16 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <20050505165725.3380.2@bepc.1115296715.fake> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Thu May 5 09:15:21 2005 From: charlie at egenix.com (Charlie Clark) Date: Thu Feb 2 20:01:16 2006 Subject: [Zope-DB] RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <000001c55185$41477730$6b00a8c0@fonacier.local> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________ Zope-DB mailing list Zope-DB@zope.org http://mail.zope.org/mailman/listinfo/zope-db From rj at maxxian.com Thu May 5 12:38:00 2005 From: rj at maxxian.com (RJ Juneau) Date: Thu Feb 2 20:01:16 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000001c55188$6b841eb0$6505a8c0@rjlaptop> I just double-checked. Zope-2.7.6-final. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 12:49:16 2005 From: rj at maxxian.com (RJ Juneau) Date: Thu Feb 2 20:01:16 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000501c55189$fe149ba0$6505a8c0@rjlaptop> Charlie, The fix has only been applied for 2.7.7, 2.8b2. The info is in the original bug report which is closed and can be found here: http://www.zope.org/Collectors/Zope/1745 RJ -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Fri May 6 11:50:09 2005 From: rj at maxxian.com (RJ Juneau) Date: Thu Feb 2 20:01:16 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC Message-ID: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Still on eval for the product. I cannot get a stable connection to Sybase via the iODBC drivers. - The Sybase ODBC connection - including a query - have been verified at the iODBC level. - The setup is already working well for ODBC connection to MySQL. Symptoms include: - If I click on "Open Connection", it still comes back with "Connection Closed" when I go to a ZSQL method - Using 'Connect on Demand' is not working either. - Clicking "Open Connection" gives me the following error: Connection string: DSN=lixbox_sybase; UID=sa; PWD=XXXXXXX Connection pool entry: 0 Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection rejected by data source', 7952) The odbc.ini definition for DSN "lixbox_sybase" is as follows: [lixbox_sybase] JetFix = No NoRowSetSizeLimit = No Description = Test connection to listbox Options = LIXBOX DSQUERY = SQLSERVER TDSHOST = lixbox TDSPORT = 5000 TDSVER = 5.0 SQLSERVER_CATALOG = N CURSOR_SENSITIVITY = LOW UserName = sa Password = XXXXXXXX ServerType = Sybase 10/11/12 Driver = /opt/openlink/lib/sql_mt_lt.so Database = pubs2 ReadOnly = no NoAutoCommit = No NoLoginBox = No FetchBufferSize = 60 Other relevant data: - Connecting via OpenLink's iODBC - Zope 2.7.6-final - Python 2.3.4 - Connection to Sybase has been successfully tested with iODBC, including issuing a query - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC connection RJ Juneau Chief Technology Officer Maxxian Integration Inc. 155 Westhampton Drive Thornhill, Ontario Canada L4J 7X2 E-mail: rj@maxxian.com Phone: +1 905 482 9429 Cell: +1 416 897 6682 Toll free: +1 866 758 9161 Fax: +1 647 722 2038 -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050506/aef33361/attachment-0084.htm From mal at egenix.com Fri May 6 18:27:37 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Feb 2 20:01:16 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC In-Reply-To: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> References: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Message-ID: <427B8CE9.1010601@egenix.com> RJ Juneau wrote: > Still on eval for the product. > > I cannot get a stable connection to Sybase via the iODBC drivers. > > - The Sybase ODBC connection - including a query - have been verified at > the iODBC level. > - The setup is already working well for ODBC connection to MySQL. > > Symptoms include: > > - If I click on "Open Connection", it still comes back with "Connection > Closed" when I go to a ZSQL method > - Using 'Connect on Demand' is not working either. > - Clicking "Open Connection" gives me the following error: > > Connection string: DSN=lixbox_sybase; > UID=sa; > PWD=XXXXXXX Try writing the connection string on one line and without whitespace. ODBC drivers sometimes have problems with this. > Connection pool entry: 0 > Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection > rejected by data source', 7952) This is a generic error that relates to authentication or firewall problems. It is possible that turning on ODBC tracing the ODBC manager will give more clues as to the real cause of the problem. > The odbc.ini definition for DSN "lixbox_sybase" is as follows: > > [lixbox_sybase] > JetFix = No > NoRowSetSizeLimit = No > Description = Test connection to listbox > Options = LIXBOX > DSQUERY = SQLSERVER > TDSHOST = lixbox > TDSPORT = 5000 > TDSVER = 5.0 > SQLSERVER_CATALOG = N > CURSOR_SENSITIVITY = LOW > UserName = sa > Password = XXXXXXXX > ServerType = Sybase 10/11/12 > Driver = /opt/openlink/lib/sql_mt_lt.so > Database = pubs2 > ReadOnly = no > NoAutoCommit = No > NoLoginBox = No > FetchBufferSize = 60 > > > Other relevant data: > - Connecting via OpenLink's iODBC > - Zope 2.7.6-final > - Python 2.3.4 > - Connection to Sybase has been successfully tested with iODBC, > including issuing a query > - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC > connection > > > > RJ Juneau > Chief Technology Officer > Maxxian Integration Inc. > 155 Westhampton Drive > Thornhill, Ontario > Canada L4J 7X2 > E-mail: rj@maxxian.com > Phone: +1 905 482 9429 > Cell: +1 416 897 6682 > Toll free: +1 866 758 9161 > Fax: +1 647 722 2038 > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 06 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From calisp at gmail.com Sun May 15 23:49:03 2005 From: calisp at gmail.com (calisp@gmail.com) Date: Thu Feb 2 20:01:16 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK Message-ID: Hi, I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the following error... 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the last phase of a two-phase commit. This shouldn't happen. Traceback (most recent call last): File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one jar.tpc_finish(self) File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish try: self._finish() File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could not perform COMMIT or ROLLBACK', 1023) What could be causing this? Can I get the mxODBCZopeDA source from somewhere? It would make debugging this much easier. Thanks, Calisp. From mal at egenix.com Mon May 16 13:52:12 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Feb 2 20:01:16 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK In-Reply-To: References: Message-ID: <42887B5C.4010109@egenix.com> calisp@gmail.com wrote: > Hi, > > I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with > unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the > following error... > > 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the > last phase of a two-phase commit. This shouldn't happen. > Traceback (most recent call last): > File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one > jar.tpc_finish(self) > File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish > try: self._finish() > File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish > File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler > ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could > not perform COMMIT or ROLLBACK', 1023) You should have a look at the database logs to see what prevented the commit from being completed. > What could be causing this? Hard to say: mxODBCZopeDA is trying to commit the transaction, but the driver or database failed to complete the request. The above error was generated by the ODBC driver. This could be network or DNS problems, or be related to a bug in FreeTDS (which is getting more stable with every new release, but should still be considered beta quality software at the moment). > Can I get the mxODBCZopeDA source from > somewhere? It would make debugging this much easier. Getting the source is not an option and won't help much either since the source of the problem is not mxODBCZopeDA. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 16 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Sun May 1 21:29:25 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Feb 3 08:13:56 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <427259F3.4090806@egenix.com> References: <20050427130906.52878.qmail@web30008.mail.mud.yahoo.com> <427259F3.4090806@egenix.com> Message-ID: <42752005.7080904@egenix.com> M.-A. Lemburg wrote: > David Rushby wrote: > >> --- "M.-A. Lemburg" wrote: >> >>> Are you using the standard mxDateTime build or one >>> with WANT_SUBCLASSABLE_TYPES defined... >> >> >> >> Presumably "the standard", since I just built with 'py24d setup.py >> build', making no attempt to enable special directives. >> >> >>> ... (mxDateTime_Deallocate is only used by the latter)? >> >> >> >> That's true in 2.1.0-2005-04-15, but not in 2.1.0b5. >> >> >>> In any case, please try our latest snapshot: >>> >>> >> >> http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-04-15.zip >> >>> to see if that makes any difference. >> >> >> >> I can't build it out of the box: > > > Hmm, looks like distutils' sdist command doesn't like our new > repository layout which uses symlinks (after we've switched to > subversion). > > We'll have to debug distutils first, I guess :-( Ok, we've found the problem and fixed it. Here's the new release (which does build out of the box at least on our boxes ;-): http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 01 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From davidrushby at yahoo.com Mon May 2 15:49:53 2005 From: davidrushby at yahoo.com (David Rushby) Date: Fri Feb 3 08:13:57 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Ok, we've found the problem and fixed it. Here's the new > release (which does build out of the box at least on our > boxes ;-): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip It does build now, but: py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" still behaves as it did when I submitted my original message: Fatal Python error: UNREF invalid object Aborted This is the same debug build of Python 2.4.1 that I was previously using, running the same configuration (CentOS Linux 4.0/i386, everything compiled with GCC 3.4.3). Have you examined my original claim as to the cause of the bug? __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 10:21:55 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Feb 3 08:13:57 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> References: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> Message-ID: <42772693.8050306@egenix.com> David Rushby wrote: > --- "M.-A. Lemburg" wrote: > >>Ok, we've found the problem and fixed it. Here's the new >>release (which does build out of the box at least on our >>boxes ;-): >> >> > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip > > It does build now, but: > py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" > still behaves as it did when I submitted my original message: > Fatal Python error: UNREF invalid object > Aborted > > This is the same debug build of Python 2.4.1 that I was previously > using, running the same configuration (CentOS Linux 4.0/i386, > everything compiled with GCC 3.4.3). > > Have you examined my original claim as to the cause of the bug? No. We haven't had time for looking into it. I'm not sure whether your analysis of the problem is correct: if you don't define WANT_SUBCLASSABLE_TYPES, the API mxDateTime_Deallocate() is neither defined nor used. Furthermore, PyObject_Del() is only called by mxDateTime_Free() if you have explicitely edited mxDateTime.c to disabled the free list #defines. In a standard build, PyObject_Del() is only called at module finalization time. Note that the reason we call mxDateTime_Free() in the constructor is that we don't want the destructor of the object to be called. Py_DECREF() would call the destructor (mxDateTime_Deallocate). It is possible that the debug code in Python complains about the refcount in the object not being 0 at the time the object is finalized (module finalization time), but I don't see any such checks in PyObject_Free() (which is what PyObject_Del() maps to). Again, all of this does not happen in regular non-debug Python builds. Please be aware that we don't support debug builds, so fixing the problem (if there is one - gcc has some serious optimization problems on some combinations of platform and version) will take a while. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 09:27:37 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Fri Feb 3 08:13:57 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 Message-ID: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Hi all- I am trying to build the mx-base package, v.2.0.6. This will be used with postgresql 7.3.9, psycopg 1.1.18, and Roundup 0.8.2. RHEL 3.0 Python 2.3 egenix-mx-base-2.0.6.tar.gz I performed a: /usr/local/bin/python2.3 setup.py install Everything looks proper with the exeception of this series of warning statements: ----------------- gcc -pthread -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fno-strict-aliasing -fPIC -Imx/BeeBase/mxBeeBase -I/usr/local/incl ude/python2.3 -I/usr/local/include -c mx/BeeBase/mxBeeBase/btr.c -o build/temp.linux-i686-2.3/mx/BeeBase/mxBeeBase/mxBeeBa se/mx/BeeBase/mxBeeBase/btr.o mx/BeeBase/mxBeeBase/btr.c: In function `dumpBuf': mx/BeeBase/mxBeeBase/btr.c:249: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:250: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:255: warning: unsigned int format, long unsigned int arg (arg 4) mx/BeeBase/mxBeeBase/btr.c:256: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c: In function `_validateTree': mx/BeeBase/mxBeeBase/btr.c:330: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:337: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:339: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:349: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:351: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 3) creating build/lib.linux-i686-2.3/mx/BeeBase creating build/lib.linux-i686-2.3/mx/BeeBase/mxBeeBase -------------- Would someone be kind enough to let me know whether these messages were expected, and if not, how I might resolve these? Thanks! DC __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 22:06:33 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Feb 3 08:13:57 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> References: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Message-ID: <4277CBB9.8020302@egenix.com> Dianne Chen wrote: > Hi all- > > I am trying to build the mx-base package, v.2.0.6. > This will be used with postgresql 7.3.9, psycopg > 1.1.18, and Roundup 0.8.2. > > RHEL 3.0 > Python 2.3 > egenix-mx-base-2.0.6.tar.gz > > I performed a: > > /usr/local/bin/python2.3 setup.py install > > Everything looks proper with the exeception of this > series of warning statements: > > ----------------- > ... > -------------- > > Would someone be kind enough to let me know whether > these messages were expected, and if not, how I might > resolve these? These warning can safely be ignored. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 13:41:14 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Fri Feb 3 08:13:58 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: 6667 Message-ID: <20050503194114.72091.qmail@web31414.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Dianne Chen wrote: > > Hi all- > > > > I am trying to build the mx-base package, v.2.0.6. > > This will be used with postgresql 7.3.9, psycopg > > 1.1.18, and Roundup 0.8.2. > > > > RHEL 3.0 > > Python 2.3 > > egenix-mx-base-2.0.6.tar.gz > > > > I performed a: > > > > /usr/local/bin/python2.3 setup.py install > > > > Everything looks proper with the exeception of > this > > series of warning statements: > > > > ----------------- > > ... > > -------------- > > > > Would someone be kind enough to let me know > whether > > these messages were expected, and if not, how I > might > > resolve these? > > These warning can safely be ignored. > > -- > Marc-Andre Lemburg > eGenix.com > Marc- Thank you very much for the reply. It helps greatly. With kind regards, DC __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From davidrushby at yahoo.com Tue May 3 17:18:46 2005 From: davidrushby at yahoo.com (David Rushby) Date: Fri Feb 3 08:13:58 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050503231846.35012.qmail@web30009.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > I'm not sure whether your analysis of the problem is correct... Indeed, my original analysis wasn't correct; I think this one is. The fatal error I'm complaining about only arises if the arguments to DateTime.DateTime are invalid, so that the object is deallocated in the onError block of mxDateTime_FromDateAndTime. If the object is created successfully, and later deallocated by Python's garbage collector, the fatal error doesn't arise. Here's my analysis of the problem: --- If the debugging directive Py_TRACE_REFS is enabled, as it is in my case, the Python interpreter maintains a doubly linked list of all Python objects (named refchain) via the _ob_next and _ob_prev pointers added to PyObject via _PyObject_HEAD_EXTRA. Each object is inserted into refchain by the _Py_AddToAllObjects call in _Py_NewReference, and removed from refchain by the _Py_ForgetReference call in _Py_Dealloc. _Py_ForgetReference performs an integrity check on the object being deallocated (op) to make sure that its neighbors in refchain recognize it. Specifically, _Py_ForgetReference verifies that the _ob_next pointer of the previous object in refchain (op->_ob_prev->_ob_next) points to op, and that the _ob_prev pointer of the next object in refchain (op->_ob_next->_ob_prev) points to op. If either of those conditions is false, the interpreter raises the fatal error I'm seeing. After mxDateTime_New pulls an mxDateTimeObject out of the free list, it calls _Py_NewReference on that object to transform it from a "conceptually deallocated" object to a "conceptually allocated" one. _Py_NewReference inserts the object into refchain. Later, when the object is being "conceptually deallocated", it should be removed from refchain with _Py_ForgetReference. The version of _Py_Dealloc that's active when Py_TRACE_REFS is enabled does this (_Py_Dealloc is the element of Py_DECREF that performs the actual destruction). _Py_Dealloc first calls _Py_ForgetReference to remove the object from refchain, then calls the object's destructor (op->ob_type->tp_dealloc). If WANT_SUBCLASSABLE_TYPES is not defined (it is not in my case), the destructor for mxDateTime_Type is mxDateTime_Free. So, if a DateTime object is deallocated normally, as a result of its reference count falling to zero, _Py_Dealloc is called on the object, which first removes it from refchain, then passes it to mxDateTime_Free. If a DateTime object is destroyed prematurely, as a result of invalid arguments to its destructor, the onError handler calls mxDateTime_Free, so the object is "conceptually deallocated" (placed in the free list), *but* the object is not removed from refchain. So if a refchain-membership-integrity-check is performed on the object in question or one of its immediate neighbors in refchain, that integrity check fails, leading to the fatal error. --- The solution is to 'Py_DECREF(...)' the object in the onError handler of its constructor, instead of passing the object directly to mxDateTime_Free. That change solves two problems: 1) It causes _Py_Dealloc to execute, which in turn executes _Py_ForgetReference, so the object is removed from refchain, as it should be. 2) At present, objects that are created successfully and later deallocated by normal reference count mechanics have a reference count of 0 when they enter the free list, whereas objects whose constructors abort their creation due to invalid arguments have a reference count of 1 when they enter the free list. Although AFAIK this doesn't cause an actual execution problem (because the object's reference count is *explicitly set to 1* rather than *incremented by 1* when the object is later "conceptually allocated" by _Py_NewReference), it is likely to confuse future maintainers and thereby lead to the introduction of an actual execution problem. I assume that if you agree that this is a reasonable solution, you'll want to apply the change not only to mxDateTime_FromDateAndTime, but to all similar constructors in mxDateTime.c. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From rj at maxxian.com Thu May 5 01:57:40 2005 From: rj at maxxian.com (RJ Juneau) Date: Fri Feb 3 08:13:59 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c5512e$f72798c0$6505a8c0@rjlaptop> I'm on the 30 day evaluation for mxodbc_zope_da. I'm getting the following error when I submit some queries: Error Type: KeyError Error Value: 'query' I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 with UCS4. The error seems to be caused by multiple rows being returned. I did see an earlier posting with the same error message. The response suggested a template error, but this is clearly not the case here. The additional evidence I've gathered so far: - I'm running the test directly from the ZSQL method, so there's no template involved. - If I use the same query with an additional "where" clause to ensure that only one row is returned, it works - If I use a value in the 'where' clause with no rows returned, it works - The same ZSQL query is being used on a Windows machine running Zope and the free ZODBC module without a problem - The query has been verified directly in mysql-client-browser Other info: - The database is MySQL 4.1.10A-0 - iODBC is the DB driver RJ Juneau -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050505/68d278bf/attachment-0085.htm From mal at egenix.com Thu May 5 12:37:43 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Feb 3 08:13:59 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c5512e$f72798c0$6505a8c0@rjlaptop> References: <000301c5512e$f72798c0$6505a8c0@rjlaptop> Message-ID: <4279E967.6010904@egenix.com> RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 > with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 09:37:42 2005 From: rj at maxxian.com (RJ Juneau) Date: Fri Feb 3 08:13:59 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000101c5516f$3b96de90$6505a8c0@rjlaptop> More interesting info on the problem: If I execute the query directly in the "test" window of the base eGenix mxODBC Database Connection window, it works fine and returns the 20 lines expected. That could point to a problem in the rendering, which seems to be where the traceback ends. Note that within the same Zope system I also have an ODBC connection to a Sybase database, and I have successfully tested multi-line ZSQL queries there. This is the traceback: Time 2005/05/05 07:55:15.294 GMT-4 Exception Type KeyError Exception Value 'query' Traceback (innermost last): Module ZPublisher.Publish, line 101, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 39, in call_object Module Shared.DC.ZRDB.DA, line 337, in manage_test Module DocumentTemplate.DT_String, line 474, in __call__ Module DocumentTemplate.DT_In, line 602, in renderwb Module DocumentTemplate.DT_Var, line 219, in render KeyError: 'query' I don't think the following is an issue, but I'll include it for completeness.I am also getting the following iODBC warnings and errors in the Zope console log, which are related to the ODBC parameters being passed by iODBC. Note that these errors also appear for all of the successful queries. [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (Setup). [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (UsageCount). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Timeout). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Reuse). As for the ZSQL snippet from the template... Since there's no template involved yet (I'm still testing directly from the ZSQL method), I assume you mean the SQL code? select h.host_name, s.system_name, s.system_handle, count(*) from terminal t, system_map s, host h where t.system_index = s.system_index and s.host_index = h.host_index group by s.system_name order by h.host_name Nothing complicated here. There are no parameters passed to the query. RJ -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: May 5, 2005 5:38 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: Re: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is > 2.3.4 with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ---------------------------------------------------------------------- > -- > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 16:00:32 2005 From: charlie at egenix.com (Charlie Clark) Date: Fri Feb 3 08:13:59 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000101c5516f$3b96de90$6505a8c0@rjlaptop> References: <000101c5516f$3b96de90$6505a8c0@rjlaptop> Message-ID: <20050505150032.644.1@bepc.1115296715.fake> On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base eGenix > mxODBC Database Connection window, it works fine and returns the 20 > lines expected. That could point to a problem in the rendering, which > seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection to > a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 10:22:17 2005 From: rj at maxxian.com (RJ Juneau) Date: Fri Feb 3 08:13:59 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505150032.644.1@bepc.1115296715.fake> Message-ID: <000201c55175$75bcad10$6505a8c0@rjlaptop> At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 11:47:14 2005 From: rj at maxxian.com (RJ Juneau) Date: Fri Feb 3 08:13:59 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c55181$549be0e0$6505a8c0@rjlaptop> Charlie, I found a fix. Here it is in case anyone else runs into this. You were correct - the problem is in another part of Zope. Based on your feedback, I did a bit more searching and found something here: http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. html The problem appears to be in Zope versions after 2.7.0. I'm running 2.7.6, and the post indicates that it also happens in 2.7.4. The solution: Edit file /lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. There are two lines in the file that start with . Edit them as follows: Change first line to: Change second line to: Just to be after, I shut down Zope before I made the changes and restarted it after. Thanks for the help! RJ -----Original Message----- From: RJ Juneau [mailto:rj@maxxian.com] Sent: May 5, 2005 9:22 AM To: 'Charlie Clark' Cc: 'egenix-users@lists.egenix.com' Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 17:57:25 2005 From: charlie at egenix.com (Charlie Clark) Date: Fri Feb 3 08:13:59 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <20050505165725.3380.2@bepc.1115296715.fake> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Thu May 5 09:15:21 2005 From: charlie at egenix.com (Charlie Clark) Date: Fri Feb 3 08:13:59 2006 Subject: [Zope-DB] RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <000001c55185$41477730$6b00a8c0@fonacier.local> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________ Zope-DB mailing list Zope-DB@zope.org http://mail.zope.org/mailman/listinfo/zope-db From rj at maxxian.com Thu May 5 12:38:00 2005 From: rj at maxxian.com (RJ Juneau) Date: Fri Feb 3 08:13:59 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000001c55188$6b841eb0$6505a8c0@rjlaptop> I just double-checked. Zope-2.7.6-final. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 12:49:16 2005 From: rj at maxxian.com (RJ Juneau) Date: Fri Feb 3 08:14:00 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000501c55189$fe149ba0$6505a8c0@rjlaptop> Charlie, The fix has only been applied for 2.7.7, 2.8b2. The info is in the original bug report which is closed and can be found here: http://www.zope.org/Collectors/Zope/1745 RJ -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Fri May 6 11:50:09 2005 From: rj at maxxian.com (RJ Juneau) Date: Fri Feb 3 08:14:00 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC Message-ID: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Still on eval for the product. I cannot get a stable connection to Sybase via the iODBC drivers. - The Sybase ODBC connection - including a query - have been verified at the iODBC level. - The setup is already working well for ODBC connection to MySQL. Symptoms include: - If I click on "Open Connection", it still comes back with "Connection Closed" when I go to a ZSQL method - Using 'Connect on Demand' is not working either. - Clicking "Open Connection" gives me the following error: Connection string: DSN=lixbox_sybase; UID=sa; PWD=XXXXXXX Connection pool entry: 0 Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection rejected by data source', 7952) The odbc.ini definition for DSN "lixbox_sybase" is as follows: [lixbox_sybase] JetFix = No NoRowSetSizeLimit = No Description = Test connection to listbox Options = LIXBOX DSQUERY = SQLSERVER TDSHOST = lixbox TDSPORT = 5000 TDSVER = 5.0 SQLSERVER_CATALOG = N CURSOR_SENSITIVITY = LOW UserName = sa Password = XXXXXXXX ServerType = Sybase 10/11/12 Driver = /opt/openlink/lib/sql_mt_lt.so Database = pubs2 ReadOnly = no NoAutoCommit = No NoLoginBox = No FetchBufferSize = 60 Other relevant data: - Connecting via OpenLink's iODBC - Zope 2.7.6-final - Python 2.3.4 - Connection to Sybase has been successfully tested with iODBC, including issuing a query - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC connection RJ Juneau Chief Technology Officer Maxxian Integration Inc. 155 Westhampton Drive Thornhill, Ontario Canada L4J 7X2 E-mail: rj@maxxian.com Phone: +1 905 482 9429 Cell: +1 416 897 6682 Toll free: +1 866 758 9161 Fax: +1 647 722 2038 -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050506/aef33361/attachment-0085.htm From mal at egenix.com Fri May 6 18:27:37 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Feb 3 08:14:00 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC In-Reply-To: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> References: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Message-ID: <427B8CE9.1010601@egenix.com> RJ Juneau wrote: > Still on eval for the product. > > I cannot get a stable connection to Sybase via the iODBC drivers. > > - The Sybase ODBC connection - including a query - have been verified at > the iODBC level. > - The setup is already working well for ODBC connection to MySQL. > > Symptoms include: > > - If I click on "Open Connection", it still comes back with "Connection > Closed" when I go to a ZSQL method > - Using 'Connect on Demand' is not working either. > - Clicking "Open Connection" gives me the following error: > > Connection string: DSN=lixbox_sybase; > UID=sa; > PWD=XXXXXXX Try writing the connection string on one line and without whitespace. ODBC drivers sometimes have problems with this. > Connection pool entry: 0 > Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection > rejected by data source', 7952) This is a generic error that relates to authentication or firewall problems. It is possible that turning on ODBC tracing the ODBC manager will give more clues as to the real cause of the problem. > The odbc.ini definition for DSN "lixbox_sybase" is as follows: > > [lixbox_sybase] > JetFix = No > NoRowSetSizeLimit = No > Description = Test connection to listbox > Options = LIXBOX > DSQUERY = SQLSERVER > TDSHOST = lixbox > TDSPORT = 5000 > TDSVER = 5.0 > SQLSERVER_CATALOG = N > CURSOR_SENSITIVITY = LOW > UserName = sa > Password = XXXXXXXX > ServerType = Sybase 10/11/12 > Driver = /opt/openlink/lib/sql_mt_lt.so > Database = pubs2 > ReadOnly = no > NoAutoCommit = No > NoLoginBox = No > FetchBufferSize = 60 > > > Other relevant data: > - Connecting via OpenLink's iODBC > - Zope 2.7.6-final > - Python 2.3.4 > - Connection to Sybase has been successfully tested with iODBC, > including issuing a query > - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC > connection > > > > RJ Juneau > Chief Technology Officer > Maxxian Integration Inc. > 155 Westhampton Drive > Thornhill, Ontario > Canada L4J 7X2 > E-mail: rj@maxxian.com > Phone: +1 905 482 9429 > Cell: +1 416 897 6682 > Toll free: +1 866 758 9161 > Fax: +1 647 722 2038 > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 06 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From calisp at gmail.com Sun May 15 23:49:03 2005 From: calisp at gmail.com (calisp@gmail.com) Date: Fri Feb 3 08:14:00 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK Message-ID: Hi, I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the following error... 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the last phase of a two-phase commit. This shouldn't happen. Traceback (most recent call last): File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one jar.tpc_finish(self) File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish try: self._finish() File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could not perform COMMIT or ROLLBACK', 1023) What could be causing this? Can I get the mxODBCZopeDA source from somewhere? It would make debugging this much easier. Thanks, Calisp. From mal at egenix.com Mon May 16 13:52:12 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Feb 3 08:14:00 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK In-Reply-To: References: Message-ID: <42887B5C.4010109@egenix.com> calisp@gmail.com wrote: > Hi, > > I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with > unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the > following error... > > 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the > last phase of a two-phase commit. This shouldn't happen. > Traceback (most recent call last): > File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one > jar.tpc_finish(self) > File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish > try: self._finish() > File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish > File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler > ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could > not perform COMMIT or ROLLBACK', 1023) You should have a look at the database logs to see what prevented the commit from being completed. > What could be causing this? Hard to say: mxODBCZopeDA is trying to commit the transaction, but the driver or database failed to complete the request. The above error was generated by the ODBC driver. This could be network or DNS problems, or be related to a bug in FreeTDS (which is getting more stable with every new release, but should still be considered beta quality software at the moment). > Can I get the mxODBCZopeDA source from > somewhere? It would make debugging this much easier. Getting the source is not an option and won't help much either since the source of the problem is not mxODBCZopeDA. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 16 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Sun May 1 21:29:25 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Feb 3 12:03:09 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <427259F3.4090806@egenix.com> References: <20050427130906.52878.qmail@web30008.mail.mud.yahoo.com> <427259F3.4090806@egenix.com> Message-ID: <42752005.7080904@egenix.com> M.-A. Lemburg wrote: > David Rushby wrote: > >> --- "M.-A. Lemburg" wrote: >> >>> Are you using the standard mxDateTime build or one >>> with WANT_SUBCLASSABLE_TYPES defined... >> >> >> >> Presumably "the standard", since I just built with 'py24d setup.py >> build', making no attempt to enable special directives. >> >> >>> ... (mxDateTime_Deallocate is only used by the latter)? >> >> >> >> That's true in 2.1.0-2005-04-15, but not in 2.1.0b5. >> >> >>> In any case, please try our latest snapshot: >>> >>> >> >> http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-04-15.zip >> >>> to see if that makes any difference. >> >> >> >> I can't build it out of the box: > > > Hmm, looks like distutils' sdist command doesn't like our new > repository layout which uses symlinks (after we've switched to > subversion). > > We'll have to debug distutils first, I guess :-( Ok, we've found the problem and fixed it. Here's the new release (which does build out of the box at least on our boxes ;-): http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 01 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From davidrushby at yahoo.com Mon May 2 15:49:53 2005 From: davidrushby at yahoo.com (David Rushby) Date: Fri Feb 3 12:03:09 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Ok, we've found the problem and fixed it. Here's the new > release (which does build out of the box at least on our > boxes ;-): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip It does build now, but: py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" still behaves as it did when I submitted my original message: Fatal Python error: UNREF invalid object Aborted This is the same debug build of Python 2.4.1 that I was previously using, running the same configuration (CentOS Linux 4.0/i386, everything compiled with GCC 3.4.3). Have you examined my original claim as to the cause of the bug? __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 10:21:55 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Feb 3 12:03:09 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> References: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> Message-ID: <42772693.8050306@egenix.com> David Rushby wrote: > --- "M.-A. Lemburg" wrote: > >>Ok, we've found the problem and fixed it. Here's the new >>release (which does build out of the box at least on our >>boxes ;-): >> >> > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip > > It does build now, but: > py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" > still behaves as it did when I submitted my original message: > Fatal Python error: UNREF invalid object > Aborted > > This is the same debug build of Python 2.4.1 that I was previously > using, running the same configuration (CentOS Linux 4.0/i386, > everything compiled with GCC 3.4.3). > > Have you examined my original claim as to the cause of the bug? No. We haven't had time for looking into it. I'm not sure whether your analysis of the problem is correct: if you don't define WANT_SUBCLASSABLE_TYPES, the API mxDateTime_Deallocate() is neither defined nor used. Furthermore, PyObject_Del() is only called by mxDateTime_Free() if you have explicitely edited mxDateTime.c to disabled the free list #defines. In a standard build, PyObject_Del() is only called at module finalization time. Note that the reason we call mxDateTime_Free() in the constructor is that we don't want the destructor of the object to be called. Py_DECREF() would call the destructor (mxDateTime_Deallocate). It is possible that the debug code in Python complains about the refcount in the object not being 0 at the time the object is finalized (module finalization time), but I don't see any such checks in PyObject_Free() (which is what PyObject_Del() maps to). Again, all of this does not happen in regular non-debug Python builds. Please be aware that we don't support debug builds, so fixing the problem (if there is one - gcc has some serious optimization problems on some combinations of platform and version) will take a while. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 09:27:37 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Fri Feb 3 12:03:09 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 Message-ID: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Hi all- I am trying to build the mx-base package, v.2.0.6. This will be used with postgresql 7.3.9, psycopg 1.1.18, and Roundup 0.8.2. RHEL 3.0 Python 2.3 egenix-mx-base-2.0.6.tar.gz I performed a: /usr/local/bin/python2.3 setup.py install Everything looks proper with the exeception of this series of warning statements: ----------------- gcc -pthread -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fno-strict-aliasing -fPIC -Imx/BeeBase/mxBeeBase -I/usr/local/incl ude/python2.3 -I/usr/local/include -c mx/BeeBase/mxBeeBase/btr.c -o build/temp.linux-i686-2.3/mx/BeeBase/mxBeeBase/mxBeeBa se/mx/BeeBase/mxBeeBase/btr.o mx/BeeBase/mxBeeBase/btr.c: In function `dumpBuf': mx/BeeBase/mxBeeBase/btr.c:249: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:250: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:255: warning: unsigned int format, long unsigned int arg (arg 4) mx/BeeBase/mxBeeBase/btr.c:256: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c: In function `_validateTree': mx/BeeBase/mxBeeBase/btr.c:330: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:337: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:339: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:349: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:351: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 3) creating build/lib.linux-i686-2.3/mx/BeeBase creating build/lib.linux-i686-2.3/mx/BeeBase/mxBeeBase -------------- Would someone be kind enough to let me know whether these messages were expected, and if not, how I might resolve these? Thanks! DC __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 22:06:33 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Feb 3 12:03:09 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> References: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Message-ID: <4277CBB9.8020302@egenix.com> Dianne Chen wrote: > Hi all- > > I am trying to build the mx-base package, v.2.0.6. > This will be used with postgresql 7.3.9, psycopg > 1.1.18, and Roundup 0.8.2. > > RHEL 3.0 > Python 2.3 > egenix-mx-base-2.0.6.tar.gz > > I performed a: > > /usr/local/bin/python2.3 setup.py install > > Everything looks proper with the exeception of this > series of warning statements: > > ----------------- > ... > -------------- > > Would someone be kind enough to let me know whether > these messages were expected, and if not, how I might > resolve these? These warning can safely be ignored. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 13:41:14 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Fri Feb 3 12:03:09 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: 6667 Message-ID: <20050503194114.72091.qmail@web31414.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Dianne Chen wrote: > > Hi all- > > > > I am trying to build the mx-base package, v.2.0.6. > > This will be used with postgresql 7.3.9, psycopg > > 1.1.18, and Roundup 0.8.2. > > > > RHEL 3.0 > > Python 2.3 > > egenix-mx-base-2.0.6.tar.gz > > > > I performed a: > > > > /usr/local/bin/python2.3 setup.py install > > > > Everything looks proper with the exeception of > this > > series of warning statements: > > > > ----------------- > > ... > > -------------- > > > > Would someone be kind enough to let me know > whether > > these messages were expected, and if not, how I > might > > resolve these? > > These warning can safely be ignored. > > -- > Marc-Andre Lemburg > eGenix.com > Marc- Thank you very much for the reply. It helps greatly. With kind regards, DC __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From davidrushby at yahoo.com Tue May 3 17:18:46 2005 From: davidrushby at yahoo.com (David Rushby) Date: Fri Feb 3 12:03:09 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050503231846.35012.qmail@web30009.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > I'm not sure whether your analysis of the problem is correct... Indeed, my original analysis wasn't correct; I think this one is. The fatal error I'm complaining about only arises if the arguments to DateTime.DateTime are invalid, so that the object is deallocated in the onError block of mxDateTime_FromDateAndTime. If the object is created successfully, and later deallocated by Python's garbage collector, the fatal error doesn't arise. Here's my analysis of the problem: --- If the debugging directive Py_TRACE_REFS is enabled, as it is in my case, the Python interpreter maintains a doubly linked list of all Python objects (named refchain) via the _ob_next and _ob_prev pointers added to PyObject via _PyObject_HEAD_EXTRA. Each object is inserted into refchain by the _Py_AddToAllObjects call in _Py_NewReference, and removed from refchain by the _Py_ForgetReference call in _Py_Dealloc. _Py_ForgetReference performs an integrity check on the object being deallocated (op) to make sure that its neighbors in refchain recognize it. Specifically, _Py_ForgetReference verifies that the _ob_next pointer of the previous object in refchain (op->_ob_prev->_ob_next) points to op, and that the _ob_prev pointer of the next object in refchain (op->_ob_next->_ob_prev) points to op. If either of those conditions is false, the interpreter raises the fatal error I'm seeing. After mxDateTime_New pulls an mxDateTimeObject out of the free list, it calls _Py_NewReference on that object to transform it from a "conceptually deallocated" object to a "conceptually allocated" one. _Py_NewReference inserts the object into refchain. Later, when the object is being "conceptually deallocated", it should be removed from refchain with _Py_ForgetReference. The version of _Py_Dealloc that's active when Py_TRACE_REFS is enabled does this (_Py_Dealloc is the element of Py_DECREF that performs the actual destruction). _Py_Dealloc first calls _Py_ForgetReference to remove the object from refchain, then calls the object's destructor (op->ob_type->tp_dealloc). If WANT_SUBCLASSABLE_TYPES is not defined (it is not in my case), the destructor for mxDateTime_Type is mxDateTime_Free. So, if a DateTime object is deallocated normally, as a result of its reference count falling to zero, _Py_Dealloc is called on the object, which first removes it from refchain, then passes it to mxDateTime_Free. If a DateTime object is destroyed prematurely, as a result of invalid arguments to its destructor, the onError handler calls mxDateTime_Free, so the object is "conceptually deallocated" (placed in the free list), *but* the object is not removed from refchain. So if a refchain-membership-integrity-check is performed on the object in question or one of its immediate neighbors in refchain, that integrity check fails, leading to the fatal error. --- The solution is to 'Py_DECREF(...)' the object in the onError handler of its constructor, instead of passing the object directly to mxDateTime_Free. That change solves two problems: 1) It causes _Py_Dealloc to execute, which in turn executes _Py_ForgetReference, so the object is removed from refchain, as it should be. 2) At present, objects that are created successfully and later deallocated by normal reference count mechanics have a reference count of 0 when they enter the free list, whereas objects whose constructors abort their creation due to invalid arguments have a reference count of 1 when they enter the free list. Although AFAIK this doesn't cause an actual execution problem (because the object's reference count is *explicitly set to 1* rather than *incremented by 1* when the object is later "conceptually allocated" by _Py_NewReference), it is likely to confuse future maintainers and thereby lead to the introduction of an actual execution problem. I assume that if you agree that this is a reasonable solution, you'll want to apply the change not only to mxDateTime_FromDateAndTime, but to all similar constructors in mxDateTime.c. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From rj at maxxian.com Thu May 5 01:57:40 2005 From: rj at maxxian.com (RJ Juneau) Date: Fri Feb 3 12:03:09 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c5512e$f72798c0$6505a8c0@rjlaptop> I'm on the 30 day evaluation for mxodbc_zope_da. I'm getting the following error when I submit some queries: Error Type: KeyError Error Value: 'query' I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 with UCS4. The error seems to be caused by multiple rows being returned. I did see an earlier posting with the same error message. The response suggested a template error, but this is clearly not the case here. The additional evidence I've gathered so far: - I'm running the test directly from the ZSQL method, so there's no template involved. - If I use the same query with an additional "where" clause to ensure that only one row is returned, it works - If I use a value in the 'where' clause with no rows returned, it works - The same ZSQL query is being used on a Windows machine running Zope and the free ZODBC module without a problem - The query has been verified directly in mysql-client-browser Other info: - The database is MySQL 4.1.10A-0 - iODBC is the DB driver RJ Juneau -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050505/68d278bf/attachment-0086.htm From mal at egenix.com Thu May 5 12:37:43 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Feb 3 12:03:09 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c5512e$f72798c0$6505a8c0@rjlaptop> References: <000301c5512e$f72798c0$6505a8c0@rjlaptop> Message-ID: <4279E967.6010904@egenix.com> RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 > with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 09:37:42 2005 From: rj at maxxian.com (RJ Juneau) Date: Fri Feb 3 12:03:09 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000101c5516f$3b96de90$6505a8c0@rjlaptop> More interesting info on the problem: If I execute the query directly in the "test" window of the base eGenix mxODBC Database Connection window, it works fine and returns the 20 lines expected. That could point to a problem in the rendering, which seems to be where the traceback ends. Note that within the same Zope system I also have an ODBC connection to a Sybase database, and I have successfully tested multi-line ZSQL queries there. This is the traceback: Time 2005/05/05 07:55:15.294 GMT-4 Exception Type KeyError Exception Value 'query' Traceback (innermost last): Module ZPublisher.Publish, line 101, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 39, in call_object Module Shared.DC.ZRDB.DA, line 337, in manage_test Module DocumentTemplate.DT_String, line 474, in __call__ Module DocumentTemplate.DT_In, line 602, in renderwb Module DocumentTemplate.DT_Var, line 219, in render KeyError: 'query' I don't think the following is an issue, but I'll include it for completeness.I am also getting the following iODBC warnings and errors in the Zope console log, which are related to the ODBC parameters being passed by iODBC. Note that these errors also appear for all of the successful queries. [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (Setup). [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (UsageCount). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Timeout). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Reuse). As for the ZSQL snippet from the template... Since there's no template involved yet (I'm still testing directly from the ZSQL method), I assume you mean the SQL code? select h.host_name, s.system_name, s.system_handle, count(*) from terminal t, system_map s, host h where t.system_index = s.system_index and s.host_index = h.host_index group by s.system_name order by h.host_name Nothing complicated here. There are no parameters passed to the query. RJ -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: May 5, 2005 5:38 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: Re: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is > 2.3.4 with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ---------------------------------------------------------------------- > -- > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 16:00:32 2005 From: charlie at egenix.com (Charlie Clark) Date: Fri Feb 3 12:03:09 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000101c5516f$3b96de90$6505a8c0@rjlaptop> References: <000101c5516f$3b96de90$6505a8c0@rjlaptop> Message-ID: <20050505150032.644.1@bepc.1115296715.fake> On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base eGenix > mxODBC Database Connection window, it works fine and returns the 20 > lines expected. That could point to a problem in the rendering, which > seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection to > a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 10:22:17 2005 From: rj at maxxian.com (RJ Juneau) Date: Fri Feb 3 12:03:09 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505150032.644.1@bepc.1115296715.fake> Message-ID: <000201c55175$75bcad10$6505a8c0@rjlaptop> At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 11:47:14 2005 From: rj at maxxian.com (RJ Juneau) Date: Fri Feb 3 12:03:09 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c55181$549be0e0$6505a8c0@rjlaptop> Charlie, I found a fix. Here it is in case anyone else runs into this. You were correct - the problem is in another part of Zope. Based on your feedback, I did a bit more searching and found something here: http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. html The problem appears to be in Zope versions after 2.7.0. I'm running 2.7.6, and the post indicates that it also happens in 2.7.4. The solution: Edit file /lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. There are two lines in the file that start with . Edit them as follows: Change first line to: Change second line to: Just to be after, I shut down Zope before I made the changes and restarted it after. Thanks for the help! RJ -----Original Message----- From: RJ Juneau [mailto:rj@maxxian.com] Sent: May 5, 2005 9:22 AM To: 'Charlie Clark' Cc: 'egenix-users@lists.egenix.com' Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 17:57:25 2005 From: charlie at egenix.com (Charlie Clark) Date: Fri Feb 3 12:03:10 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <20050505165725.3380.2@bepc.1115296715.fake> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Thu May 5 09:15:21 2005 From: charlie at egenix.com (Charlie Clark) Date: Fri Feb 3 12:03:10 2006 Subject: [Zope-DB] RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <000001c55185$41477730$6b00a8c0@fonacier.local> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________ Zope-DB mailing list Zope-DB@zope.org http://mail.zope.org/mailman/listinfo/zope-db From rj at maxxian.com Thu May 5 12:38:00 2005 From: rj at maxxian.com (RJ Juneau) Date: Fri Feb 3 12:03:10 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000001c55188$6b841eb0$6505a8c0@rjlaptop> I just double-checked. Zope-2.7.6-final. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 12:49:16 2005 From: rj at maxxian.com (RJ Juneau) Date: Fri Feb 3 12:03:10 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000501c55189$fe149ba0$6505a8c0@rjlaptop> Charlie, The fix has only been applied for 2.7.7, 2.8b2. The info is in the original bug report which is closed and can be found here: http://www.zope.org/Collectors/Zope/1745 RJ -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Fri May 6 11:50:09 2005 From: rj at maxxian.com (RJ Juneau) Date: Fri Feb 3 12:03:10 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC Message-ID: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Still on eval for the product. I cannot get a stable connection to Sybase via the iODBC drivers. - The Sybase ODBC connection - including a query - have been verified at the iODBC level. - The setup is already working well for ODBC connection to MySQL. Symptoms include: - If I click on "Open Connection", it still comes back with "Connection Closed" when I go to a ZSQL method - Using 'Connect on Demand' is not working either. - Clicking "Open Connection" gives me the following error: Connection string: DSN=lixbox_sybase; UID=sa; PWD=XXXXXXX Connection pool entry: 0 Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection rejected by data source', 7952) The odbc.ini definition for DSN "lixbox_sybase" is as follows: [lixbox_sybase] JetFix = No NoRowSetSizeLimit = No Description = Test connection to listbox Options = LIXBOX DSQUERY = SQLSERVER TDSHOST = lixbox TDSPORT = 5000 TDSVER = 5.0 SQLSERVER_CATALOG = N CURSOR_SENSITIVITY = LOW UserName = sa Password = XXXXXXXX ServerType = Sybase 10/11/12 Driver = /opt/openlink/lib/sql_mt_lt.so Database = pubs2 ReadOnly = no NoAutoCommit = No NoLoginBox = No FetchBufferSize = 60 Other relevant data: - Connecting via OpenLink's iODBC - Zope 2.7.6-final - Python 2.3.4 - Connection to Sybase has been successfully tested with iODBC, including issuing a query - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC connection RJ Juneau Chief Technology Officer Maxxian Integration Inc. 155 Westhampton Drive Thornhill, Ontario Canada L4J 7X2 E-mail: rj@maxxian.com Phone: +1 905 482 9429 Cell: +1 416 897 6682 Toll free: +1 866 758 9161 Fax: +1 647 722 2038 -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050506/aef33361/attachment-0086.htm From mal at egenix.com Fri May 6 18:27:37 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Feb 3 12:03:10 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC In-Reply-To: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> References: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Message-ID: <427B8CE9.1010601@egenix.com> RJ Juneau wrote: > Still on eval for the product. > > I cannot get a stable connection to Sybase via the iODBC drivers. > > - The Sybase ODBC connection - including a query - have been verified at > the iODBC level. > - The setup is already working well for ODBC connection to MySQL. > > Symptoms include: > > - If I click on "Open Connection", it still comes back with "Connection > Closed" when I go to a ZSQL method > - Using 'Connect on Demand' is not working either. > - Clicking "Open Connection" gives me the following error: > > Connection string: DSN=lixbox_sybase; > UID=sa; > PWD=XXXXXXX Try writing the connection string on one line and without whitespace. ODBC drivers sometimes have problems with this. > Connection pool entry: 0 > Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection > rejected by data source', 7952) This is a generic error that relates to authentication or firewall problems. It is possible that turning on ODBC tracing the ODBC manager will give more clues as to the real cause of the problem. > The odbc.ini definition for DSN "lixbox_sybase" is as follows: > > [lixbox_sybase] > JetFix = No > NoRowSetSizeLimit = No > Description = Test connection to listbox > Options = LIXBOX > DSQUERY = SQLSERVER > TDSHOST = lixbox > TDSPORT = 5000 > TDSVER = 5.0 > SQLSERVER_CATALOG = N > CURSOR_SENSITIVITY = LOW > UserName = sa > Password = XXXXXXXX > ServerType = Sybase 10/11/12 > Driver = /opt/openlink/lib/sql_mt_lt.so > Database = pubs2 > ReadOnly = no > NoAutoCommit = No > NoLoginBox = No > FetchBufferSize = 60 > > > Other relevant data: > - Connecting via OpenLink's iODBC > - Zope 2.7.6-final > - Python 2.3.4 > - Connection to Sybase has been successfully tested with iODBC, > including issuing a query > - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC > connection > > > > RJ Juneau > Chief Technology Officer > Maxxian Integration Inc. > 155 Westhampton Drive > Thornhill, Ontario > Canada L4J 7X2 > E-mail: rj@maxxian.com > Phone: +1 905 482 9429 > Cell: +1 416 897 6682 > Toll free: +1 866 758 9161 > Fax: +1 647 722 2038 > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 06 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From calisp at gmail.com Sun May 15 23:49:03 2005 From: calisp at gmail.com (calisp@gmail.com) Date: Fri Feb 3 12:03:10 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK Message-ID: Hi, I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the following error... 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the last phase of a two-phase commit. This shouldn't happen. Traceback (most recent call last): File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one jar.tpc_finish(self) File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish try: self._finish() File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could not perform COMMIT or ROLLBACK', 1023) What could be causing this? Can I get the mxODBCZopeDA source from somewhere? It would make debugging this much easier. Thanks, Calisp. From mal at egenix.com Mon May 16 13:52:12 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Feb 3 12:03:10 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK In-Reply-To: References: Message-ID: <42887B5C.4010109@egenix.com> calisp@gmail.com wrote: > Hi, > > I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with > unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the > following error... > > 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the > last phase of a two-phase commit. This shouldn't happen. > Traceback (most recent call last): > File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one > jar.tpc_finish(self) > File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish > try: self._finish() > File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish > File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler > ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could > not perform COMMIT or ROLLBACK', 1023) You should have a look at the database logs to see what prevented the commit from being completed. > What could be causing this? Hard to say: mxODBCZopeDA is trying to commit the transaction, but the driver or database failed to complete the request. The above error was generated by the ODBC driver. This could be network or DNS problems, or be related to a bug in FreeTDS (which is getting more stable with every new release, but should still be considered beta quality software at the moment). > Can I get the mxODBCZopeDA source from > somewhere? It would make debugging this much easier. Getting the source is not an option and won't help much either since the source of the problem is not mxODBCZopeDA. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 16 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Sun May 1 21:29:25 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Feb 3 16:01:17 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <427259F3.4090806@egenix.com> References: <20050427130906.52878.qmail@web30008.mail.mud.yahoo.com> <427259F3.4090806@egenix.com> Message-ID: <42752005.7080904@egenix.com> M.-A. Lemburg wrote: > David Rushby wrote: > >> --- "M.-A. Lemburg" wrote: >> >>> Are you using the standard mxDateTime build or one >>> with WANT_SUBCLASSABLE_TYPES defined... >> >> >> >> Presumably "the standard", since I just built with 'py24d setup.py >> build', making no attempt to enable special directives. >> >> >>> ... (mxDateTime_Deallocate is only used by the latter)? >> >> >> >> That's true in 2.1.0-2005-04-15, but not in 2.1.0b5. >> >> >>> In any case, please try our latest snapshot: >>> >>> >> >> http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-04-15.zip >> >>> to see if that makes any difference. >> >> >> >> I can't build it out of the box: > > > Hmm, looks like distutils' sdist command doesn't like our new > repository layout which uses symlinks (after we've switched to > subversion). > > We'll have to debug distutils first, I guess :-( Ok, we've found the problem and fixed it. Here's the new release (which does build out of the box at least on our boxes ;-): http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 01 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From davidrushby at yahoo.com Mon May 2 15:49:53 2005 From: davidrushby at yahoo.com (David Rushby) Date: Fri Feb 3 16:01:17 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Ok, we've found the problem and fixed it. Here's the new > release (which does build out of the box at least on our > boxes ;-): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip It does build now, but: py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" still behaves as it did when I submitted my original message: Fatal Python error: UNREF invalid object Aborted This is the same debug build of Python 2.4.1 that I was previously using, running the same configuration (CentOS Linux 4.0/i386, everything compiled with GCC 3.4.3). Have you examined my original claim as to the cause of the bug? __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 10:21:55 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Feb 3 16:01:17 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> References: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> Message-ID: <42772693.8050306@egenix.com> David Rushby wrote: > --- "M.-A. Lemburg" wrote: > >>Ok, we've found the problem and fixed it. Here's the new >>release (which does build out of the box at least on our >>boxes ;-): >> >> > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip > > It does build now, but: > py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" > still behaves as it did when I submitted my original message: > Fatal Python error: UNREF invalid object > Aborted > > This is the same debug build of Python 2.4.1 that I was previously > using, running the same configuration (CentOS Linux 4.0/i386, > everything compiled with GCC 3.4.3). > > Have you examined my original claim as to the cause of the bug? No. We haven't had time for looking into it. I'm not sure whether your analysis of the problem is correct: if you don't define WANT_SUBCLASSABLE_TYPES, the API mxDateTime_Deallocate() is neither defined nor used. Furthermore, PyObject_Del() is only called by mxDateTime_Free() if you have explicitely edited mxDateTime.c to disabled the free list #defines. In a standard build, PyObject_Del() is only called at module finalization time. Note that the reason we call mxDateTime_Free() in the constructor is that we don't want the destructor of the object to be called. Py_DECREF() would call the destructor (mxDateTime_Deallocate). It is possible that the debug code in Python complains about the refcount in the object not being 0 at the time the object is finalized (module finalization time), but I don't see any such checks in PyObject_Free() (which is what PyObject_Del() maps to). Again, all of this does not happen in regular non-debug Python builds. Please be aware that we don't support debug builds, so fixing the problem (if there is one - gcc has some serious optimization problems on some combinations of platform and version) will take a while. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 09:27:37 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Fri Feb 3 16:01:17 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 Message-ID: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Hi all- I am trying to build the mx-base package, v.2.0.6. This will be used with postgresql 7.3.9, psycopg 1.1.18, and Roundup 0.8.2. RHEL 3.0 Python 2.3 egenix-mx-base-2.0.6.tar.gz I performed a: /usr/local/bin/python2.3 setup.py install Everything looks proper with the exeception of this series of warning statements: ----------------- gcc -pthread -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fno-strict-aliasing -fPIC -Imx/BeeBase/mxBeeBase -I/usr/local/incl ude/python2.3 -I/usr/local/include -c mx/BeeBase/mxBeeBase/btr.c -o build/temp.linux-i686-2.3/mx/BeeBase/mxBeeBase/mxBeeBa se/mx/BeeBase/mxBeeBase/btr.o mx/BeeBase/mxBeeBase/btr.c: In function `dumpBuf': mx/BeeBase/mxBeeBase/btr.c:249: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:250: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:255: warning: unsigned int format, long unsigned int arg (arg 4) mx/BeeBase/mxBeeBase/btr.c:256: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c: In function `_validateTree': mx/BeeBase/mxBeeBase/btr.c:330: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:337: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:339: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:349: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:351: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 3) creating build/lib.linux-i686-2.3/mx/BeeBase creating build/lib.linux-i686-2.3/mx/BeeBase/mxBeeBase -------------- Would someone be kind enough to let me know whether these messages were expected, and if not, how I might resolve these? Thanks! DC __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 22:06:33 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Feb 3 16:01:17 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> References: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Message-ID: <4277CBB9.8020302@egenix.com> Dianne Chen wrote: > Hi all- > > I am trying to build the mx-base package, v.2.0.6. > This will be used with postgresql 7.3.9, psycopg > 1.1.18, and Roundup 0.8.2. > > RHEL 3.0 > Python 2.3 > egenix-mx-base-2.0.6.tar.gz > > I performed a: > > /usr/local/bin/python2.3 setup.py install > > Everything looks proper with the exeception of this > series of warning statements: > > ----------------- > ... > -------------- > > Would someone be kind enough to let me know whether > these messages were expected, and if not, how I might > resolve these? These warning can safely be ignored. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 13:41:14 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Fri Feb 3 16:01:17 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: 6667 Message-ID: <20050503194114.72091.qmail@web31414.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Dianne Chen wrote: > > Hi all- > > > > I am trying to build the mx-base package, v.2.0.6. > > This will be used with postgresql 7.3.9, psycopg > > 1.1.18, and Roundup 0.8.2. > > > > RHEL 3.0 > > Python 2.3 > > egenix-mx-base-2.0.6.tar.gz > > > > I performed a: > > > > /usr/local/bin/python2.3 setup.py install > > > > Everything looks proper with the exeception of > this > > series of warning statements: > > > > ----------------- > > ... > > -------------- > > > > Would someone be kind enough to let me know > whether > > these messages were expected, and if not, how I > might > > resolve these? > > These warning can safely be ignored. > > -- > Marc-Andre Lemburg > eGenix.com > Marc- Thank you very much for the reply. It helps greatly. With kind regards, DC __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From davidrushby at yahoo.com Tue May 3 17:18:46 2005 From: davidrushby at yahoo.com (David Rushby) Date: Fri Feb 3 16:01:17 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050503231846.35012.qmail@web30009.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > I'm not sure whether your analysis of the problem is correct... Indeed, my original analysis wasn't correct; I think this one is. The fatal error I'm complaining about only arises if the arguments to DateTime.DateTime are invalid, so that the object is deallocated in the onError block of mxDateTime_FromDateAndTime. If the object is created successfully, and later deallocated by Python's garbage collector, the fatal error doesn't arise. Here's my analysis of the problem: --- If the debugging directive Py_TRACE_REFS is enabled, as it is in my case, the Python interpreter maintains a doubly linked list of all Python objects (named refchain) via the _ob_next and _ob_prev pointers added to PyObject via _PyObject_HEAD_EXTRA. Each object is inserted into refchain by the _Py_AddToAllObjects call in _Py_NewReference, and removed from refchain by the _Py_ForgetReference call in _Py_Dealloc. _Py_ForgetReference performs an integrity check on the object being deallocated (op) to make sure that its neighbors in refchain recognize it. Specifically, _Py_ForgetReference verifies that the _ob_next pointer of the previous object in refchain (op->_ob_prev->_ob_next) points to op, and that the _ob_prev pointer of the next object in refchain (op->_ob_next->_ob_prev) points to op. If either of those conditions is false, the interpreter raises the fatal error I'm seeing. After mxDateTime_New pulls an mxDateTimeObject out of the free list, it calls _Py_NewReference on that object to transform it from a "conceptually deallocated" object to a "conceptually allocated" one. _Py_NewReference inserts the object into refchain. Later, when the object is being "conceptually deallocated", it should be removed from refchain with _Py_ForgetReference. The version of _Py_Dealloc that's active when Py_TRACE_REFS is enabled does this (_Py_Dealloc is the element of Py_DECREF that performs the actual destruction). _Py_Dealloc first calls _Py_ForgetReference to remove the object from refchain, then calls the object's destructor (op->ob_type->tp_dealloc). If WANT_SUBCLASSABLE_TYPES is not defined (it is not in my case), the destructor for mxDateTime_Type is mxDateTime_Free. So, if a DateTime object is deallocated normally, as a result of its reference count falling to zero, _Py_Dealloc is called on the object, which first removes it from refchain, then passes it to mxDateTime_Free. If a DateTime object is destroyed prematurely, as a result of invalid arguments to its destructor, the onError handler calls mxDateTime_Free, so the object is "conceptually deallocated" (placed in the free list), *but* the object is not removed from refchain. So if a refchain-membership-integrity-check is performed on the object in question or one of its immediate neighbors in refchain, that integrity check fails, leading to the fatal error. --- The solution is to 'Py_DECREF(...)' the object in the onError handler of its constructor, instead of passing the object directly to mxDateTime_Free. That change solves two problems: 1) It causes _Py_Dealloc to execute, which in turn executes _Py_ForgetReference, so the object is removed from refchain, as it should be. 2) At present, objects that are created successfully and later deallocated by normal reference count mechanics have a reference count of 0 when they enter the free list, whereas objects whose constructors abort their creation due to invalid arguments have a reference count of 1 when they enter the free list. Although AFAIK this doesn't cause an actual execution problem (because the object's reference count is *explicitly set to 1* rather than *incremented by 1* when the object is later "conceptually allocated" by _Py_NewReference), it is likely to confuse future maintainers and thereby lead to the introduction of an actual execution problem. I assume that if you agree that this is a reasonable solution, you'll want to apply the change not only to mxDateTime_FromDateAndTime, but to all similar constructors in mxDateTime.c. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From rj at maxxian.com Thu May 5 01:57:40 2005 From: rj at maxxian.com (RJ Juneau) Date: Fri Feb 3 16:01:17 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c5512e$f72798c0$6505a8c0@rjlaptop> I'm on the 30 day evaluation for mxodbc_zope_da. I'm getting the following error when I submit some queries: Error Type: KeyError Error Value: 'query' I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 with UCS4. The error seems to be caused by multiple rows being returned. I did see an earlier posting with the same error message. The response suggested a template error, but this is clearly not the case here. The additional evidence I've gathered so far: - I'm running the test directly from the ZSQL method, so there's no template involved. - If I use the same query with an additional "where" clause to ensure that only one row is returned, it works - If I use a value in the 'where' clause with no rows returned, it works - The same ZSQL query is being used on a Windows machine running Zope and the free ZODBC module without a problem - The query has been verified directly in mysql-client-browser Other info: - The database is MySQL 4.1.10A-0 - iODBC is the DB driver RJ Juneau -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050505/68d278bf/attachment-0087.htm From mal at egenix.com Thu May 5 12:37:43 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Feb 3 16:01:17 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c5512e$f72798c0$6505a8c0@rjlaptop> References: <000301c5512e$f72798c0$6505a8c0@rjlaptop> Message-ID: <4279E967.6010904@egenix.com> RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 > with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 09:37:42 2005 From: rj at maxxian.com (RJ Juneau) Date: Fri Feb 3 16:01:17 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000101c5516f$3b96de90$6505a8c0@rjlaptop> More interesting info on the problem: If I execute the query directly in the "test" window of the base eGenix mxODBC Database Connection window, it works fine and returns the 20 lines expected. That could point to a problem in the rendering, which seems to be where the traceback ends. Note that within the same Zope system I also have an ODBC connection to a Sybase database, and I have successfully tested multi-line ZSQL queries there. This is the traceback: Time 2005/05/05 07:55:15.294 GMT-4 Exception Type KeyError Exception Value 'query' Traceback (innermost last): Module ZPublisher.Publish, line 101, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 39, in call_object Module Shared.DC.ZRDB.DA, line 337, in manage_test Module DocumentTemplate.DT_String, line 474, in __call__ Module DocumentTemplate.DT_In, line 602, in renderwb Module DocumentTemplate.DT_Var, line 219, in render KeyError: 'query' I don't think the following is an issue, but I'll include it for completeness.I am also getting the following iODBC warnings and errors in the Zope console log, which are related to the ODBC parameters being passed by iODBC. Note that these errors also appear for all of the successful queries. [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (Setup). [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (UsageCount). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Timeout). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Reuse). As for the ZSQL snippet from the template... Since there's no template involved yet (I'm still testing directly from the ZSQL method), I assume you mean the SQL code? select h.host_name, s.system_name, s.system_handle, count(*) from terminal t, system_map s, host h where t.system_index = s.system_index and s.host_index = h.host_index group by s.system_name order by h.host_name Nothing complicated here. There are no parameters passed to the query. RJ -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: May 5, 2005 5:38 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: Re: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is > 2.3.4 with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ---------------------------------------------------------------------- > -- > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 16:00:32 2005 From: charlie at egenix.com (Charlie Clark) Date: Fri Feb 3 16:01:17 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000101c5516f$3b96de90$6505a8c0@rjlaptop> References: <000101c5516f$3b96de90$6505a8c0@rjlaptop> Message-ID: <20050505150032.644.1@bepc.1115296715.fake> On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base eGenix > mxODBC Database Connection window, it works fine and returns the 20 > lines expected. That could point to a problem in the rendering, which > seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection to > a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 10:22:17 2005 From: rj at maxxian.com (RJ Juneau) Date: Fri Feb 3 16:01:17 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505150032.644.1@bepc.1115296715.fake> Message-ID: <000201c55175$75bcad10$6505a8c0@rjlaptop> At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 11:47:14 2005 From: rj at maxxian.com (RJ Juneau) Date: Fri Feb 3 16:01:17 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c55181$549be0e0$6505a8c0@rjlaptop> Charlie, I found a fix. Here it is in case anyone else runs into this. You were correct - the problem is in another part of Zope. Based on your feedback, I did a bit more searching and found something here: http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. html The problem appears to be in Zope versions after 2.7.0. I'm running 2.7.6, and the post indicates that it also happens in 2.7.4. The solution: Edit file /lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. There are two lines in the file that start with . Edit them as follows: Change first line to: Change second line to: Just to be after, I shut down Zope before I made the changes and restarted it after. Thanks for the help! RJ -----Original Message----- From: RJ Juneau [mailto:rj@maxxian.com] Sent: May 5, 2005 9:22 AM To: 'Charlie Clark' Cc: 'egenix-users@lists.egenix.com' Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 17:57:25 2005 From: charlie at egenix.com (Charlie Clark) Date: Fri Feb 3 16:01:17 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <20050505165725.3380.2@bepc.1115296715.fake> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Thu May 5 09:15:21 2005 From: charlie at egenix.com (Charlie Clark) Date: Fri Feb 3 16:01:17 2006 Subject: [Zope-DB] RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <000001c55185$41477730$6b00a8c0@fonacier.local> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________ Zope-DB mailing list Zope-DB@zope.org http://mail.zope.org/mailman/listinfo/zope-db From rj at maxxian.com Thu May 5 12:38:00 2005 From: rj at maxxian.com (RJ Juneau) Date: Fri Feb 3 16:01:17 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000001c55188$6b841eb0$6505a8c0@rjlaptop> I just double-checked. Zope-2.7.6-final. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 12:49:16 2005 From: rj at maxxian.com (RJ Juneau) Date: Fri Feb 3 16:01:17 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000501c55189$fe149ba0$6505a8c0@rjlaptop> Charlie, The fix has only been applied for 2.7.7, 2.8b2. The info is in the original bug report which is closed and can be found here: http://www.zope.org/Collectors/Zope/1745 RJ -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Fri May 6 11:50:09 2005 From: rj at maxxian.com (RJ Juneau) Date: Fri Feb 3 16:01:17 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC Message-ID: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Still on eval for the product. I cannot get a stable connection to Sybase via the iODBC drivers. - The Sybase ODBC connection - including a query - have been verified at the iODBC level. - The setup is already working well for ODBC connection to MySQL. Symptoms include: - If I click on "Open Connection", it still comes back with "Connection Closed" when I go to a ZSQL method - Using 'Connect on Demand' is not working either. - Clicking "Open Connection" gives me the following error: Connection string: DSN=lixbox_sybase; UID=sa; PWD=XXXXXXX Connection pool entry: 0 Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection rejected by data source', 7952) The odbc.ini definition for DSN "lixbox_sybase" is as follows: [lixbox_sybase] JetFix = No NoRowSetSizeLimit = No Description = Test connection to listbox Options = LIXBOX DSQUERY = SQLSERVER TDSHOST = lixbox TDSPORT = 5000 TDSVER = 5.0 SQLSERVER_CATALOG = N CURSOR_SENSITIVITY = LOW UserName = sa Password = XXXXXXXX ServerType = Sybase 10/11/12 Driver = /opt/openlink/lib/sql_mt_lt.so Database = pubs2 ReadOnly = no NoAutoCommit = No NoLoginBox = No FetchBufferSize = 60 Other relevant data: - Connecting via OpenLink's iODBC - Zope 2.7.6-final - Python 2.3.4 - Connection to Sybase has been successfully tested with iODBC, including issuing a query - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC connection RJ Juneau Chief Technology Officer Maxxian Integration Inc. 155 Westhampton Drive Thornhill, Ontario Canada L4J 7X2 E-mail: rj@maxxian.com Phone: +1 905 482 9429 Cell: +1 416 897 6682 Toll free: +1 866 758 9161 Fax: +1 647 722 2038 -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050506/aef33361/attachment-0087.htm From mal at egenix.com Fri May 6 18:27:37 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Feb 3 16:01:17 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC In-Reply-To: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> References: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Message-ID: <427B8CE9.1010601@egenix.com> RJ Juneau wrote: > Still on eval for the product. > > I cannot get a stable connection to Sybase via the iODBC drivers. > > - The Sybase ODBC connection - including a query - have been verified at > the iODBC level. > - The setup is already working well for ODBC connection to MySQL. > > Symptoms include: > > - If I click on "Open Connection", it still comes back with "Connection > Closed" when I go to a ZSQL method > - Using 'Connect on Demand' is not working either. > - Clicking "Open Connection" gives me the following error: > > Connection string: DSN=lixbox_sybase; > UID=sa; > PWD=XXXXXXX Try writing the connection string on one line and without whitespace. ODBC drivers sometimes have problems with this. > Connection pool entry: 0 > Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection > rejected by data source', 7952) This is a generic error that relates to authentication or firewall problems. It is possible that turning on ODBC tracing the ODBC manager will give more clues as to the real cause of the problem. > The odbc.ini definition for DSN "lixbox_sybase" is as follows: > > [lixbox_sybase] > JetFix = No > NoRowSetSizeLimit = No > Description = Test connection to listbox > Options = LIXBOX > DSQUERY = SQLSERVER > TDSHOST = lixbox > TDSPORT = 5000 > TDSVER = 5.0 > SQLSERVER_CATALOG = N > CURSOR_SENSITIVITY = LOW > UserName = sa > Password = XXXXXXXX > ServerType = Sybase 10/11/12 > Driver = /opt/openlink/lib/sql_mt_lt.so > Database = pubs2 > ReadOnly = no > NoAutoCommit = No > NoLoginBox = No > FetchBufferSize = 60 > > > Other relevant data: > - Connecting via OpenLink's iODBC > - Zope 2.7.6-final > - Python 2.3.4 > - Connection to Sybase has been successfully tested with iODBC, > including issuing a query > - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC > connection > > > > RJ Juneau > Chief Technology Officer > Maxxian Integration Inc. > 155 Westhampton Drive > Thornhill, Ontario > Canada L4J 7X2 > E-mail: rj@maxxian.com > Phone: +1 905 482 9429 > Cell: +1 416 897 6682 > Toll free: +1 866 758 9161 > Fax: +1 647 722 2038 > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 06 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From calisp at gmail.com Sun May 15 23:49:03 2005 From: calisp at gmail.com (calisp@gmail.com) Date: Fri Feb 3 16:01:17 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK Message-ID: Hi, I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the following error... 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the last phase of a two-phase commit. This shouldn't happen. Traceback (most recent call last): File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one jar.tpc_finish(self) File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish try: self._finish() File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could not perform COMMIT or ROLLBACK', 1023) What could be causing this? Can I get the mxODBCZopeDA source from somewhere? It would make debugging this much easier. Thanks, Calisp. From mal at egenix.com Mon May 16 13:52:12 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Feb 3 16:01:17 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK In-Reply-To: References: Message-ID: <42887B5C.4010109@egenix.com> calisp@gmail.com wrote: > Hi, > > I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with > unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the > following error... > > 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the > last phase of a two-phase commit. This shouldn't happen. > Traceback (most recent call last): > File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one > jar.tpc_finish(self) > File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish > try: self._finish() > File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish > File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler > ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could > not perform COMMIT or ROLLBACK', 1023) You should have a look at the database logs to see what prevented the commit from being completed. > What could be causing this? Hard to say: mxODBCZopeDA is trying to commit the transaction, but the driver or database failed to complete the request. The above error was generated by the ODBC driver. This could be network or DNS problems, or be related to a bug in FreeTDS (which is getting more stable with every new release, but should still be considered beta quality software at the moment). > Can I get the mxODBCZopeDA source from > somewhere? It would make debugging this much easier. Getting the source is not an option and won't help much either since the source of the problem is not mxODBCZopeDA. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 16 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Sun May 1 21:29:25 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Feb 3 20:01:22 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <427259F3.4090806@egenix.com> References: <20050427130906.52878.qmail@web30008.mail.mud.yahoo.com> <427259F3.4090806@egenix.com> Message-ID: <42752005.7080904@egenix.com> M.-A. Lemburg wrote: > David Rushby wrote: > >> --- "M.-A. Lemburg" wrote: >> >>> Are you using the standard mxDateTime build or one >>> with WANT_SUBCLASSABLE_TYPES defined... >> >> >> >> Presumably "the standard", since I just built with 'py24d setup.py >> build', making no attempt to enable special directives. >> >> >>> ... (mxDateTime_Deallocate is only used by the latter)? >> >> >> >> That's true in 2.1.0-2005-04-15, but not in 2.1.0b5. >> >> >>> In any case, please try our latest snapshot: >>> >>> >> >> http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-04-15.zip >> >>> to see if that makes any difference. >> >> >> >> I can't build it out of the box: > > > Hmm, looks like distutils' sdist command doesn't like our new > repository layout which uses symlinks (after we've switched to > subversion). > > We'll have to debug distutils first, I guess :-( Ok, we've found the problem and fixed it. Here's the new release (which does build out of the box at least on our boxes ;-): http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 01 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From davidrushby at yahoo.com Mon May 2 15:49:53 2005 From: davidrushby at yahoo.com (David Rushby) Date: Fri Feb 3 20:01:22 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Ok, we've found the problem and fixed it. Here's the new > release (which does build out of the box at least on our > boxes ;-): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip It does build now, but: py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" still behaves as it did when I submitted my original message: Fatal Python error: UNREF invalid object Aborted This is the same debug build of Python 2.4.1 that I was previously using, running the same configuration (CentOS Linux 4.0/i386, everything compiled with GCC 3.4.3). Have you examined my original claim as to the cause of the bug? __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 10:21:55 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Feb 3 20:01:22 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> References: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> Message-ID: <42772693.8050306@egenix.com> David Rushby wrote: > --- "M.-A. Lemburg" wrote: > >>Ok, we've found the problem and fixed it. Here's the new >>release (which does build out of the box at least on our >>boxes ;-): >> >> > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip > > It does build now, but: > py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" > still behaves as it did when I submitted my original message: > Fatal Python error: UNREF invalid object > Aborted > > This is the same debug build of Python 2.4.1 that I was previously > using, running the same configuration (CentOS Linux 4.0/i386, > everything compiled with GCC 3.4.3). > > Have you examined my original claim as to the cause of the bug? No. We haven't had time for looking into it. I'm not sure whether your analysis of the problem is correct: if you don't define WANT_SUBCLASSABLE_TYPES, the API mxDateTime_Deallocate() is neither defined nor used. Furthermore, PyObject_Del() is only called by mxDateTime_Free() if you have explicitely edited mxDateTime.c to disabled the free list #defines. In a standard build, PyObject_Del() is only called at module finalization time. Note that the reason we call mxDateTime_Free() in the constructor is that we don't want the destructor of the object to be called. Py_DECREF() would call the destructor (mxDateTime_Deallocate). It is possible that the debug code in Python complains about the refcount in the object not being 0 at the time the object is finalized (module finalization time), but I don't see any such checks in PyObject_Free() (which is what PyObject_Del() maps to). Again, all of this does not happen in regular non-debug Python builds. Please be aware that we don't support debug builds, so fixing the problem (if there is one - gcc has some serious optimization problems on some combinations of platform and version) will take a while. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 09:27:37 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Fri Feb 3 20:01:22 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 Message-ID: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Hi all- I am trying to build the mx-base package, v.2.0.6. This will be used with postgresql 7.3.9, psycopg 1.1.18, and Roundup 0.8.2. RHEL 3.0 Python 2.3 egenix-mx-base-2.0.6.tar.gz I performed a: /usr/local/bin/python2.3 setup.py install Everything looks proper with the exeception of this series of warning statements: ----------------- gcc -pthread -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fno-strict-aliasing -fPIC -Imx/BeeBase/mxBeeBase -I/usr/local/incl ude/python2.3 -I/usr/local/include -c mx/BeeBase/mxBeeBase/btr.c -o build/temp.linux-i686-2.3/mx/BeeBase/mxBeeBase/mxBeeBa se/mx/BeeBase/mxBeeBase/btr.o mx/BeeBase/mxBeeBase/btr.c: In function `dumpBuf': mx/BeeBase/mxBeeBase/btr.c:249: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:250: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:255: warning: unsigned int format, long unsigned int arg (arg 4) mx/BeeBase/mxBeeBase/btr.c:256: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c: In function `_validateTree': mx/BeeBase/mxBeeBase/btr.c:330: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:337: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:339: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:349: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:351: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 3) creating build/lib.linux-i686-2.3/mx/BeeBase creating build/lib.linux-i686-2.3/mx/BeeBase/mxBeeBase -------------- Would someone be kind enough to let me know whether these messages were expected, and if not, how I might resolve these? Thanks! DC __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 22:06:33 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Feb 3 20:01:22 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> References: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Message-ID: <4277CBB9.8020302@egenix.com> Dianne Chen wrote: > Hi all- > > I am trying to build the mx-base package, v.2.0.6. > This will be used with postgresql 7.3.9, psycopg > 1.1.18, and Roundup 0.8.2. > > RHEL 3.0 > Python 2.3 > egenix-mx-base-2.0.6.tar.gz > > I performed a: > > /usr/local/bin/python2.3 setup.py install > > Everything looks proper with the exeception of this > series of warning statements: > > ----------------- > ... > -------------- > > Would someone be kind enough to let me know whether > these messages were expected, and if not, how I might > resolve these? These warning can safely be ignored. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 13:41:14 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Fri Feb 3 20:01:22 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: 6667 Message-ID: <20050503194114.72091.qmail@web31414.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Dianne Chen wrote: > > Hi all- > > > > I am trying to build the mx-base package, v.2.0.6. > > This will be used with postgresql 7.3.9, psycopg > > 1.1.18, and Roundup 0.8.2. > > > > RHEL 3.0 > > Python 2.3 > > egenix-mx-base-2.0.6.tar.gz > > > > I performed a: > > > > /usr/local/bin/python2.3 setup.py install > > > > Everything looks proper with the exeception of > this > > series of warning statements: > > > > ----------------- > > ... > > -------------- > > > > Would someone be kind enough to let me know > whether > > these messages were expected, and if not, how I > might > > resolve these? > > These warning can safely be ignored. > > -- > Marc-Andre Lemburg > eGenix.com > Marc- Thank you very much for the reply. It helps greatly. With kind regards, DC __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From davidrushby at yahoo.com Tue May 3 17:18:46 2005 From: davidrushby at yahoo.com (David Rushby) Date: Fri Feb 3 20:01:22 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050503231846.35012.qmail@web30009.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > I'm not sure whether your analysis of the problem is correct... Indeed, my original analysis wasn't correct; I think this one is. The fatal error I'm complaining about only arises if the arguments to DateTime.DateTime are invalid, so that the object is deallocated in the onError block of mxDateTime_FromDateAndTime. If the object is created successfully, and later deallocated by Python's garbage collector, the fatal error doesn't arise. Here's my analysis of the problem: --- If the debugging directive Py_TRACE_REFS is enabled, as it is in my case, the Python interpreter maintains a doubly linked list of all Python objects (named refchain) via the _ob_next and _ob_prev pointers added to PyObject via _PyObject_HEAD_EXTRA. Each object is inserted into refchain by the _Py_AddToAllObjects call in _Py_NewReference, and removed from refchain by the _Py_ForgetReference call in _Py_Dealloc. _Py_ForgetReference performs an integrity check on the object being deallocated (op) to make sure that its neighbors in refchain recognize it. Specifically, _Py_ForgetReference verifies that the _ob_next pointer of the previous object in refchain (op->_ob_prev->_ob_next) points to op, and that the _ob_prev pointer of the next object in refchain (op->_ob_next->_ob_prev) points to op. If either of those conditions is false, the interpreter raises the fatal error I'm seeing. After mxDateTime_New pulls an mxDateTimeObject out of the free list, it calls _Py_NewReference on that object to transform it from a "conceptually deallocated" object to a "conceptually allocated" one. _Py_NewReference inserts the object into refchain. Later, when the object is being "conceptually deallocated", it should be removed from refchain with _Py_ForgetReference. The version of _Py_Dealloc that's active when Py_TRACE_REFS is enabled does this (_Py_Dealloc is the element of Py_DECREF that performs the actual destruction). _Py_Dealloc first calls _Py_ForgetReference to remove the object from refchain, then calls the object's destructor (op->ob_type->tp_dealloc). If WANT_SUBCLASSABLE_TYPES is not defined (it is not in my case), the destructor for mxDateTime_Type is mxDateTime_Free. So, if a DateTime object is deallocated normally, as a result of its reference count falling to zero, _Py_Dealloc is called on the object, which first removes it from refchain, then passes it to mxDateTime_Free. If a DateTime object is destroyed prematurely, as a result of invalid arguments to its destructor, the onError handler calls mxDateTime_Free, so the object is "conceptually deallocated" (placed in the free list), *but* the object is not removed from refchain. So if a refchain-membership-integrity-check is performed on the object in question or one of its immediate neighbors in refchain, that integrity check fails, leading to the fatal error. --- The solution is to 'Py_DECREF(...)' the object in the onError handler of its constructor, instead of passing the object directly to mxDateTime_Free. That change solves two problems: 1) It causes _Py_Dealloc to execute, which in turn executes _Py_ForgetReference, so the object is removed from refchain, as it should be. 2) At present, objects that are created successfully and later deallocated by normal reference count mechanics have a reference count of 0 when they enter the free list, whereas objects whose constructors abort their creation due to invalid arguments have a reference count of 1 when they enter the free list. Although AFAIK this doesn't cause an actual execution problem (because the object's reference count is *explicitly set to 1* rather than *incremented by 1* when the object is later "conceptually allocated" by _Py_NewReference), it is likely to confuse future maintainers and thereby lead to the introduction of an actual execution problem. I assume that if you agree that this is a reasonable solution, you'll want to apply the change not only to mxDateTime_FromDateAndTime, but to all similar constructors in mxDateTime.c. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From rj at maxxian.com Thu May 5 01:57:40 2005 From: rj at maxxian.com (RJ Juneau) Date: Fri Feb 3 20:01:22 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c5512e$f72798c0$6505a8c0@rjlaptop> I'm on the 30 day evaluation for mxodbc_zope_da. I'm getting the following error when I submit some queries: Error Type: KeyError Error Value: 'query' I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 with UCS4. The error seems to be caused by multiple rows being returned. I did see an earlier posting with the same error message. The response suggested a template error, but this is clearly not the case here. The additional evidence I've gathered so far: - I'm running the test directly from the ZSQL method, so there's no template involved. - If I use the same query with an additional "where" clause to ensure that only one row is returned, it works - If I use a value in the 'where' clause with no rows returned, it works - The same ZSQL query is being used on a Windows machine running Zope and the free ZODBC module without a problem - The query has been verified directly in mysql-client-browser Other info: - The database is MySQL 4.1.10A-0 - iODBC is the DB driver RJ Juneau -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050505/68d278bf/attachment-0088.htm From mal at egenix.com Thu May 5 12:37:43 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Feb 3 20:01:22 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c5512e$f72798c0$6505a8c0@rjlaptop> References: <000301c5512e$f72798c0$6505a8c0@rjlaptop> Message-ID: <4279E967.6010904@egenix.com> RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 > with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 09:37:42 2005 From: rj at maxxian.com (RJ Juneau) Date: Fri Feb 3 20:01:22 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000101c5516f$3b96de90$6505a8c0@rjlaptop> More interesting info on the problem: If I execute the query directly in the "test" window of the base eGenix mxODBC Database Connection window, it works fine and returns the 20 lines expected. That could point to a problem in the rendering, which seems to be where the traceback ends. Note that within the same Zope system I also have an ODBC connection to a Sybase database, and I have successfully tested multi-line ZSQL queries there. This is the traceback: Time 2005/05/05 07:55:15.294 GMT-4 Exception Type KeyError Exception Value 'query' Traceback (innermost last): Module ZPublisher.Publish, line 101, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 39, in call_object Module Shared.DC.ZRDB.DA, line 337, in manage_test Module DocumentTemplate.DT_String, line 474, in __call__ Module DocumentTemplate.DT_In, line 602, in renderwb Module DocumentTemplate.DT_Var, line 219, in render KeyError: 'query' I don't think the following is an issue, but I'll include it for completeness.I am also getting the following iODBC warnings and errors in the Zope console log, which are related to the ODBC parameters being passed by iODBC. Note that these errors also appear for all of the successful queries. [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (Setup). [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (UsageCount). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Timeout). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Reuse). As for the ZSQL snippet from the template... Since there's no template involved yet (I'm still testing directly from the ZSQL method), I assume you mean the SQL code? select h.host_name, s.system_name, s.system_handle, count(*) from terminal t, system_map s, host h where t.system_index = s.system_index and s.host_index = h.host_index group by s.system_name order by h.host_name Nothing complicated here. There are no parameters passed to the query. RJ -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: May 5, 2005 5:38 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: Re: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is > 2.3.4 with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ---------------------------------------------------------------------- > -- > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 16:00:32 2005 From: charlie at egenix.com (Charlie Clark) Date: Fri Feb 3 20:01:22 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000101c5516f$3b96de90$6505a8c0@rjlaptop> References: <000101c5516f$3b96de90$6505a8c0@rjlaptop> Message-ID: <20050505150032.644.1@bepc.1115296715.fake> On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base eGenix > mxODBC Database Connection window, it works fine and returns the 20 > lines expected. That could point to a problem in the rendering, which > seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection to > a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 10:22:17 2005 From: rj at maxxian.com (RJ Juneau) Date: Fri Feb 3 20:01:22 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505150032.644.1@bepc.1115296715.fake> Message-ID: <000201c55175$75bcad10$6505a8c0@rjlaptop> At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 11:47:14 2005 From: rj at maxxian.com (RJ Juneau) Date: Fri Feb 3 20:01:22 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c55181$549be0e0$6505a8c0@rjlaptop> Charlie, I found a fix. Here it is in case anyone else runs into this. You were correct - the problem is in another part of Zope. Based on your feedback, I did a bit more searching and found something here: http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. html The problem appears to be in Zope versions after 2.7.0. I'm running 2.7.6, and the post indicates that it also happens in 2.7.4. The solution: Edit file /lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. There are two lines in the file that start with . Edit them as follows: Change first line to: Change second line to: Just to be after, I shut down Zope before I made the changes and restarted it after. Thanks for the help! RJ -----Original Message----- From: RJ Juneau [mailto:rj@maxxian.com] Sent: May 5, 2005 9:22 AM To: 'Charlie Clark' Cc: 'egenix-users@lists.egenix.com' Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 17:57:25 2005 From: charlie at egenix.com (Charlie Clark) Date: Fri Feb 3 20:01:22 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <20050505165725.3380.2@bepc.1115296715.fake> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Thu May 5 09:15:21 2005 From: charlie at egenix.com (Charlie Clark) Date: Fri Feb 3 20:01:22 2006 Subject: [Zope-DB] RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <000001c55185$41477730$6b00a8c0@fonacier.local> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________ Zope-DB mailing list Zope-DB@zope.org http://mail.zope.org/mailman/listinfo/zope-db From rj at maxxian.com Thu May 5 12:38:00 2005 From: rj at maxxian.com (RJ Juneau) Date: Fri Feb 3 20:01:22 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000001c55188$6b841eb0$6505a8c0@rjlaptop> I just double-checked. Zope-2.7.6-final. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 12:49:16 2005 From: rj at maxxian.com (RJ Juneau) Date: Fri Feb 3 20:01:22 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000501c55189$fe149ba0$6505a8c0@rjlaptop> Charlie, The fix has only been applied for 2.7.7, 2.8b2. The info is in the original bug report which is closed and can be found here: http://www.zope.org/Collectors/Zope/1745 RJ -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Fri May 6 11:50:09 2005 From: rj at maxxian.com (RJ Juneau) Date: Fri Feb 3 20:01:22 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC Message-ID: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Still on eval for the product. I cannot get a stable connection to Sybase via the iODBC drivers. - The Sybase ODBC connection - including a query - have been verified at the iODBC level. - The setup is already working well for ODBC connection to MySQL. Symptoms include: - If I click on "Open Connection", it still comes back with "Connection Closed" when I go to a ZSQL method - Using 'Connect on Demand' is not working either. - Clicking "Open Connection" gives me the following error: Connection string: DSN=lixbox_sybase; UID=sa; PWD=XXXXXXX Connection pool entry: 0 Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection rejected by data source', 7952) The odbc.ini definition for DSN "lixbox_sybase" is as follows: [lixbox_sybase] JetFix = No NoRowSetSizeLimit = No Description = Test connection to listbox Options = LIXBOX DSQUERY = SQLSERVER TDSHOST = lixbox TDSPORT = 5000 TDSVER = 5.0 SQLSERVER_CATALOG = N CURSOR_SENSITIVITY = LOW UserName = sa Password = XXXXXXXX ServerType = Sybase 10/11/12 Driver = /opt/openlink/lib/sql_mt_lt.so Database = pubs2 ReadOnly = no NoAutoCommit = No NoLoginBox = No FetchBufferSize = 60 Other relevant data: - Connecting via OpenLink's iODBC - Zope 2.7.6-final - Python 2.3.4 - Connection to Sybase has been successfully tested with iODBC, including issuing a query - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC connection RJ Juneau Chief Technology Officer Maxxian Integration Inc. 155 Westhampton Drive Thornhill, Ontario Canada L4J 7X2 E-mail: rj@maxxian.com Phone: +1 905 482 9429 Cell: +1 416 897 6682 Toll free: +1 866 758 9161 Fax: +1 647 722 2038 -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050506/aef33361/attachment-0088.htm From mal at egenix.com Fri May 6 18:27:37 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Feb 3 20:01:22 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC In-Reply-To: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> References: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Message-ID: <427B8CE9.1010601@egenix.com> RJ Juneau wrote: > Still on eval for the product. > > I cannot get a stable connection to Sybase via the iODBC drivers. > > - The Sybase ODBC connection - including a query - have been verified at > the iODBC level. > - The setup is already working well for ODBC connection to MySQL. > > Symptoms include: > > - If I click on "Open Connection", it still comes back with "Connection > Closed" when I go to a ZSQL method > - Using 'Connect on Demand' is not working either. > - Clicking "Open Connection" gives me the following error: > > Connection string: DSN=lixbox_sybase; > UID=sa; > PWD=XXXXXXX Try writing the connection string on one line and without whitespace. ODBC drivers sometimes have problems with this. > Connection pool entry: 0 > Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection > rejected by data source', 7952) This is a generic error that relates to authentication or firewall problems. It is possible that turning on ODBC tracing the ODBC manager will give more clues as to the real cause of the problem. > The odbc.ini definition for DSN "lixbox_sybase" is as follows: > > [lixbox_sybase] > JetFix = No > NoRowSetSizeLimit = No > Description = Test connection to listbox > Options = LIXBOX > DSQUERY = SQLSERVER > TDSHOST = lixbox > TDSPORT = 5000 > TDSVER = 5.0 > SQLSERVER_CATALOG = N > CURSOR_SENSITIVITY = LOW > UserName = sa > Password = XXXXXXXX > ServerType = Sybase 10/11/12 > Driver = /opt/openlink/lib/sql_mt_lt.so > Database = pubs2 > ReadOnly = no > NoAutoCommit = No > NoLoginBox = No > FetchBufferSize = 60 > > > Other relevant data: > - Connecting via OpenLink's iODBC > - Zope 2.7.6-final > - Python 2.3.4 > - Connection to Sybase has been successfully tested with iODBC, > including issuing a query > - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC > connection > > > > RJ Juneau > Chief Technology Officer > Maxxian Integration Inc. > 155 Westhampton Drive > Thornhill, Ontario > Canada L4J 7X2 > E-mail: rj@maxxian.com > Phone: +1 905 482 9429 > Cell: +1 416 897 6682 > Toll free: +1 866 758 9161 > Fax: +1 647 722 2038 > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 06 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From calisp at gmail.com Sun May 15 23:49:03 2005 From: calisp at gmail.com (calisp@gmail.com) Date: Fri Feb 3 20:01:22 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK Message-ID: Hi, I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the following error... 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the last phase of a two-phase commit. This shouldn't happen. Traceback (most recent call last): File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one jar.tpc_finish(self) File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish try: self._finish() File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could not perform COMMIT or ROLLBACK', 1023) What could be causing this? Can I get the mxODBCZopeDA source from somewhere? It would make debugging this much easier. Thanks, Calisp. From mal at egenix.com Mon May 16 13:52:12 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Feb 3 20:01:22 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK In-Reply-To: References: Message-ID: <42887B5C.4010109@egenix.com> calisp@gmail.com wrote: > Hi, > > I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with > unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the > following error... > > 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the > last phase of a two-phase commit. This shouldn't happen. > Traceback (most recent call last): > File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one > jar.tpc_finish(self) > File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish > try: self._finish() > File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish > File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler > ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could > not perform COMMIT or ROLLBACK', 1023) You should have a look at the database logs to see what prevented the commit from being completed. > What could be causing this? Hard to say: mxODBCZopeDA is trying to commit the transaction, but the driver or database failed to complete the request. The above error was generated by the ODBC driver. This could be network or DNS problems, or be related to a bug in FreeTDS (which is getting more stable with every new release, but should still be considered beta quality software at the moment). > Can I get the mxODBCZopeDA source from > somewhere? It would make debugging this much easier. Getting the source is not an option and won't help much either since the source of the problem is not mxODBCZopeDA. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 16 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Sun May 1 21:29:25 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Feb 4 08:09:22 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <427259F3.4090806@egenix.com> References: <20050427130906.52878.qmail@web30008.mail.mud.yahoo.com> <427259F3.4090806@egenix.com> Message-ID: <42752005.7080904@egenix.com> M.-A. Lemburg wrote: > David Rushby wrote: > >> --- "M.-A. Lemburg" wrote: >> >>> Are you using the standard mxDateTime build or one >>> with WANT_SUBCLASSABLE_TYPES defined... >> >> >> >> Presumably "the standard", since I just built with 'py24d setup.py >> build', making no attempt to enable special directives. >> >> >>> ... (mxDateTime_Deallocate is only used by the latter)? >> >> >> >> That's true in 2.1.0-2005-04-15, but not in 2.1.0b5. >> >> >>> In any case, please try our latest snapshot: >>> >>> >> >> http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-04-15.zip >> >>> to see if that makes any difference. >> >> >> >> I can't build it out of the box: > > > Hmm, looks like distutils' sdist command doesn't like our new > repository layout which uses symlinks (after we've switched to > subversion). > > We'll have to debug distutils first, I guess :-( Ok, we've found the problem and fixed it. Here's the new release (which does build out of the box at least on our boxes ;-): http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 01 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From davidrushby at yahoo.com Mon May 2 15:49:53 2005 From: davidrushby at yahoo.com (David Rushby) Date: Sat Feb 4 08:09:23 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Ok, we've found the problem and fixed it. Here's the new > release (which does build out of the box at least on our > boxes ;-): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip It does build now, but: py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" still behaves as it did when I submitted my original message: Fatal Python error: UNREF invalid object Aborted This is the same debug build of Python 2.4.1 that I was previously using, running the same configuration (CentOS Linux 4.0/i386, everything compiled with GCC 3.4.3). Have you examined my original claim as to the cause of the bug? __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 10:21:55 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Feb 4 08:09:23 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> References: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> Message-ID: <42772693.8050306@egenix.com> David Rushby wrote: > --- "M.-A. Lemburg" wrote: > >>Ok, we've found the problem and fixed it. Here's the new >>release (which does build out of the box at least on our >>boxes ;-): >> >> > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip > > It does build now, but: > py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" > still behaves as it did when I submitted my original message: > Fatal Python error: UNREF invalid object > Aborted > > This is the same debug build of Python 2.4.1 that I was previously > using, running the same configuration (CentOS Linux 4.0/i386, > everything compiled with GCC 3.4.3). > > Have you examined my original claim as to the cause of the bug? No. We haven't had time for looking into it. I'm not sure whether your analysis of the problem is correct: if you don't define WANT_SUBCLASSABLE_TYPES, the API mxDateTime_Deallocate() is neither defined nor used. Furthermore, PyObject_Del() is only called by mxDateTime_Free() if you have explicitely edited mxDateTime.c to disabled the free list #defines. In a standard build, PyObject_Del() is only called at module finalization time. Note that the reason we call mxDateTime_Free() in the constructor is that we don't want the destructor of the object to be called. Py_DECREF() would call the destructor (mxDateTime_Deallocate). It is possible that the debug code in Python complains about the refcount in the object not being 0 at the time the object is finalized (module finalization time), but I don't see any such checks in PyObject_Free() (which is what PyObject_Del() maps to). Again, all of this does not happen in regular non-debug Python builds. Please be aware that we don't support debug builds, so fixing the problem (if there is one - gcc has some serious optimization problems on some combinations of platform and version) will take a while. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 09:27:37 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Sat Feb 4 08:09:23 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 Message-ID: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Hi all- I am trying to build the mx-base package, v.2.0.6. This will be used with postgresql 7.3.9, psycopg 1.1.18, and Roundup 0.8.2. RHEL 3.0 Python 2.3 egenix-mx-base-2.0.6.tar.gz I performed a: /usr/local/bin/python2.3 setup.py install Everything looks proper with the exeception of this series of warning statements: ----------------- gcc -pthread -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fno-strict-aliasing -fPIC -Imx/BeeBase/mxBeeBase -I/usr/local/incl ude/python2.3 -I/usr/local/include -c mx/BeeBase/mxBeeBase/btr.c -o build/temp.linux-i686-2.3/mx/BeeBase/mxBeeBase/mxBeeBa se/mx/BeeBase/mxBeeBase/btr.o mx/BeeBase/mxBeeBase/btr.c: In function `dumpBuf': mx/BeeBase/mxBeeBase/btr.c:249: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:250: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:255: warning: unsigned int format, long unsigned int arg (arg 4) mx/BeeBase/mxBeeBase/btr.c:256: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c: In function `_validateTree': mx/BeeBase/mxBeeBase/btr.c:330: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:337: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:339: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:349: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:351: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 3) creating build/lib.linux-i686-2.3/mx/BeeBase creating build/lib.linux-i686-2.3/mx/BeeBase/mxBeeBase -------------- Would someone be kind enough to let me know whether these messages were expected, and if not, how I might resolve these? Thanks! DC __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 22:06:33 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Feb 4 08:09:23 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> References: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Message-ID: <4277CBB9.8020302@egenix.com> Dianne Chen wrote: > Hi all- > > I am trying to build the mx-base package, v.2.0.6. > This will be used with postgresql 7.3.9, psycopg > 1.1.18, and Roundup 0.8.2. > > RHEL 3.0 > Python 2.3 > egenix-mx-base-2.0.6.tar.gz > > I performed a: > > /usr/local/bin/python2.3 setup.py install > > Everything looks proper with the exeception of this > series of warning statements: > > ----------------- > ... > -------------- > > Would someone be kind enough to let me know whether > these messages were expected, and if not, how I might > resolve these? These warning can safely be ignored. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 13:41:14 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Sat Feb 4 08:09:23 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: 6667 Message-ID: <20050503194114.72091.qmail@web31414.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Dianne Chen wrote: > > Hi all- > > > > I am trying to build the mx-base package, v.2.0.6. > > This will be used with postgresql 7.3.9, psycopg > > 1.1.18, and Roundup 0.8.2. > > > > RHEL 3.0 > > Python 2.3 > > egenix-mx-base-2.0.6.tar.gz > > > > I performed a: > > > > /usr/local/bin/python2.3 setup.py install > > > > Everything looks proper with the exeception of > this > > series of warning statements: > > > > ----------------- > > ... > > -------------- > > > > Would someone be kind enough to let me know > whether > > these messages were expected, and if not, how I > might > > resolve these? > > These warning can safely be ignored. > > -- > Marc-Andre Lemburg > eGenix.com > Marc- Thank you very much for the reply. It helps greatly. With kind regards, DC __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From davidrushby at yahoo.com Tue May 3 17:18:46 2005 From: davidrushby at yahoo.com (David Rushby) Date: Sat Feb 4 08:09:24 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050503231846.35012.qmail@web30009.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > I'm not sure whether your analysis of the problem is correct... Indeed, my original analysis wasn't correct; I think this one is. The fatal error I'm complaining about only arises if the arguments to DateTime.DateTime are invalid, so that the object is deallocated in the onError block of mxDateTime_FromDateAndTime. If the object is created successfully, and later deallocated by Python's garbage collector, the fatal error doesn't arise. Here's my analysis of the problem: --- If the debugging directive Py_TRACE_REFS is enabled, as it is in my case, the Python interpreter maintains a doubly linked list of all Python objects (named refchain) via the _ob_next and _ob_prev pointers added to PyObject via _PyObject_HEAD_EXTRA. Each object is inserted into refchain by the _Py_AddToAllObjects call in _Py_NewReference, and removed from refchain by the _Py_ForgetReference call in _Py_Dealloc. _Py_ForgetReference performs an integrity check on the object being deallocated (op) to make sure that its neighbors in refchain recognize it. Specifically, _Py_ForgetReference verifies that the _ob_next pointer of the previous object in refchain (op->_ob_prev->_ob_next) points to op, and that the _ob_prev pointer of the next object in refchain (op->_ob_next->_ob_prev) points to op. If either of those conditions is false, the interpreter raises the fatal error I'm seeing. After mxDateTime_New pulls an mxDateTimeObject out of the free list, it calls _Py_NewReference on that object to transform it from a "conceptually deallocated" object to a "conceptually allocated" one. _Py_NewReference inserts the object into refchain. Later, when the object is being "conceptually deallocated", it should be removed from refchain with _Py_ForgetReference. The version of _Py_Dealloc that's active when Py_TRACE_REFS is enabled does this (_Py_Dealloc is the element of Py_DECREF that performs the actual destruction). _Py_Dealloc first calls _Py_ForgetReference to remove the object from refchain, then calls the object's destructor (op->ob_type->tp_dealloc). If WANT_SUBCLASSABLE_TYPES is not defined (it is not in my case), the destructor for mxDateTime_Type is mxDateTime_Free. So, if a DateTime object is deallocated normally, as a result of its reference count falling to zero, _Py_Dealloc is called on the object, which first removes it from refchain, then passes it to mxDateTime_Free. If a DateTime object is destroyed prematurely, as a result of invalid arguments to its destructor, the onError handler calls mxDateTime_Free, so the object is "conceptually deallocated" (placed in the free list), *but* the object is not removed from refchain. So if a refchain-membership-integrity-check is performed on the object in question or one of its immediate neighbors in refchain, that integrity check fails, leading to the fatal error. --- The solution is to 'Py_DECREF(...)' the object in the onError handler of its constructor, instead of passing the object directly to mxDateTime_Free. That change solves two problems: 1) It causes _Py_Dealloc to execute, which in turn executes _Py_ForgetReference, so the object is removed from refchain, as it should be. 2) At present, objects that are created successfully and later deallocated by normal reference count mechanics have a reference count of 0 when they enter the free list, whereas objects whose constructors abort their creation due to invalid arguments have a reference count of 1 when they enter the free list. Although AFAIK this doesn't cause an actual execution problem (because the object's reference count is *explicitly set to 1* rather than *incremented by 1* when the object is later "conceptually allocated" by _Py_NewReference), it is likely to confuse future maintainers and thereby lead to the introduction of an actual execution problem. I assume that if you agree that this is a reasonable solution, you'll want to apply the change not only to mxDateTime_FromDateAndTime, but to all similar constructors in mxDateTime.c. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From rj at maxxian.com Thu May 5 01:57:40 2005 From: rj at maxxian.com (RJ Juneau) Date: Sat Feb 4 08:09:24 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c5512e$f72798c0$6505a8c0@rjlaptop> I'm on the 30 day evaluation for mxodbc_zope_da. I'm getting the following error when I submit some queries: Error Type: KeyError Error Value: 'query' I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 with UCS4. The error seems to be caused by multiple rows being returned. I did see an earlier posting with the same error message. The response suggested a template error, but this is clearly not the case here. The additional evidence I've gathered so far: - I'm running the test directly from the ZSQL method, so there's no template involved. - If I use the same query with an additional "where" clause to ensure that only one row is returned, it works - If I use a value in the 'where' clause with no rows returned, it works - The same ZSQL query is being used on a Windows machine running Zope and the free ZODBC module without a problem - The query has been verified directly in mysql-client-browser Other info: - The database is MySQL 4.1.10A-0 - iODBC is the DB driver RJ Juneau -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050505/68d278bf/attachment-0089.htm From mal at egenix.com Thu May 5 12:37:43 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Feb 4 08:09:24 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c5512e$f72798c0$6505a8c0@rjlaptop> References: <000301c5512e$f72798c0$6505a8c0@rjlaptop> Message-ID: <4279E967.6010904@egenix.com> RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 > with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 09:37:42 2005 From: rj at maxxian.com (RJ Juneau) Date: Sat Feb 4 08:09:24 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000101c5516f$3b96de90$6505a8c0@rjlaptop> More interesting info on the problem: If I execute the query directly in the "test" window of the base eGenix mxODBC Database Connection window, it works fine and returns the 20 lines expected. That could point to a problem in the rendering, which seems to be where the traceback ends. Note that within the same Zope system I also have an ODBC connection to a Sybase database, and I have successfully tested multi-line ZSQL queries there. This is the traceback: Time 2005/05/05 07:55:15.294 GMT-4 Exception Type KeyError Exception Value 'query' Traceback (innermost last): Module ZPublisher.Publish, line 101, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 39, in call_object Module Shared.DC.ZRDB.DA, line 337, in manage_test Module DocumentTemplate.DT_String, line 474, in __call__ Module DocumentTemplate.DT_In, line 602, in renderwb Module DocumentTemplate.DT_Var, line 219, in render KeyError: 'query' I don't think the following is an issue, but I'll include it for completeness.I am also getting the following iODBC warnings and errors in the Zope console log, which are related to the ODBC parameters being passed by iODBC. Note that these errors also appear for all of the successful queries. [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (Setup). [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (UsageCount). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Timeout). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Reuse). As for the ZSQL snippet from the template... Since there's no template involved yet (I'm still testing directly from the ZSQL method), I assume you mean the SQL code? select h.host_name, s.system_name, s.system_handle, count(*) from terminal t, system_map s, host h where t.system_index = s.system_index and s.host_index = h.host_index group by s.system_name order by h.host_name Nothing complicated here. There are no parameters passed to the query. RJ -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: May 5, 2005 5:38 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: Re: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is > 2.3.4 with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ---------------------------------------------------------------------- > -- > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 16:00:32 2005 From: charlie at egenix.com (Charlie Clark) Date: Sat Feb 4 08:09:24 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000101c5516f$3b96de90$6505a8c0@rjlaptop> References: <000101c5516f$3b96de90$6505a8c0@rjlaptop> Message-ID: <20050505150032.644.1@bepc.1115296715.fake> On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base eGenix > mxODBC Database Connection window, it works fine and returns the 20 > lines expected. That could point to a problem in the rendering, which > seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection to > a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 10:22:17 2005 From: rj at maxxian.com (RJ Juneau) Date: Sat Feb 4 08:09:24 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505150032.644.1@bepc.1115296715.fake> Message-ID: <000201c55175$75bcad10$6505a8c0@rjlaptop> At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 11:47:14 2005 From: rj at maxxian.com (RJ Juneau) Date: Sat Feb 4 08:09:24 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c55181$549be0e0$6505a8c0@rjlaptop> Charlie, I found a fix. Here it is in case anyone else runs into this. You were correct - the problem is in another part of Zope. Based on your feedback, I did a bit more searching and found something here: http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. html The problem appears to be in Zope versions after 2.7.0. I'm running 2.7.6, and the post indicates that it also happens in 2.7.4. The solution: Edit file /lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. There are two lines in the file that start with . Edit them as follows: Change first line to: Change second line to: Just to be after, I shut down Zope before I made the changes and restarted it after. Thanks for the help! RJ -----Original Message----- From: RJ Juneau [mailto:rj@maxxian.com] Sent: May 5, 2005 9:22 AM To: 'Charlie Clark' Cc: 'egenix-users@lists.egenix.com' Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 17:57:25 2005 From: charlie at egenix.com (Charlie Clark) Date: Sat Feb 4 08:09:25 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <20050505165725.3380.2@bepc.1115296715.fake> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Thu May 5 09:15:21 2005 From: charlie at egenix.com (Charlie Clark) Date: Sat Feb 4 08:09:25 2006 Subject: [Zope-DB] RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <000001c55185$41477730$6b00a8c0@fonacier.local> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________ Zope-DB mailing list Zope-DB@zope.org http://mail.zope.org/mailman/listinfo/zope-db From rj at maxxian.com Thu May 5 12:38:00 2005 From: rj at maxxian.com (RJ Juneau) Date: Sat Feb 4 08:09:25 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000001c55188$6b841eb0$6505a8c0@rjlaptop> I just double-checked. Zope-2.7.6-final. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 12:49:16 2005 From: rj at maxxian.com (RJ Juneau) Date: Sat Feb 4 08:09:25 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000501c55189$fe149ba0$6505a8c0@rjlaptop> Charlie, The fix has only been applied for 2.7.7, 2.8b2. The info is in the original bug report which is closed and can be found here: http://www.zope.org/Collectors/Zope/1745 RJ -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Fri May 6 11:50:09 2005 From: rj at maxxian.com (RJ Juneau) Date: Sat Feb 4 08:09:26 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC Message-ID: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Still on eval for the product. I cannot get a stable connection to Sybase via the iODBC drivers. - The Sybase ODBC connection - including a query - have been verified at the iODBC level. - The setup is already working well for ODBC connection to MySQL. Symptoms include: - If I click on "Open Connection", it still comes back with "Connection Closed" when I go to a ZSQL method - Using 'Connect on Demand' is not working either. - Clicking "Open Connection" gives me the following error: Connection string: DSN=lixbox_sybase; UID=sa; PWD=XXXXXXX Connection pool entry: 0 Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection rejected by data source', 7952) The odbc.ini definition for DSN "lixbox_sybase" is as follows: [lixbox_sybase] JetFix = No NoRowSetSizeLimit = No Description = Test connection to listbox Options = LIXBOX DSQUERY = SQLSERVER TDSHOST = lixbox TDSPORT = 5000 TDSVER = 5.0 SQLSERVER_CATALOG = N CURSOR_SENSITIVITY = LOW UserName = sa Password = XXXXXXXX ServerType = Sybase 10/11/12 Driver = /opt/openlink/lib/sql_mt_lt.so Database = pubs2 ReadOnly = no NoAutoCommit = No NoLoginBox = No FetchBufferSize = 60 Other relevant data: - Connecting via OpenLink's iODBC - Zope 2.7.6-final - Python 2.3.4 - Connection to Sybase has been successfully tested with iODBC, including issuing a query - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC connection RJ Juneau Chief Technology Officer Maxxian Integration Inc. 155 Westhampton Drive Thornhill, Ontario Canada L4J 7X2 E-mail: rj@maxxian.com Phone: +1 905 482 9429 Cell: +1 416 897 6682 Toll free: +1 866 758 9161 Fax: +1 647 722 2038 -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050506/aef33361/attachment-0089.htm From mal at egenix.com Fri May 6 18:27:37 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Feb 4 08:09:26 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC In-Reply-To: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> References: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Message-ID: <427B8CE9.1010601@egenix.com> RJ Juneau wrote: > Still on eval for the product. > > I cannot get a stable connection to Sybase via the iODBC drivers. > > - The Sybase ODBC connection - including a query - have been verified at > the iODBC level. > - The setup is already working well for ODBC connection to MySQL. > > Symptoms include: > > - If I click on "Open Connection", it still comes back with "Connection > Closed" when I go to a ZSQL method > - Using 'Connect on Demand' is not working either. > - Clicking "Open Connection" gives me the following error: > > Connection string: DSN=lixbox_sybase; > UID=sa; > PWD=XXXXXXX Try writing the connection string on one line and without whitespace. ODBC drivers sometimes have problems with this. > Connection pool entry: 0 > Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection > rejected by data source', 7952) This is a generic error that relates to authentication or firewall problems. It is possible that turning on ODBC tracing the ODBC manager will give more clues as to the real cause of the problem. > The odbc.ini definition for DSN "lixbox_sybase" is as follows: > > [lixbox_sybase] > JetFix = No > NoRowSetSizeLimit = No > Description = Test connection to listbox > Options = LIXBOX > DSQUERY = SQLSERVER > TDSHOST = lixbox > TDSPORT = 5000 > TDSVER = 5.0 > SQLSERVER_CATALOG = N > CURSOR_SENSITIVITY = LOW > UserName = sa > Password = XXXXXXXX > ServerType = Sybase 10/11/12 > Driver = /opt/openlink/lib/sql_mt_lt.so > Database = pubs2 > ReadOnly = no > NoAutoCommit = No > NoLoginBox = No > FetchBufferSize = 60 > > > Other relevant data: > - Connecting via OpenLink's iODBC > - Zope 2.7.6-final > - Python 2.3.4 > - Connection to Sybase has been successfully tested with iODBC, > including issuing a query > - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC > connection > > > > RJ Juneau > Chief Technology Officer > Maxxian Integration Inc. > 155 Westhampton Drive > Thornhill, Ontario > Canada L4J 7X2 > E-mail: rj@maxxian.com > Phone: +1 905 482 9429 > Cell: +1 416 897 6682 > Toll free: +1 866 758 9161 > Fax: +1 647 722 2038 > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 06 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From calisp at gmail.com Sun May 15 23:49:03 2005 From: calisp at gmail.com (calisp@gmail.com) Date: Sat Feb 4 08:09:26 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK Message-ID: Hi, I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the following error... 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the last phase of a two-phase commit. This shouldn't happen. Traceback (most recent call last): File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one jar.tpc_finish(self) File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish try: self._finish() File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could not perform COMMIT or ROLLBACK', 1023) What could be causing this? Can I get the mxODBCZopeDA source from somewhere? It would make debugging this much easier. Thanks, Calisp. From mal at egenix.com Mon May 16 13:52:12 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Feb 4 08:09:26 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK In-Reply-To: References: Message-ID: <42887B5C.4010109@egenix.com> calisp@gmail.com wrote: > Hi, > > I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with > unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the > following error... > > 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the > last phase of a two-phase commit. This shouldn't happen. > Traceback (most recent call last): > File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one > jar.tpc_finish(self) > File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish > try: self._finish() > File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish > File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler > ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could > not perform COMMIT or ROLLBACK', 1023) You should have a look at the database logs to see what prevented the commit from being completed. > What could be causing this? Hard to say: mxODBCZopeDA is trying to commit the transaction, but the driver or database failed to complete the request. The above error was generated by the ODBC driver. This could be network or DNS problems, or be related to a bug in FreeTDS (which is getting more stable with every new release, but should still be considered beta quality software at the moment). > Can I get the mxODBCZopeDA source from > somewhere? It would make debugging this much easier. Getting the source is not an option and won't help much either since the source of the problem is not mxODBCZopeDA. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 16 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Sun May 1 21:29:25 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Feb 4 12:03:11 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <427259F3.4090806@egenix.com> References: <20050427130906.52878.qmail@web30008.mail.mud.yahoo.com> <427259F3.4090806@egenix.com> Message-ID: <42752005.7080904@egenix.com> M.-A. Lemburg wrote: > David Rushby wrote: > >> --- "M.-A. Lemburg" wrote: >> >>> Are you using the standard mxDateTime build or one >>> with WANT_SUBCLASSABLE_TYPES defined... >> >> >> >> Presumably "the standard", since I just built with 'py24d setup.py >> build', making no attempt to enable special directives. >> >> >>> ... (mxDateTime_Deallocate is only used by the latter)? >> >> >> >> That's true in 2.1.0-2005-04-15, but not in 2.1.0b5. >> >> >>> In any case, please try our latest snapshot: >>> >>> >> >> http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-04-15.zip >> >>> to see if that makes any difference. >> >> >> >> I can't build it out of the box: > > > Hmm, looks like distutils' sdist command doesn't like our new > repository layout which uses symlinks (after we've switched to > subversion). > > We'll have to debug distutils first, I guess :-( Ok, we've found the problem and fixed it. Here's the new release (which does build out of the box at least on our boxes ;-): http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 01 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From davidrushby at yahoo.com Mon May 2 15:49:53 2005 From: davidrushby at yahoo.com (David Rushby) Date: Sat Feb 4 12:03:11 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Ok, we've found the problem and fixed it. Here's the new > release (which does build out of the box at least on our > boxes ;-): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip It does build now, but: py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" still behaves as it did when I submitted my original message: Fatal Python error: UNREF invalid object Aborted This is the same debug build of Python 2.4.1 that I was previously using, running the same configuration (CentOS Linux 4.0/i386, everything compiled with GCC 3.4.3). Have you examined my original claim as to the cause of the bug? __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 10:21:55 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Feb 4 12:03:11 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> References: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> Message-ID: <42772693.8050306@egenix.com> David Rushby wrote: > --- "M.-A. Lemburg" wrote: > >>Ok, we've found the problem and fixed it. Here's the new >>release (which does build out of the box at least on our >>boxes ;-): >> >> > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip > > It does build now, but: > py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" > still behaves as it did when I submitted my original message: > Fatal Python error: UNREF invalid object > Aborted > > This is the same debug build of Python 2.4.1 that I was previously > using, running the same configuration (CentOS Linux 4.0/i386, > everything compiled with GCC 3.4.3). > > Have you examined my original claim as to the cause of the bug? No. We haven't had time for looking into it. I'm not sure whether your analysis of the problem is correct: if you don't define WANT_SUBCLASSABLE_TYPES, the API mxDateTime_Deallocate() is neither defined nor used. Furthermore, PyObject_Del() is only called by mxDateTime_Free() if you have explicitely edited mxDateTime.c to disabled the free list #defines. In a standard build, PyObject_Del() is only called at module finalization time. Note that the reason we call mxDateTime_Free() in the constructor is that we don't want the destructor of the object to be called. Py_DECREF() would call the destructor (mxDateTime_Deallocate). It is possible that the debug code in Python complains about the refcount in the object not being 0 at the time the object is finalized (module finalization time), but I don't see any such checks in PyObject_Free() (which is what PyObject_Del() maps to). Again, all of this does not happen in regular non-debug Python builds. Please be aware that we don't support debug builds, so fixing the problem (if there is one - gcc has some serious optimization problems on some combinations of platform and version) will take a while. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 09:27:37 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Sat Feb 4 12:03:11 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 Message-ID: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Hi all- I am trying to build the mx-base package, v.2.0.6. This will be used with postgresql 7.3.9, psycopg 1.1.18, and Roundup 0.8.2. RHEL 3.0 Python 2.3 egenix-mx-base-2.0.6.tar.gz I performed a: /usr/local/bin/python2.3 setup.py install Everything looks proper with the exeception of this series of warning statements: ----------------- gcc -pthread -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fno-strict-aliasing -fPIC -Imx/BeeBase/mxBeeBase -I/usr/local/incl ude/python2.3 -I/usr/local/include -c mx/BeeBase/mxBeeBase/btr.c -o build/temp.linux-i686-2.3/mx/BeeBase/mxBeeBase/mxBeeBa se/mx/BeeBase/mxBeeBase/btr.o mx/BeeBase/mxBeeBase/btr.c: In function `dumpBuf': mx/BeeBase/mxBeeBase/btr.c:249: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:250: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:255: warning: unsigned int format, long unsigned int arg (arg 4) mx/BeeBase/mxBeeBase/btr.c:256: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c: In function `_validateTree': mx/BeeBase/mxBeeBase/btr.c:330: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:337: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:339: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:349: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:351: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 3) creating build/lib.linux-i686-2.3/mx/BeeBase creating build/lib.linux-i686-2.3/mx/BeeBase/mxBeeBase -------------- Would someone be kind enough to let me know whether these messages were expected, and if not, how I might resolve these? Thanks! DC __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 22:06:33 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Feb 4 12:03:12 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> References: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Message-ID: <4277CBB9.8020302@egenix.com> Dianne Chen wrote: > Hi all- > > I am trying to build the mx-base package, v.2.0.6. > This will be used with postgresql 7.3.9, psycopg > 1.1.18, and Roundup 0.8.2. > > RHEL 3.0 > Python 2.3 > egenix-mx-base-2.0.6.tar.gz > > I performed a: > > /usr/local/bin/python2.3 setup.py install > > Everything looks proper with the exeception of this > series of warning statements: > > ----------------- > ... > -------------- > > Would someone be kind enough to let me know whether > these messages were expected, and if not, how I might > resolve these? These warning can safely be ignored. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 13:41:14 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Sat Feb 4 12:03:12 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: 6667 Message-ID: <20050503194114.72091.qmail@web31414.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Dianne Chen wrote: > > Hi all- > > > > I am trying to build the mx-base package, v.2.0.6. > > This will be used with postgresql 7.3.9, psycopg > > 1.1.18, and Roundup 0.8.2. > > > > RHEL 3.0 > > Python 2.3 > > egenix-mx-base-2.0.6.tar.gz > > > > I performed a: > > > > /usr/local/bin/python2.3 setup.py install > > > > Everything looks proper with the exeception of > this > > series of warning statements: > > > > ----------------- > > ... > > -------------- > > > > Would someone be kind enough to let me know > whether > > these messages were expected, and if not, how I > might > > resolve these? > > These warning can safely be ignored. > > -- > Marc-Andre Lemburg > eGenix.com > Marc- Thank you very much for the reply. It helps greatly. With kind regards, DC __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From davidrushby at yahoo.com Tue May 3 17:18:46 2005 From: davidrushby at yahoo.com (David Rushby) Date: Sat Feb 4 12:03:12 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050503231846.35012.qmail@web30009.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > I'm not sure whether your analysis of the problem is correct... Indeed, my original analysis wasn't correct; I think this one is. The fatal error I'm complaining about only arises if the arguments to DateTime.DateTime are invalid, so that the object is deallocated in the onError block of mxDateTime_FromDateAndTime. If the object is created successfully, and later deallocated by Python's garbage collector, the fatal error doesn't arise. Here's my analysis of the problem: --- If the debugging directive Py_TRACE_REFS is enabled, as it is in my case, the Python interpreter maintains a doubly linked list of all Python objects (named refchain) via the _ob_next and _ob_prev pointers added to PyObject via _PyObject_HEAD_EXTRA. Each object is inserted into refchain by the _Py_AddToAllObjects call in _Py_NewReference, and removed from refchain by the _Py_ForgetReference call in _Py_Dealloc. _Py_ForgetReference performs an integrity check on the object being deallocated (op) to make sure that its neighbors in refchain recognize it. Specifically, _Py_ForgetReference verifies that the _ob_next pointer of the previous object in refchain (op->_ob_prev->_ob_next) points to op, and that the _ob_prev pointer of the next object in refchain (op->_ob_next->_ob_prev) points to op. If either of those conditions is false, the interpreter raises the fatal error I'm seeing. After mxDateTime_New pulls an mxDateTimeObject out of the free list, it calls _Py_NewReference on that object to transform it from a "conceptually deallocated" object to a "conceptually allocated" one. _Py_NewReference inserts the object into refchain. Later, when the object is being "conceptually deallocated", it should be removed from refchain with _Py_ForgetReference. The version of _Py_Dealloc that's active when Py_TRACE_REFS is enabled does this (_Py_Dealloc is the element of Py_DECREF that performs the actual destruction). _Py_Dealloc first calls _Py_ForgetReference to remove the object from refchain, then calls the object's destructor (op->ob_type->tp_dealloc). If WANT_SUBCLASSABLE_TYPES is not defined (it is not in my case), the destructor for mxDateTime_Type is mxDateTime_Free. So, if a DateTime object is deallocated normally, as a result of its reference count falling to zero, _Py_Dealloc is called on the object, which first removes it from refchain, then passes it to mxDateTime_Free. If a DateTime object is destroyed prematurely, as a result of invalid arguments to its destructor, the onError handler calls mxDateTime_Free, so the object is "conceptually deallocated" (placed in the free list), *but* the object is not removed from refchain. So if a refchain-membership-integrity-check is performed on the object in question or one of its immediate neighbors in refchain, that integrity check fails, leading to the fatal error. --- The solution is to 'Py_DECREF(...)' the object in the onError handler of its constructor, instead of passing the object directly to mxDateTime_Free. That change solves two problems: 1) It causes _Py_Dealloc to execute, which in turn executes _Py_ForgetReference, so the object is removed from refchain, as it should be. 2) At present, objects that are created successfully and later deallocated by normal reference count mechanics have a reference count of 0 when they enter the free list, whereas objects whose constructors abort their creation due to invalid arguments have a reference count of 1 when they enter the free list. Although AFAIK this doesn't cause an actual execution problem (because the object's reference count is *explicitly set to 1* rather than *incremented by 1* when the object is later "conceptually allocated" by _Py_NewReference), it is likely to confuse future maintainers and thereby lead to the introduction of an actual execution problem. I assume that if you agree that this is a reasonable solution, you'll want to apply the change not only to mxDateTime_FromDateAndTime, but to all similar constructors in mxDateTime.c. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From rj at maxxian.com Thu May 5 01:57:40 2005 From: rj at maxxian.com (RJ Juneau) Date: Sat Feb 4 12:03:12 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c5512e$f72798c0$6505a8c0@rjlaptop> I'm on the 30 day evaluation for mxodbc_zope_da. I'm getting the following error when I submit some queries: Error Type: KeyError Error Value: 'query' I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 with UCS4. The error seems to be caused by multiple rows being returned. I did see an earlier posting with the same error message. The response suggested a template error, but this is clearly not the case here. The additional evidence I've gathered so far: - I'm running the test directly from the ZSQL method, so there's no template involved. - If I use the same query with an additional "where" clause to ensure that only one row is returned, it works - If I use a value in the 'where' clause with no rows returned, it works - The same ZSQL query is being used on a Windows machine running Zope and the free ZODBC module without a problem - The query has been verified directly in mysql-client-browser Other info: - The database is MySQL 4.1.10A-0 - iODBC is the DB driver RJ Juneau -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050505/68d278bf/attachment-0090.htm From mal at egenix.com Thu May 5 12:37:43 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Feb 4 12:03:12 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c5512e$f72798c0$6505a8c0@rjlaptop> References: <000301c5512e$f72798c0$6505a8c0@rjlaptop> Message-ID: <4279E967.6010904@egenix.com> RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 > with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 09:37:42 2005 From: rj at maxxian.com (RJ Juneau) Date: Sat Feb 4 12:03:12 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000101c5516f$3b96de90$6505a8c0@rjlaptop> More interesting info on the problem: If I execute the query directly in the "test" window of the base eGenix mxODBC Database Connection window, it works fine and returns the 20 lines expected. That could point to a problem in the rendering, which seems to be where the traceback ends. Note that within the same Zope system I also have an ODBC connection to a Sybase database, and I have successfully tested multi-line ZSQL queries there. This is the traceback: Time 2005/05/05 07:55:15.294 GMT-4 Exception Type KeyError Exception Value 'query' Traceback (innermost last): Module ZPublisher.Publish, line 101, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 39, in call_object Module Shared.DC.ZRDB.DA, line 337, in manage_test Module DocumentTemplate.DT_String, line 474, in __call__ Module DocumentTemplate.DT_In, line 602, in renderwb Module DocumentTemplate.DT_Var, line 219, in render KeyError: 'query' I don't think the following is an issue, but I'll include it for completeness.I am also getting the following iODBC warnings and errors in the Zope console log, which are related to the ODBC parameters being passed by iODBC. Note that these errors also appear for all of the successful queries. [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (Setup). [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (UsageCount). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Timeout). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Reuse). As for the ZSQL snippet from the template... Since there's no template involved yet (I'm still testing directly from the ZSQL method), I assume you mean the SQL code? select h.host_name, s.system_name, s.system_handle, count(*) from terminal t, system_map s, host h where t.system_index = s.system_index and s.host_index = h.host_index group by s.system_name order by h.host_name Nothing complicated here. There are no parameters passed to the query. RJ -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: May 5, 2005 5:38 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: Re: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is > 2.3.4 with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ---------------------------------------------------------------------- > -- > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 16:00:32 2005 From: charlie at egenix.com (Charlie Clark) Date: Sat Feb 4 12:03:12 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000101c5516f$3b96de90$6505a8c0@rjlaptop> References: <000101c5516f$3b96de90$6505a8c0@rjlaptop> Message-ID: <20050505150032.644.1@bepc.1115296715.fake> On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base eGenix > mxODBC Database Connection window, it works fine and returns the 20 > lines expected. That could point to a problem in the rendering, which > seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection to > a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 10:22:17 2005 From: rj at maxxian.com (RJ Juneau) Date: Sat Feb 4 12:03:12 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505150032.644.1@bepc.1115296715.fake> Message-ID: <000201c55175$75bcad10$6505a8c0@rjlaptop> At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 11:47:14 2005 From: rj at maxxian.com (RJ Juneau) Date: Sat Feb 4 12:03:12 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c55181$549be0e0$6505a8c0@rjlaptop> Charlie, I found a fix. Here it is in case anyone else runs into this. You were correct - the problem is in another part of Zope. Based on your feedback, I did a bit more searching and found something here: http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. html The problem appears to be in Zope versions after 2.7.0. I'm running 2.7.6, and the post indicates that it also happens in 2.7.4. The solution: Edit file /lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. There are two lines in the file that start with . Edit them as follows: Change first line to: Change second line to: Just to be after, I shut down Zope before I made the changes and restarted it after. Thanks for the help! RJ -----Original Message----- From: RJ Juneau [mailto:rj@maxxian.com] Sent: May 5, 2005 9:22 AM To: 'Charlie Clark' Cc: 'egenix-users@lists.egenix.com' Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 17:57:25 2005 From: charlie at egenix.com (Charlie Clark) Date: Sat Feb 4 12:03:12 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <20050505165725.3380.2@bepc.1115296715.fake> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Thu May 5 09:15:21 2005 From: charlie at egenix.com (Charlie Clark) Date: Sat Feb 4 12:03:12 2006 Subject: [Zope-DB] RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <000001c55185$41477730$6b00a8c0@fonacier.local> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________ Zope-DB mailing list Zope-DB@zope.org http://mail.zope.org/mailman/listinfo/zope-db From rj at maxxian.com Thu May 5 12:38:00 2005 From: rj at maxxian.com (RJ Juneau) Date: Sat Feb 4 12:03:12 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000001c55188$6b841eb0$6505a8c0@rjlaptop> I just double-checked. Zope-2.7.6-final. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 12:49:16 2005 From: rj at maxxian.com (RJ Juneau) Date: Sat Feb 4 12:03:12 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000501c55189$fe149ba0$6505a8c0@rjlaptop> Charlie, The fix has only been applied for 2.7.7, 2.8b2. The info is in the original bug report which is closed and can be found here: http://www.zope.org/Collectors/Zope/1745 RJ -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Fri May 6 11:50:09 2005 From: rj at maxxian.com (RJ Juneau) Date: Sat Feb 4 12:03:12 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC Message-ID: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Still on eval for the product. I cannot get a stable connection to Sybase via the iODBC drivers. - The Sybase ODBC connection - including a query - have been verified at the iODBC level. - The setup is already working well for ODBC connection to MySQL. Symptoms include: - If I click on "Open Connection", it still comes back with "Connection Closed" when I go to a ZSQL method - Using 'Connect on Demand' is not working either. - Clicking "Open Connection" gives me the following error: Connection string: DSN=lixbox_sybase; UID=sa; PWD=XXXXXXX Connection pool entry: 0 Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection rejected by data source', 7952) The odbc.ini definition for DSN "lixbox_sybase" is as follows: [lixbox_sybase] JetFix = No NoRowSetSizeLimit = No Description = Test connection to listbox Options = LIXBOX DSQUERY = SQLSERVER TDSHOST = lixbox TDSPORT = 5000 TDSVER = 5.0 SQLSERVER_CATALOG = N CURSOR_SENSITIVITY = LOW UserName = sa Password = XXXXXXXX ServerType = Sybase 10/11/12 Driver = /opt/openlink/lib/sql_mt_lt.so Database = pubs2 ReadOnly = no NoAutoCommit = No NoLoginBox = No FetchBufferSize = 60 Other relevant data: - Connecting via OpenLink's iODBC - Zope 2.7.6-final - Python 2.3.4 - Connection to Sybase has been successfully tested with iODBC, including issuing a query - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC connection RJ Juneau Chief Technology Officer Maxxian Integration Inc. 155 Westhampton Drive Thornhill, Ontario Canada L4J 7X2 E-mail: rj@maxxian.com Phone: +1 905 482 9429 Cell: +1 416 897 6682 Toll free: +1 866 758 9161 Fax: +1 647 722 2038 -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050506/aef33361/attachment-0090.htm From mal at egenix.com Fri May 6 18:27:37 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Feb 4 12:03:12 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC In-Reply-To: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> References: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Message-ID: <427B8CE9.1010601@egenix.com> RJ Juneau wrote: > Still on eval for the product. > > I cannot get a stable connection to Sybase via the iODBC drivers. > > - The Sybase ODBC connection - including a query - have been verified at > the iODBC level. > - The setup is already working well for ODBC connection to MySQL. > > Symptoms include: > > - If I click on "Open Connection", it still comes back with "Connection > Closed" when I go to a ZSQL method > - Using 'Connect on Demand' is not working either. > - Clicking "Open Connection" gives me the following error: > > Connection string: DSN=lixbox_sybase; > UID=sa; > PWD=XXXXXXX Try writing the connection string on one line and without whitespace. ODBC drivers sometimes have problems with this. > Connection pool entry: 0 > Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection > rejected by data source', 7952) This is a generic error that relates to authentication or firewall problems. It is possible that turning on ODBC tracing the ODBC manager will give more clues as to the real cause of the problem. > The odbc.ini definition for DSN "lixbox_sybase" is as follows: > > [lixbox_sybase] > JetFix = No > NoRowSetSizeLimit = No > Description = Test connection to listbox > Options = LIXBOX > DSQUERY = SQLSERVER > TDSHOST = lixbox > TDSPORT = 5000 > TDSVER = 5.0 > SQLSERVER_CATALOG = N > CURSOR_SENSITIVITY = LOW > UserName = sa > Password = XXXXXXXX > ServerType = Sybase 10/11/12 > Driver = /opt/openlink/lib/sql_mt_lt.so > Database = pubs2 > ReadOnly = no > NoAutoCommit = No > NoLoginBox = No > FetchBufferSize = 60 > > > Other relevant data: > - Connecting via OpenLink's iODBC > - Zope 2.7.6-final > - Python 2.3.4 > - Connection to Sybase has been successfully tested with iODBC, > including issuing a query > - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC > connection > > > > RJ Juneau > Chief Technology Officer > Maxxian Integration Inc. > 155 Westhampton Drive > Thornhill, Ontario > Canada L4J 7X2 > E-mail: rj@maxxian.com > Phone: +1 905 482 9429 > Cell: +1 416 897 6682 > Toll free: +1 866 758 9161 > Fax: +1 647 722 2038 > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 06 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From calisp at gmail.com Sun May 15 23:49:03 2005 From: calisp at gmail.com (calisp@gmail.com) Date: Sat Feb 4 12:03:12 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK Message-ID: Hi, I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the following error... 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the last phase of a two-phase commit. This shouldn't happen. Traceback (most recent call last): File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one jar.tpc_finish(self) File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish try: self._finish() File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could not perform COMMIT or ROLLBACK', 1023) What could be causing this? Can I get the mxODBCZopeDA source from somewhere? It would make debugging this much easier. Thanks, Calisp. From mal at egenix.com Mon May 16 13:52:12 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Feb 4 12:03:12 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK In-Reply-To: References: Message-ID: <42887B5C.4010109@egenix.com> calisp@gmail.com wrote: > Hi, > > I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with > unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the > following error... > > 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the > last phase of a two-phase commit. This shouldn't happen. > Traceback (most recent call last): > File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one > jar.tpc_finish(self) > File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish > try: self._finish() > File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish > File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler > ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could > not perform COMMIT or ROLLBACK', 1023) You should have a look at the database logs to see what prevented the commit from being completed. > What could be causing this? Hard to say: mxODBCZopeDA is trying to commit the transaction, but the driver or database failed to complete the request. The above error was generated by the ODBC driver. This could be network or DNS problems, or be related to a bug in FreeTDS (which is getting more stable with every new release, but should still be considered beta quality software at the moment). > Can I get the mxODBCZopeDA source from > somewhere? It would make debugging this much easier. Getting the source is not an option and won't help much either since the source of the problem is not mxODBCZopeDA. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 16 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Sun May 1 21:29:25 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Feb 4 16:01:27 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <427259F3.4090806@egenix.com> References: <20050427130906.52878.qmail@web30008.mail.mud.yahoo.com> <427259F3.4090806@egenix.com> Message-ID: <42752005.7080904@egenix.com> M.-A. Lemburg wrote: > David Rushby wrote: > >> --- "M.-A. Lemburg" wrote: >> >>> Are you using the standard mxDateTime build or one >>> with WANT_SUBCLASSABLE_TYPES defined... >> >> >> >> Presumably "the standard", since I just built with 'py24d setup.py >> build', making no attempt to enable special directives. >> >> >>> ... (mxDateTime_Deallocate is only used by the latter)? >> >> >> >> That's true in 2.1.0-2005-04-15, but not in 2.1.0b5. >> >> >>> In any case, please try our latest snapshot: >>> >>> >> >> http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-04-15.zip >> >>> to see if that makes any difference. >> >> >> >> I can't build it out of the box: > > > Hmm, looks like distutils' sdist command doesn't like our new > repository layout which uses symlinks (after we've switched to > subversion). > > We'll have to debug distutils first, I guess :-( Ok, we've found the problem and fixed it. Here's the new release (which does build out of the box at least on our boxes ;-): http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 01 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From davidrushby at yahoo.com Mon May 2 15:49:53 2005 From: davidrushby at yahoo.com (David Rushby) Date: Sat Feb 4 16:01:27 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Ok, we've found the problem and fixed it. Here's the new > release (which does build out of the box at least on our > boxes ;-): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip It does build now, but: py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" still behaves as it did when I submitted my original message: Fatal Python error: UNREF invalid object Aborted This is the same debug build of Python 2.4.1 that I was previously using, running the same configuration (CentOS Linux 4.0/i386, everything compiled with GCC 3.4.3). Have you examined my original claim as to the cause of the bug? __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 10:21:55 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Feb 4 16:01:27 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> References: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> Message-ID: <42772693.8050306@egenix.com> David Rushby wrote: > --- "M.-A. Lemburg" wrote: > >>Ok, we've found the problem and fixed it. Here's the new >>release (which does build out of the box at least on our >>boxes ;-): >> >> > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip > > It does build now, but: > py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" > still behaves as it did when I submitted my original message: > Fatal Python error: UNREF invalid object > Aborted > > This is the same debug build of Python 2.4.1 that I was previously > using, running the same configuration (CentOS Linux 4.0/i386, > everything compiled with GCC 3.4.3). > > Have you examined my original claim as to the cause of the bug? No. We haven't had time for looking into it. I'm not sure whether your analysis of the problem is correct: if you don't define WANT_SUBCLASSABLE_TYPES, the API mxDateTime_Deallocate() is neither defined nor used. Furthermore, PyObject_Del() is only called by mxDateTime_Free() if you have explicitely edited mxDateTime.c to disabled the free list #defines. In a standard build, PyObject_Del() is only called at module finalization time. Note that the reason we call mxDateTime_Free() in the constructor is that we don't want the destructor of the object to be called. Py_DECREF() would call the destructor (mxDateTime_Deallocate). It is possible that the debug code in Python complains about the refcount in the object not being 0 at the time the object is finalized (module finalization time), but I don't see any such checks in PyObject_Free() (which is what PyObject_Del() maps to). Again, all of this does not happen in regular non-debug Python builds. Please be aware that we don't support debug builds, so fixing the problem (if there is one - gcc has some serious optimization problems on some combinations of platform and version) will take a while. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 09:27:37 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Sat Feb 4 16:01:27 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 Message-ID: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Hi all- I am trying to build the mx-base package, v.2.0.6. This will be used with postgresql 7.3.9, psycopg 1.1.18, and Roundup 0.8.2. RHEL 3.0 Python 2.3 egenix-mx-base-2.0.6.tar.gz I performed a: /usr/local/bin/python2.3 setup.py install Everything looks proper with the exeception of this series of warning statements: ----------------- gcc -pthread -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fno-strict-aliasing -fPIC -Imx/BeeBase/mxBeeBase -I/usr/local/incl ude/python2.3 -I/usr/local/include -c mx/BeeBase/mxBeeBase/btr.c -o build/temp.linux-i686-2.3/mx/BeeBase/mxBeeBase/mxBeeBa se/mx/BeeBase/mxBeeBase/btr.o mx/BeeBase/mxBeeBase/btr.c: In function `dumpBuf': mx/BeeBase/mxBeeBase/btr.c:249: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:250: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:255: warning: unsigned int format, long unsigned int arg (arg 4) mx/BeeBase/mxBeeBase/btr.c:256: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c: In function `_validateTree': mx/BeeBase/mxBeeBase/btr.c:330: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:337: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:339: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:349: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:351: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 3) creating build/lib.linux-i686-2.3/mx/BeeBase creating build/lib.linux-i686-2.3/mx/BeeBase/mxBeeBase -------------- Would someone be kind enough to let me know whether these messages were expected, and if not, how I might resolve these? Thanks! DC __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 22:06:33 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Feb 4 16:01:27 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> References: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Message-ID: <4277CBB9.8020302@egenix.com> Dianne Chen wrote: > Hi all- > > I am trying to build the mx-base package, v.2.0.6. > This will be used with postgresql 7.3.9, psycopg > 1.1.18, and Roundup 0.8.2. > > RHEL 3.0 > Python 2.3 > egenix-mx-base-2.0.6.tar.gz > > I performed a: > > /usr/local/bin/python2.3 setup.py install > > Everything looks proper with the exeception of this > series of warning statements: > > ----------------- > ... > -------------- > > Would someone be kind enough to let me know whether > these messages were expected, and if not, how I might > resolve these? These warning can safely be ignored. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 13:41:14 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Sat Feb 4 16:01:27 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: 6667 Message-ID: <20050503194114.72091.qmail@web31414.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Dianne Chen wrote: > > Hi all- > > > > I am trying to build the mx-base package, v.2.0.6. > > This will be used with postgresql 7.3.9, psycopg > > 1.1.18, and Roundup 0.8.2. > > > > RHEL 3.0 > > Python 2.3 > > egenix-mx-base-2.0.6.tar.gz > > > > I performed a: > > > > /usr/local/bin/python2.3 setup.py install > > > > Everything looks proper with the exeception of > this > > series of warning statements: > > > > ----------------- > > ... > > -------------- > > > > Would someone be kind enough to let me know > whether > > these messages were expected, and if not, how I > might > > resolve these? > > These warning can safely be ignored. > > -- > Marc-Andre Lemburg > eGenix.com > Marc- Thank you very much for the reply. It helps greatly. With kind regards, DC __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From davidrushby at yahoo.com Tue May 3 17:18:46 2005 From: davidrushby at yahoo.com (David Rushby) Date: Sat Feb 4 16:01:27 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050503231846.35012.qmail@web30009.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > I'm not sure whether your analysis of the problem is correct... Indeed, my original analysis wasn't correct; I think this one is. The fatal error I'm complaining about only arises if the arguments to DateTime.DateTime are invalid, so that the object is deallocated in the onError block of mxDateTime_FromDateAndTime. If the object is created successfully, and later deallocated by Python's garbage collector, the fatal error doesn't arise. Here's my analysis of the problem: --- If the debugging directive Py_TRACE_REFS is enabled, as it is in my case, the Python interpreter maintains a doubly linked list of all Python objects (named refchain) via the _ob_next and _ob_prev pointers added to PyObject via _PyObject_HEAD_EXTRA. Each object is inserted into refchain by the _Py_AddToAllObjects call in _Py_NewReference, and removed from refchain by the _Py_ForgetReference call in _Py_Dealloc. _Py_ForgetReference performs an integrity check on the object being deallocated (op) to make sure that its neighbors in refchain recognize it. Specifically, _Py_ForgetReference verifies that the _ob_next pointer of the previous object in refchain (op->_ob_prev->_ob_next) points to op, and that the _ob_prev pointer of the next object in refchain (op->_ob_next->_ob_prev) points to op. If either of those conditions is false, the interpreter raises the fatal error I'm seeing. After mxDateTime_New pulls an mxDateTimeObject out of the free list, it calls _Py_NewReference on that object to transform it from a "conceptually deallocated" object to a "conceptually allocated" one. _Py_NewReference inserts the object into refchain. Later, when the object is being "conceptually deallocated", it should be removed from refchain with _Py_ForgetReference. The version of _Py_Dealloc that's active when Py_TRACE_REFS is enabled does this (_Py_Dealloc is the element of Py_DECREF that performs the actual destruction). _Py_Dealloc first calls _Py_ForgetReference to remove the object from refchain, then calls the object's destructor (op->ob_type->tp_dealloc). If WANT_SUBCLASSABLE_TYPES is not defined (it is not in my case), the destructor for mxDateTime_Type is mxDateTime_Free. So, if a DateTime object is deallocated normally, as a result of its reference count falling to zero, _Py_Dealloc is called on the object, which first removes it from refchain, then passes it to mxDateTime_Free. If a DateTime object is destroyed prematurely, as a result of invalid arguments to its destructor, the onError handler calls mxDateTime_Free, so the object is "conceptually deallocated" (placed in the free list), *but* the object is not removed from refchain. So if a refchain-membership-integrity-check is performed on the object in question or one of its immediate neighbors in refchain, that integrity check fails, leading to the fatal error. --- The solution is to 'Py_DECREF(...)' the object in the onError handler of its constructor, instead of passing the object directly to mxDateTime_Free. That change solves two problems: 1) It causes _Py_Dealloc to execute, which in turn executes _Py_ForgetReference, so the object is removed from refchain, as it should be. 2) At present, objects that are created successfully and later deallocated by normal reference count mechanics have a reference count of 0 when they enter the free list, whereas objects whose constructors abort their creation due to invalid arguments have a reference count of 1 when they enter the free list. Although AFAIK this doesn't cause an actual execution problem (because the object's reference count is *explicitly set to 1* rather than *incremented by 1* when the object is later "conceptually allocated" by _Py_NewReference), it is likely to confuse future maintainers and thereby lead to the introduction of an actual execution problem. I assume that if you agree that this is a reasonable solution, you'll want to apply the change not only to mxDateTime_FromDateAndTime, but to all similar constructors in mxDateTime.c. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From rj at maxxian.com Thu May 5 01:57:40 2005 From: rj at maxxian.com (RJ Juneau) Date: Sat Feb 4 16:01:27 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c5512e$f72798c0$6505a8c0@rjlaptop> I'm on the 30 day evaluation for mxodbc_zope_da. I'm getting the following error when I submit some queries: Error Type: KeyError Error Value: 'query' I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 with UCS4. The error seems to be caused by multiple rows being returned. I did see an earlier posting with the same error message. The response suggested a template error, but this is clearly not the case here. The additional evidence I've gathered so far: - I'm running the test directly from the ZSQL method, so there's no template involved. - If I use the same query with an additional "where" clause to ensure that only one row is returned, it works - If I use a value in the 'where' clause with no rows returned, it works - The same ZSQL query is being used on a Windows machine running Zope and the free ZODBC module without a problem - The query has been verified directly in mysql-client-browser Other info: - The database is MySQL 4.1.10A-0 - iODBC is the DB driver RJ Juneau -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050505/68d278bf/attachment-0091.htm From mal at egenix.com Thu May 5 12:37:43 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Feb 4 16:01:27 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c5512e$f72798c0$6505a8c0@rjlaptop> References: <000301c5512e$f72798c0$6505a8c0@rjlaptop> Message-ID: <4279E967.6010904@egenix.com> RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 > with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 09:37:42 2005 From: rj at maxxian.com (RJ Juneau) Date: Sat Feb 4 16:01:27 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000101c5516f$3b96de90$6505a8c0@rjlaptop> More interesting info on the problem: If I execute the query directly in the "test" window of the base eGenix mxODBC Database Connection window, it works fine and returns the 20 lines expected. That could point to a problem in the rendering, which seems to be where the traceback ends. Note that within the same Zope system I also have an ODBC connection to a Sybase database, and I have successfully tested multi-line ZSQL queries there. This is the traceback: Time 2005/05/05 07:55:15.294 GMT-4 Exception Type KeyError Exception Value 'query' Traceback (innermost last): Module ZPublisher.Publish, line 101, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 39, in call_object Module Shared.DC.ZRDB.DA, line 337, in manage_test Module DocumentTemplate.DT_String, line 474, in __call__ Module DocumentTemplate.DT_In, line 602, in renderwb Module DocumentTemplate.DT_Var, line 219, in render KeyError: 'query' I don't think the following is an issue, but I'll include it for completeness.I am also getting the following iODBC warnings and errors in the Zope console log, which are related to the ODBC parameters being passed by iODBC. Note that these errors also appear for all of the successful queries. [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (Setup). [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (UsageCount). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Timeout). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Reuse). As for the ZSQL snippet from the template... Since there's no template involved yet (I'm still testing directly from the ZSQL method), I assume you mean the SQL code? select h.host_name, s.system_name, s.system_handle, count(*) from terminal t, system_map s, host h where t.system_index = s.system_index and s.host_index = h.host_index group by s.system_name order by h.host_name Nothing complicated here. There are no parameters passed to the query. RJ -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: May 5, 2005 5:38 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: Re: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is > 2.3.4 with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ---------------------------------------------------------------------- > -- > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 16:00:32 2005 From: charlie at egenix.com (Charlie Clark) Date: Sat Feb 4 16:01:27 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000101c5516f$3b96de90$6505a8c0@rjlaptop> References: <000101c5516f$3b96de90$6505a8c0@rjlaptop> Message-ID: <20050505150032.644.1@bepc.1115296715.fake> On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base eGenix > mxODBC Database Connection window, it works fine and returns the 20 > lines expected. That could point to a problem in the rendering, which > seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection to > a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 10:22:17 2005 From: rj at maxxian.com (RJ Juneau) Date: Sat Feb 4 16:01:27 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505150032.644.1@bepc.1115296715.fake> Message-ID: <000201c55175$75bcad10$6505a8c0@rjlaptop> At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 11:47:14 2005 From: rj at maxxian.com (RJ Juneau) Date: Sat Feb 4 16:01:27 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c55181$549be0e0$6505a8c0@rjlaptop> Charlie, I found a fix. Here it is in case anyone else runs into this. You were correct - the problem is in another part of Zope. Based on your feedback, I did a bit more searching and found something here: http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. html The problem appears to be in Zope versions after 2.7.0. I'm running 2.7.6, and the post indicates that it also happens in 2.7.4. The solution: Edit file /lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. There are two lines in the file that start with . Edit them as follows: Change first line to: Change second line to: Just to be after, I shut down Zope before I made the changes and restarted it after. Thanks for the help! RJ -----Original Message----- From: RJ Juneau [mailto:rj@maxxian.com] Sent: May 5, 2005 9:22 AM To: 'Charlie Clark' Cc: 'egenix-users@lists.egenix.com' Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 17:57:25 2005 From: charlie at egenix.com (Charlie Clark) Date: Sat Feb 4 16:01:27 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <20050505165725.3380.2@bepc.1115296715.fake> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Thu May 5 09:15:21 2005 From: charlie at egenix.com (Charlie Clark) Date: Sat Feb 4 16:01:27 2006 Subject: [Zope-DB] RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <000001c55185$41477730$6b00a8c0@fonacier.local> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________ Zope-DB mailing list Zope-DB@zope.org http://mail.zope.org/mailman/listinfo/zope-db From rj at maxxian.com Thu May 5 12:38:00 2005 From: rj at maxxian.com (RJ Juneau) Date: Sat Feb 4 16:01:27 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000001c55188$6b841eb0$6505a8c0@rjlaptop> I just double-checked. Zope-2.7.6-final. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 12:49:16 2005 From: rj at maxxian.com (RJ Juneau) Date: Sat Feb 4 16:01:27 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000501c55189$fe149ba0$6505a8c0@rjlaptop> Charlie, The fix has only been applied for 2.7.7, 2.8b2. The info is in the original bug report which is closed and can be found here: http://www.zope.org/Collectors/Zope/1745 RJ -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Fri May 6 11:50:09 2005 From: rj at maxxian.com (RJ Juneau) Date: Sat Feb 4 16:01:27 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC Message-ID: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Still on eval for the product. I cannot get a stable connection to Sybase via the iODBC drivers. - The Sybase ODBC connection - including a query - have been verified at the iODBC level. - The setup is already working well for ODBC connection to MySQL. Symptoms include: - If I click on "Open Connection", it still comes back with "Connection Closed" when I go to a ZSQL method - Using 'Connect on Demand' is not working either. - Clicking "Open Connection" gives me the following error: Connection string: DSN=lixbox_sybase; UID=sa; PWD=XXXXXXX Connection pool entry: 0 Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection rejected by data source', 7952) The odbc.ini definition for DSN "lixbox_sybase" is as follows: [lixbox_sybase] JetFix = No NoRowSetSizeLimit = No Description = Test connection to listbox Options = LIXBOX DSQUERY = SQLSERVER TDSHOST = lixbox TDSPORT = 5000 TDSVER = 5.0 SQLSERVER_CATALOG = N CURSOR_SENSITIVITY = LOW UserName = sa Password = XXXXXXXX ServerType = Sybase 10/11/12 Driver = /opt/openlink/lib/sql_mt_lt.so Database = pubs2 ReadOnly = no NoAutoCommit = No NoLoginBox = No FetchBufferSize = 60 Other relevant data: - Connecting via OpenLink's iODBC - Zope 2.7.6-final - Python 2.3.4 - Connection to Sybase has been successfully tested with iODBC, including issuing a query - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC connection RJ Juneau Chief Technology Officer Maxxian Integration Inc. 155 Westhampton Drive Thornhill, Ontario Canada L4J 7X2 E-mail: rj@maxxian.com Phone: +1 905 482 9429 Cell: +1 416 897 6682 Toll free: +1 866 758 9161 Fax: +1 647 722 2038 -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050506/aef33361/attachment-0091.htm From mal at egenix.com Fri May 6 18:27:37 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Feb 4 16:01:27 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC In-Reply-To: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> References: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Message-ID: <427B8CE9.1010601@egenix.com> RJ Juneau wrote: > Still on eval for the product. > > I cannot get a stable connection to Sybase via the iODBC drivers. > > - The Sybase ODBC connection - including a query - have been verified at > the iODBC level. > - The setup is already working well for ODBC connection to MySQL. > > Symptoms include: > > - If I click on "Open Connection", it still comes back with "Connection > Closed" when I go to a ZSQL method > - Using 'Connect on Demand' is not working either. > - Clicking "Open Connection" gives me the following error: > > Connection string: DSN=lixbox_sybase; > UID=sa; > PWD=XXXXXXX Try writing the connection string on one line and without whitespace. ODBC drivers sometimes have problems with this. > Connection pool entry: 0 > Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection > rejected by data source', 7952) This is a generic error that relates to authentication or firewall problems. It is possible that turning on ODBC tracing the ODBC manager will give more clues as to the real cause of the problem. > The odbc.ini definition for DSN "lixbox_sybase" is as follows: > > [lixbox_sybase] > JetFix = No > NoRowSetSizeLimit = No > Description = Test connection to listbox > Options = LIXBOX > DSQUERY = SQLSERVER > TDSHOST = lixbox > TDSPORT = 5000 > TDSVER = 5.0 > SQLSERVER_CATALOG = N > CURSOR_SENSITIVITY = LOW > UserName = sa > Password = XXXXXXXX > ServerType = Sybase 10/11/12 > Driver = /opt/openlink/lib/sql_mt_lt.so > Database = pubs2 > ReadOnly = no > NoAutoCommit = No > NoLoginBox = No > FetchBufferSize = 60 > > > Other relevant data: > - Connecting via OpenLink's iODBC > - Zope 2.7.6-final > - Python 2.3.4 > - Connection to Sybase has been successfully tested with iODBC, > including issuing a query > - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC > connection > > > > RJ Juneau > Chief Technology Officer > Maxxian Integration Inc. > 155 Westhampton Drive > Thornhill, Ontario > Canada L4J 7X2 > E-mail: rj@maxxian.com > Phone: +1 905 482 9429 > Cell: +1 416 897 6682 > Toll free: +1 866 758 9161 > Fax: +1 647 722 2038 > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 06 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From calisp at gmail.com Sun May 15 23:49:03 2005 From: calisp at gmail.com (calisp@gmail.com) Date: Sat Feb 4 16:01:27 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK Message-ID: Hi, I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the following error... 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the last phase of a two-phase commit. This shouldn't happen. Traceback (most recent call last): File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one jar.tpc_finish(self) File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish try: self._finish() File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could not perform COMMIT or ROLLBACK', 1023) What could be causing this? Can I get the mxODBCZopeDA source from somewhere? It would make debugging this much easier. Thanks, Calisp. From mal at egenix.com Mon May 16 13:52:12 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Feb 4 16:01:27 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK In-Reply-To: References: Message-ID: <42887B5C.4010109@egenix.com> calisp@gmail.com wrote: > Hi, > > I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with > unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the > following error... > > 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the > last phase of a two-phase commit. This shouldn't happen. > Traceback (most recent call last): > File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one > jar.tpc_finish(self) > File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish > try: self._finish() > File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish > File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler > ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could > not perform COMMIT or ROLLBACK', 1023) You should have a look at the database logs to see what prevented the commit from being completed. > What could be causing this? Hard to say: mxODBCZopeDA is trying to commit the transaction, but the driver or database failed to complete the request. The above error was generated by the ODBC driver. This could be network or DNS problems, or be related to a bug in FreeTDS (which is getting more stable with every new release, but should still be considered beta quality software at the moment). > Can I get the mxODBCZopeDA source from > somewhere? It would make debugging this much easier. Getting the source is not an option and won't help much either since the source of the problem is not mxODBCZopeDA. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 16 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Sun May 1 21:29:25 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Feb 4 20:01:17 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <427259F3.4090806@egenix.com> References: <20050427130906.52878.qmail@web30008.mail.mud.yahoo.com> <427259F3.4090806@egenix.com> Message-ID: <42752005.7080904@egenix.com> M.-A. Lemburg wrote: > David Rushby wrote: > >> --- "M.-A. Lemburg" wrote: >> >>> Are you using the standard mxDateTime build or one >>> with WANT_SUBCLASSABLE_TYPES defined... >> >> >> >> Presumably "the standard", since I just built with 'py24d setup.py >> build', making no attempt to enable special directives. >> >> >>> ... (mxDateTime_Deallocate is only used by the latter)? >> >> >> >> That's true in 2.1.0-2005-04-15, but not in 2.1.0b5. >> >> >>> In any case, please try our latest snapshot: >>> >>> >> >> http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-04-15.zip >> >>> to see if that makes any difference. >> >> >> >> I can't build it out of the box: > > > Hmm, looks like distutils' sdist command doesn't like our new > repository layout which uses symlinks (after we've switched to > subversion). > > We'll have to debug distutils first, I guess :-( Ok, we've found the problem and fixed it. Here's the new release (which does build out of the box at least on our boxes ;-): http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 01 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From davidrushby at yahoo.com Mon May 2 15:49:53 2005 From: davidrushby at yahoo.com (David Rushby) Date: Sat Feb 4 20:01:17 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Ok, we've found the problem and fixed it. Here's the new > release (which does build out of the box at least on our > boxes ;-): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip It does build now, but: py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" still behaves as it did when I submitted my original message: Fatal Python error: UNREF invalid object Aborted This is the same debug build of Python 2.4.1 that I was previously using, running the same configuration (CentOS Linux 4.0/i386, everything compiled with GCC 3.4.3). Have you examined my original claim as to the cause of the bug? __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 10:21:55 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Feb 4 20:01:17 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> References: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> Message-ID: <42772693.8050306@egenix.com> David Rushby wrote: > --- "M.-A. Lemburg" wrote: > >>Ok, we've found the problem and fixed it. Here's the new >>release (which does build out of the box at least on our >>boxes ;-): >> >> > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip > > It does build now, but: > py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" > still behaves as it did when I submitted my original message: > Fatal Python error: UNREF invalid object > Aborted > > This is the same debug build of Python 2.4.1 that I was previously > using, running the same configuration (CentOS Linux 4.0/i386, > everything compiled with GCC 3.4.3). > > Have you examined my original claim as to the cause of the bug? No. We haven't had time for looking into it. I'm not sure whether your analysis of the problem is correct: if you don't define WANT_SUBCLASSABLE_TYPES, the API mxDateTime_Deallocate() is neither defined nor used. Furthermore, PyObject_Del() is only called by mxDateTime_Free() if you have explicitely edited mxDateTime.c to disabled the free list #defines. In a standard build, PyObject_Del() is only called at module finalization time. Note that the reason we call mxDateTime_Free() in the constructor is that we don't want the destructor of the object to be called. Py_DECREF() would call the destructor (mxDateTime_Deallocate). It is possible that the debug code in Python complains about the refcount in the object not being 0 at the time the object is finalized (module finalization time), but I don't see any such checks in PyObject_Free() (which is what PyObject_Del() maps to). Again, all of this does not happen in regular non-debug Python builds. Please be aware that we don't support debug builds, so fixing the problem (if there is one - gcc has some serious optimization problems on some combinations of platform and version) will take a while. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 09:27:37 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Sat Feb 4 20:01:17 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 Message-ID: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Hi all- I am trying to build the mx-base package, v.2.0.6. This will be used with postgresql 7.3.9, psycopg 1.1.18, and Roundup 0.8.2. RHEL 3.0 Python 2.3 egenix-mx-base-2.0.6.tar.gz I performed a: /usr/local/bin/python2.3 setup.py install Everything looks proper with the exeception of this series of warning statements: ----------------- gcc -pthread -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fno-strict-aliasing -fPIC -Imx/BeeBase/mxBeeBase -I/usr/local/incl ude/python2.3 -I/usr/local/include -c mx/BeeBase/mxBeeBase/btr.c -o build/temp.linux-i686-2.3/mx/BeeBase/mxBeeBase/mxBeeBa se/mx/BeeBase/mxBeeBase/btr.o mx/BeeBase/mxBeeBase/btr.c: In function `dumpBuf': mx/BeeBase/mxBeeBase/btr.c:249: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:250: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:255: warning: unsigned int format, long unsigned int arg (arg 4) mx/BeeBase/mxBeeBase/btr.c:256: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c: In function `_validateTree': mx/BeeBase/mxBeeBase/btr.c:330: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:337: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:339: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:349: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:351: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 3) creating build/lib.linux-i686-2.3/mx/BeeBase creating build/lib.linux-i686-2.3/mx/BeeBase/mxBeeBase -------------- Would someone be kind enough to let me know whether these messages were expected, and if not, how I might resolve these? Thanks! DC __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 22:06:33 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Feb 4 20:01:17 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> References: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Message-ID: <4277CBB9.8020302@egenix.com> Dianne Chen wrote: > Hi all- > > I am trying to build the mx-base package, v.2.0.6. > This will be used with postgresql 7.3.9, psycopg > 1.1.18, and Roundup 0.8.2. > > RHEL 3.0 > Python 2.3 > egenix-mx-base-2.0.6.tar.gz > > I performed a: > > /usr/local/bin/python2.3 setup.py install > > Everything looks proper with the exeception of this > series of warning statements: > > ----------------- > ... > -------------- > > Would someone be kind enough to let me know whether > these messages were expected, and if not, how I might > resolve these? These warning can safely be ignored. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 13:41:14 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Sat Feb 4 20:01:17 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: 6667 Message-ID: <20050503194114.72091.qmail@web31414.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Dianne Chen wrote: > > Hi all- > > > > I am trying to build the mx-base package, v.2.0.6. > > This will be used with postgresql 7.3.9, psycopg > > 1.1.18, and Roundup 0.8.2. > > > > RHEL 3.0 > > Python 2.3 > > egenix-mx-base-2.0.6.tar.gz > > > > I performed a: > > > > /usr/local/bin/python2.3 setup.py install > > > > Everything looks proper with the exeception of > this > > series of warning statements: > > > > ----------------- > > ... > > -------------- > > > > Would someone be kind enough to let me know > whether > > these messages were expected, and if not, how I > might > > resolve these? > > These warning can safely be ignored. > > -- > Marc-Andre Lemburg > eGenix.com > Marc- Thank you very much for the reply. It helps greatly. With kind regards, DC __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From davidrushby at yahoo.com Tue May 3 17:18:46 2005 From: davidrushby at yahoo.com (David Rushby) Date: Sat Feb 4 20:01:17 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050503231846.35012.qmail@web30009.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > I'm not sure whether your analysis of the problem is correct... Indeed, my original analysis wasn't correct; I think this one is. The fatal error I'm complaining about only arises if the arguments to DateTime.DateTime are invalid, so that the object is deallocated in the onError block of mxDateTime_FromDateAndTime. If the object is created successfully, and later deallocated by Python's garbage collector, the fatal error doesn't arise. Here's my analysis of the problem: --- If the debugging directive Py_TRACE_REFS is enabled, as it is in my case, the Python interpreter maintains a doubly linked list of all Python objects (named refchain) via the _ob_next and _ob_prev pointers added to PyObject via _PyObject_HEAD_EXTRA. Each object is inserted into refchain by the _Py_AddToAllObjects call in _Py_NewReference, and removed from refchain by the _Py_ForgetReference call in _Py_Dealloc. _Py_ForgetReference performs an integrity check on the object being deallocated (op) to make sure that its neighbors in refchain recognize it. Specifically, _Py_ForgetReference verifies that the _ob_next pointer of the previous object in refchain (op->_ob_prev->_ob_next) points to op, and that the _ob_prev pointer of the next object in refchain (op->_ob_next->_ob_prev) points to op. If either of those conditions is false, the interpreter raises the fatal error I'm seeing. After mxDateTime_New pulls an mxDateTimeObject out of the free list, it calls _Py_NewReference on that object to transform it from a "conceptually deallocated" object to a "conceptually allocated" one. _Py_NewReference inserts the object into refchain. Later, when the object is being "conceptually deallocated", it should be removed from refchain with _Py_ForgetReference. The version of _Py_Dealloc that's active when Py_TRACE_REFS is enabled does this (_Py_Dealloc is the element of Py_DECREF that performs the actual destruction). _Py_Dealloc first calls _Py_ForgetReference to remove the object from refchain, then calls the object's destructor (op->ob_type->tp_dealloc). If WANT_SUBCLASSABLE_TYPES is not defined (it is not in my case), the destructor for mxDateTime_Type is mxDateTime_Free. So, if a DateTime object is deallocated normally, as a result of its reference count falling to zero, _Py_Dealloc is called on the object, which first removes it from refchain, then passes it to mxDateTime_Free. If a DateTime object is destroyed prematurely, as a result of invalid arguments to its destructor, the onError handler calls mxDateTime_Free, so the object is "conceptually deallocated" (placed in the free list), *but* the object is not removed from refchain. So if a refchain-membership-integrity-check is performed on the object in question or one of its immediate neighbors in refchain, that integrity check fails, leading to the fatal error. --- The solution is to 'Py_DECREF(...)' the object in the onError handler of its constructor, instead of passing the object directly to mxDateTime_Free. That change solves two problems: 1) It causes _Py_Dealloc to execute, which in turn executes _Py_ForgetReference, so the object is removed from refchain, as it should be. 2) At present, objects that are created successfully and later deallocated by normal reference count mechanics have a reference count of 0 when they enter the free list, whereas objects whose constructors abort their creation due to invalid arguments have a reference count of 1 when they enter the free list. Although AFAIK this doesn't cause an actual execution problem (because the object's reference count is *explicitly set to 1* rather than *incremented by 1* when the object is later "conceptually allocated" by _Py_NewReference), it is likely to confuse future maintainers and thereby lead to the introduction of an actual execution problem. I assume that if you agree that this is a reasonable solution, you'll want to apply the change not only to mxDateTime_FromDateAndTime, but to all similar constructors in mxDateTime.c. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From rj at maxxian.com Thu May 5 01:57:40 2005 From: rj at maxxian.com (RJ Juneau) Date: Sat Feb 4 20:01:17 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c5512e$f72798c0$6505a8c0@rjlaptop> I'm on the 30 day evaluation for mxodbc_zope_da. I'm getting the following error when I submit some queries: Error Type: KeyError Error Value: 'query' I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 with UCS4. The error seems to be caused by multiple rows being returned. I did see an earlier posting with the same error message. The response suggested a template error, but this is clearly not the case here. The additional evidence I've gathered so far: - I'm running the test directly from the ZSQL method, so there's no template involved. - If I use the same query with an additional "where" clause to ensure that only one row is returned, it works - If I use a value in the 'where' clause with no rows returned, it works - The same ZSQL query is being used on a Windows machine running Zope and the free ZODBC module without a problem - The query has been verified directly in mysql-client-browser Other info: - The database is MySQL 4.1.10A-0 - iODBC is the DB driver RJ Juneau -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050505/68d278bf/attachment-0092.htm From mal at egenix.com Thu May 5 12:37:43 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Feb 4 20:01:17 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c5512e$f72798c0$6505a8c0@rjlaptop> References: <000301c5512e$f72798c0$6505a8c0@rjlaptop> Message-ID: <4279E967.6010904@egenix.com> RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 > with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 09:37:42 2005 From: rj at maxxian.com (RJ Juneau) Date: Sat Feb 4 20:01:17 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000101c5516f$3b96de90$6505a8c0@rjlaptop> More interesting info on the problem: If I execute the query directly in the "test" window of the base eGenix mxODBC Database Connection window, it works fine and returns the 20 lines expected. That could point to a problem in the rendering, which seems to be where the traceback ends. Note that within the same Zope system I also have an ODBC connection to a Sybase database, and I have successfully tested multi-line ZSQL queries there. This is the traceback: Time 2005/05/05 07:55:15.294 GMT-4 Exception Type KeyError Exception Value 'query' Traceback (innermost last): Module ZPublisher.Publish, line 101, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 39, in call_object Module Shared.DC.ZRDB.DA, line 337, in manage_test Module DocumentTemplate.DT_String, line 474, in __call__ Module DocumentTemplate.DT_In, line 602, in renderwb Module DocumentTemplate.DT_Var, line 219, in render KeyError: 'query' I don't think the following is an issue, but I'll include it for completeness.I am also getting the following iODBC warnings and errors in the Zope console log, which are related to the ODBC parameters being passed by iODBC. Note that these errors also appear for all of the successful queries. [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (Setup). [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (UsageCount). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Timeout). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Reuse). As for the ZSQL snippet from the template... Since there's no template involved yet (I'm still testing directly from the ZSQL method), I assume you mean the SQL code? select h.host_name, s.system_name, s.system_handle, count(*) from terminal t, system_map s, host h where t.system_index = s.system_index and s.host_index = h.host_index group by s.system_name order by h.host_name Nothing complicated here. There are no parameters passed to the query. RJ -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: May 5, 2005 5:38 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: Re: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is > 2.3.4 with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ---------------------------------------------------------------------- > -- > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 16:00:32 2005 From: charlie at egenix.com (Charlie Clark) Date: Sat Feb 4 20:01:17 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000101c5516f$3b96de90$6505a8c0@rjlaptop> References: <000101c5516f$3b96de90$6505a8c0@rjlaptop> Message-ID: <20050505150032.644.1@bepc.1115296715.fake> On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base eGenix > mxODBC Database Connection window, it works fine and returns the 20 > lines expected. That could point to a problem in the rendering, which > seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection to > a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 10:22:17 2005 From: rj at maxxian.com (RJ Juneau) Date: Sat Feb 4 20:01:17 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505150032.644.1@bepc.1115296715.fake> Message-ID: <000201c55175$75bcad10$6505a8c0@rjlaptop> At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 11:47:14 2005 From: rj at maxxian.com (RJ Juneau) Date: Sat Feb 4 20:01:17 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c55181$549be0e0$6505a8c0@rjlaptop> Charlie, I found a fix. Here it is in case anyone else runs into this. You were correct - the problem is in another part of Zope. Based on your feedback, I did a bit more searching and found something here: http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. html The problem appears to be in Zope versions after 2.7.0. I'm running 2.7.6, and the post indicates that it also happens in 2.7.4. The solution: Edit file /lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. There are two lines in the file that start with . Edit them as follows: Change first line to: Change second line to: Just to be after, I shut down Zope before I made the changes and restarted it after. Thanks for the help! RJ -----Original Message----- From: RJ Juneau [mailto:rj@maxxian.com] Sent: May 5, 2005 9:22 AM To: 'Charlie Clark' Cc: 'egenix-users@lists.egenix.com' Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 17:57:25 2005 From: charlie at egenix.com (Charlie Clark) Date: Sat Feb 4 20:01:17 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <20050505165725.3380.2@bepc.1115296715.fake> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Thu May 5 09:15:21 2005 From: charlie at egenix.com (Charlie Clark) Date: Sat Feb 4 20:01:17 2006 Subject: [Zope-DB] RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <000001c55185$41477730$6b00a8c0@fonacier.local> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________ Zope-DB mailing list Zope-DB@zope.org http://mail.zope.org/mailman/listinfo/zope-db From rj at maxxian.com Thu May 5 12:38:00 2005 From: rj at maxxian.com (RJ Juneau) Date: Sat Feb 4 20:01:17 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000001c55188$6b841eb0$6505a8c0@rjlaptop> I just double-checked. Zope-2.7.6-final. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 12:49:16 2005 From: rj at maxxian.com (RJ Juneau) Date: Sat Feb 4 20:01:17 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000501c55189$fe149ba0$6505a8c0@rjlaptop> Charlie, The fix has only been applied for 2.7.7, 2.8b2. The info is in the original bug report which is closed and can be found here: http://www.zope.org/Collectors/Zope/1745 RJ -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Fri May 6 11:50:09 2005 From: rj at maxxian.com (RJ Juneau) Date: Sat Feb 4 20:01:17 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC Message-ID: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Still on eval for the product. I cannot get a stable connection to Sybase via the iODBC drivers. - The Sybase ODBC connection - including a query - have been verified at the iODBC level. - The setup is already working well for ODBC connection to MySQL. Symptoms include: - If I click on "Open Connection", it still comes back with "Connection Closed" when I go to a ZSQL method - Using 'Connect on Demand' is not working either. - Clicking "Open Connection" gives me the following error: Connection string: DSN=lixbox_sybase; UID=sa; PWD=XXXXXXX Connection pool entry: 0 Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection rejected by data source', 7952) The odbc.ini definition for DSN "lixbox_sybase" is as follows: [lixbox_sybase] JetFix = No NoRowSetSizeLimit = No Description = Test connection to listbox Options = LIXBOX DSQUERY = SQLSERVER TDSHOST = lixbox TDSPORT = 5000 TDSVER = 5.0 SQLSERVER_CATALOG = N CURSOR_SENSITIVITY = LOW UserName = sa Password = XXXXXXXX ServerType = Sybase 10/11/12 Driver = /opt/openlink/lib/sql_mt_lt.so Database = pubs2 ReadOnly = no NoAutoCommit = No NoLoginBox = No FetchBufferSize = 60 Other relevant data: - Connecting via OpenLink's iODBC - Zope 2.7.6-final - Python 2.3.4 - Connection to Sybase has been successfully tested with iODBC, including issuing a query - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC connection RJ Juneau Chief Technology Officer Maxxian Integration Inc. 155 Westhampton Drive Thornhill, Ontario Canada L4J 7X2 E-mail: rj@maxxian.com Phone: +1 905 482 9429 Cell: +1 416 897 6682 Toll free: +1 866 758 9161 Fax: +1 647 722 2038 -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050506/aef33361/attachment-0092.htm From mal at egenix.com Fri May 6 18:27:37 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Feb 4 20:01:17 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC In-Reply-To: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> References: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Message-ID: <427B8CE9.1010601@egenix.com> RJ Juneau wrote: > Still on eval for the product. > > I cannot get a stable connection to Sybase via the iODBC drivers. > > - The Sybase ODBC connection - including a query - have been verified at > the iODBC level. > - The setup is already working well for ODBC connection to MySQL. > > Symptoms include: > > - If I click on "Open Connection", it still comes back with "Connection > Closed" when I go to a ZSQL method > - Using 'Connect on Demand' is not working either. > - Clicking "Open Connection" gives me the following error: > > Connection string: DSN=lixbox_sybase; > UID=sa; > PWD=XXXXXXX Try writing the connection string on one line and without whitespace. ODBC drivers sometimes have problems with this. > Connection pool entry: 0 > Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection > rejected by data source', 7952) This is a generic error that relates to authentication or firewall problems. It is possible that turning on ODBC tracing the ODBC manager will give more clues as to the real cause of the problem. > The odbc.ini definition for DSN "lixbox_sybase" is as follows: > > [lixbox_sybase] > JetFix = No > NoRowSetSizeLimit = No > Description = Test connection to listbox > Options = LIXBOX > DSQUERY = SQLSERVER > TDSHOST = lixbox > TDSPORT = 5000 > TDSVER = 5.0 > SQLSERVER_CATALOG = N > CURSOR_SENSITIVITY = LOW > UserName = sa > Password = XXXXXXXX > ServerType = Sybase 10/11/12 > Driver = /opt/openlink/lib/sql_mt_lt.so > Database = pubs2 > ReadOnly = no > NoAutoCommit = No > NoLoginBox = No > FetchBufferSize = 60 > > > Other relevant data: > - Connecting via OpenLink's iODBC > - Zope 2.7.6-final > - Python 2.3.4 > - Connection to Sybase has been successfully tested with iODBC, > including issuing a query > - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC > connection > > > > RJ Juneau > Chief Technology Officer > Maxxian Integration Inc. > 155 Westhampton Drive > Thornhill, Ontario > Canada L4J 7X2 > E-mail: rj@maxxian.com > Phone: +1 905 482 9429 > Cell: +1 416 897 6682 > Toll free: +1 866 758 9161 > Fax: +1 647 722 2038 > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 06 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From calisp at gmail.com Sun May 15 23:49:03 2005 From: calisp at gmail.com (calisp@gmail.com) Date: Sat Feb 4 20:01:17 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK Message-ID: Hi, I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the following error... 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the last phase of a two-phase commit. This shouldn't happen. Traceback (most recent call last): File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one jar.tpc_finish(self) File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish try: self._finish() File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could not perform COMMIT or ROLLBACK', 1023) What could be causing this? Can I get the mxODBCZopeDA source from somewhere? It would make debugging this much easier. Thanks, Calisp. From mal at egenix.com Mon May 16 13:52:12 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Feb 4 20:01:17 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK In-Reply-To: References: Message-ID: <42887B5C.4010109@egenix.com> calisp@gmail.com wrote: > Hi, > > I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with > unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the > following error... > > 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the > last phase of a two-phase commit. This shouldn't happen. > Traceback (most recent call last): > File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one > jar.tpc_finish(self) > File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish > try: self._finish() > File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish > File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler > ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could > not perform COMMIT or ROLLBACK', 1023) You should have a look at the database logs to see what prevented the commit from being completed. > What could be causing this? Hard to say: mxODBCZopeDA is trying to commit the transaction, but the driver or database failed to complete the request. The above error was generated by the ODBC driver. This could be network or DNS problems, or be related to a bug in FreeTDS (which is getting more stable with every new release, but should still be considered beta quality software at the moment). > Can I get the mxODBCZopeDA source from > somewhere? It would make debugging this much easier. Getting the source is not an option and won't help much either since the source of the problem is not mxODBCZopeDA. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 16 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Sun May 1 21:29:25 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Feb 5 08:08:22 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <427259F3.4090806@egenix.com> References: <20050427130906.52878.qmail@web30008.mail.mud.yahoo.com> <427259F3.4090806@egenix.com> Message-ID: <42752005.7080904@egenix.com> M.-A. Lemburg wrote: > David Rushby wrote: > >> --- "M.-A. Lemburg" wrote: >> >>> Are you using the standard mxDateTime build or one >>> with WANT_SUBCLASSABLE_TYPES defined... >> >> >> >> Presumably "the standard", since I just built with 'py24d setup.py >> build', making no attempt to enable special directives. >> >> >>> ... (mxDateTime_Deallocate is only used by the latter)? >> >> >> >> That's true in 2.1.0-2005-04-15, but not in 2.1.0b5. >> >> >>> In any case, please try our latest snapshot: >>> >>> >> >> http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-04-15.zip >> >>> to see if that makes any difference. >> >> >> >> I can't build it out of the box: > > > Hmm, looks like distutils' sdist command doesn't like our new > repository layout which uses symlinks (after we've switched to > subversion). > > We'll have to debug distutils first, I guess :-( Ok, we've found the problem and fixed it. Here's the new release (which does build out of the box at least on our boxes ;-): http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 01 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From davidrushby at yahoo.com Mon May 2 15:49:53 2005 From: davidrushby at yahoo.com (David Rushby) Date: Sun Feb 5 08:08:22 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Ok, we've found the problem and fixed it. Here's the new > release (which does build out of the box at least on our > boxes ;-): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip It does build now, but: py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" still behaves as it did when I submitted my original message: Fatal Python error: UNREF invalid object Aborted This is the same debug build of Python 2.4.1 that I was previously using, running the same configuration (CentOS Linux 4.0/i386, everything compiled with GCC 3.4.3). Have you examined my original claim as to the cause of the bug? __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 10:21:55 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Feb 5 08:08:22 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> References: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> Message-ID: <42772693.8050306@egenix.com> David Rushby wrote: > --- "M.-A. Lemburg" wrote: > >>Ok, we've found the problem and fixed it. Here's the new >>release (which does build out of the box at least on our >>boxes ;-): >> >> > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip > > It does build now, but: > py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" > still behaves as it did when I submitted my original message: > Fatal Python error: UNREF invalid object > Aborted > > This is the same debug build of Python 2.4.1 that I was previously > using, running the same configuration (CentOS Linux 4.0/i386, > everything compiled with GCC 3.4.3). > > Have you examined my original claim as to the cause of the bug? No. We haven't had time for looking into it. I'm not sure whether your analysis of the problem is correct: if you don't define WANT_SUBCLASSABLE_TYPES, the API mxDateTime_Deallocate() is neither defined nor used. Furthermore, PyObject_Del() is only called by mxDateTime_Free() if you have explicitely edited mxDateTime.c to disabled the free list #defines. In a standard build, PyObject_Del() is only called at module finalization time. Note that the reason we call mxDateTime_Free() in the constructor is that we don't want the destructor of the object to be called. Py_DECREF() would call the destructor (mxDateTime_Deallocate). It is possible that the debug code in Python complains about the refcount in the object not being 0 at the time the object is finalized (module finalization time), but I don't see any such checks in PyObject_Free() (which is what PyObject_Del() maps to). Again, all of this does not happen in regular non-debug Python builds. Please be aware that we don't support debug builds, so fixing the problem (if there is one - gcc has some serious optimization problems on some combinations of platform and version) will take a while. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 09:27:37 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Sun Feb 5 08:08:22 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 Message-ID: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Hi all- I am trying to build the mx-base package, v.2.0.6. This will be used with postgresql 7.3.9, psycopg 1.1.18, and Roundup 0.8.2. RHEL 3.0 Python 2.3 egenix-mx-base-2.0.6.tar.gz I performed a: /usr/local/bin/python2.3 setup.py install Everything looks proper with the exeception of this series of warning statements: ----------------- gcc -pthread -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fno-strict-aliasing -fPIC -Imx/BeeBase/mxBeeBase -I/usr/local/incl ude/python2.3 -I/usr/local/include -c mx/BeeBase/mxBeeBase/btr.c -o build/temp.linux-i686-2.3/mx/BeeBase/mxBeeBase/mxBeeBa se/mx/BeeBase/mxBeeBase/btr.o mx/BeeBase/mxBeeBase/btr.c: In function `dumpBuf': mx/BeeBase/mxBeeBase/btr.c:249: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:250: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:255: warning: unsigned int format, long unsigned int arg (arg 4) mx/BeeBase/mxBeeBase/btr.c:256: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c: In function `_validateTree': mx/BeeBase/mxBeeBase/btr.c:330: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:337: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:339: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:349: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:351: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 3) creating build/lib.linux-i686-2.3/mx/BeeBase creating build/lib.linux-i686-2.3/mx/BeeBase/mxBeeBase -------------- Would someone be kind enough to let me know whether these messages were expected, and if not, how I might resolve these? Thanks! DC __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 22:06:33 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Feb 5 08:08:22 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> References: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Message-ID: <4277CBB9.8020302@egenix.com> Dianne Chen wrote: > Hi all- > > I am trying to build the mx-base package, v.2.0.6. > This will be used with postgresql 7.3.9, psycopg > 1.1.18, and Roundup 0.8.2. > > RHEL 3.0 > Python 2.3 > egenix-mx-base-2.0.6.tar.gz > > I performed a: > > /usr/local/bin/python2.3 setup.py install > > Everything looks proper with the exeception of this > series of warning statements: > > ----------------- > ... > -------------- > > Would someone be kind enough to let me know whether > these messages were expected, and if not, how I might > resolve these? These warning can safely be ignored. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 13:41:14 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Sun Feb 5 08:08:22 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: 6667 Message-ID: <20050503194114.72091.qmail@web31414.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Dianne Chen wrote: > > Hi all- > > > > I am trying to build the mx-base package, v.2.0.6. > > This will be used with postgresql 7.3.9, psycopg > > 1.1.18, and Roundup 0.8.2. > > > > RHEL 3.0 > > Python 2.3 > > egenix-mx-base-2.0.6.tar.gz > > > > I performed a: > > > > /usr/local/bin/python2.3 setup.py install > > > > Everything looks proper with the exeception of > this > > series of warning statements: > > > > ----------------- > > ... > > -------------- > > > > Would someone be kind enough to let me know > whether > > these messages were expected, and if not, how I > might > > resolve these? > > These warning can safely be ignored. > > -- > Marc-Andre Lemburg > eGenix.com > Marc- Thank you very much for the reply. It helps greatly. With kind regards, DC __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From davidrushby at yahoo.com Tue May 3 17:18:46 2005 From: davidrushby at yahoo.com (David Rushby) Date: Sun Feb 5 08:08:22 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050503231846.35012.qmail@web30009.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > I'm not sure whether your analysis of the problem is correct... Indeed, my original analysis wasn't correct; I think this one is. The fatal error I'm complaining about only arises if the arguments to DateTime.DateTime are invalid, so that the object is deallocated in the onError block of mxDateTime_FromDateAndTime. If the object is created successfully, and later deallocated by Python's garbage collector, the fatal error doesn't arise. Here's my analysis of the problem: --- If the debugging directive Py_TRACE_REFS is enabled, as it is in my case, the Python interpreter maintains a doubly linked list of all Python objects (named refchain) via the _ob_next and _ob_prev pointers added to PyObject via _PyObject_HEAD_EXTRA. Each object is inserted into refchain by the _Py_AddToAllObjects call in _Py_NewReference, and removed from refchain by the _Py_ForgetReference call in _Py_Dealloc. _Py_ForgetReference performs an integrity check on the object being deallocated (op) to make sure that its neighbors in refchain recognize it. Specifically, _Py_ForgetReference verifies that the _ob_next pointer of the previous object in refchain (op->_ob_prev->_ob_next) points to op, and that the _ob_prev pointer of the next object in refchain (op->_ob_next->_ob_prev) points to op. If either of those conditions is false, the interpreter raises the fatal error I'm seeing. After mxDateTime_New pulls an mxDateTimeObject out of the free list, it calls _Py_NewReference on that object to transform it from a "conceptually deallocated" object to a "conceptually allocated" one. _Py_NewReference inserts the object into refchain. Later, when the object is being "conceptually deallocated", it should be removed from refchain with _Py_ForgetReference. The version of _Py_Dealloc that's active when Py_TRACE_REFS is enabled does this (_Py_Dealloc is the element of Py_DECREF that performs the actual destruction). _Py_Dealloc first calls _Py_ForgetReference to remove the object from refchain, then calls the object's destructor (op->ob_type->tp_dealloc). If WANT_SUBCLASSABLE_TYPES is not defined (it is not in my case), the destructor for mxDateTime_Type is mxDateTime_Free. So, if a DateTime object is deallocated normally, as a result of its reference count falling to zero, _Py_Dealloc is called on the object, which first removes it from refchain, then passes it to mxDateTime_Free. If a DateTime object is destroyed prematurely, as a result of invalid arguments to its destructor, the onError handler calls mxDateTime_Free, so the object is "conceptually deallocated" (placed in the free list), *but* the object is not removed from refchain. So if a refchain-membership-integrity-check is performed on the object in question or one of its immediate neighbors in refchain, that integrity check fails, leading to the fatal error. --- The solution is to 'Py_DECREF(...)' the object in the onError handler of its constructor, instead of passing the object directly to mxDateTime_Free. That change solves two problems: 1) It causes _Py_Dealloc to execute, which in turn executes _Py_ForgetReference, so the object is removed from refchain, as it should be. 2) At present, objects that are created successfully and later deallocated by normal reference count mechanics have a reference count of 0 when they enter the free list, whereas objects whose constructors abort their creation due to invalid arguments have a reference count of 1 when they enter the free list. Although AFAIK this doesn't cause an actual execution problem (because the object's reference count is *explicitly set to 1* rather than *incremented by 1* when the object is later "conceptually allocated" by _Py_NewReference), it is likely to confuse future maintainers and thereby lead to the introduction of an actual execution problem. I assume that if you agree that this is a reasonable solution, you'll want to apply the change not only to mxDateTime_FromDateAndTime, but to all similar constructors in mxDateTime.c. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From rj at maxxian.com Thu May 5 01:57:40 2005 From: rj at maxxian.com (RJ Juneau) Date: Sun Feb 5 08:08:22 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c5512e$f72798c0$6505a8c0@rjlaptop> I'm on the 30 day evaluation for mxodbc_zope_da. I'm getting the following error when I submit some queries: Error Type: KeyError Error Value: 'query' I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 with UCS4. The error seems to be caused by multiple rows being returned. I did see an earlier posting with the same error message. The response suggested a template error, but this is clearly not the case here. The additional evidence I've gathered so far: - I'm running the test directly from the ZSQL method, so there's no template involved. - If I use the same query with an additional "where" clause to ensure that only one row is returned, it works - If I use a value in the 'where' clause with no rows returned, it works - The same ZSQL query is being used on a Windows machine running Zope and the free ZODBC module without a problem - The query has been verified directly in mysql-client-browser Other info: - The database is MySQL 4.1.10A-0 - iODBC is the DB driver RJ Juneau -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050505/68d278bf/attachment-0093.htm From mal at egenix.com Thu May 5 12:37:43 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Feb 5 08:08:22 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c5512e$f72798c0$6505a8c0@rjlaptop> References: <000301c5512e$f72798c0$6505a8c0@rjlaptop> Message-ID: <4279E967.6010904@egenix.com> RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 > with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 09:37:42 2005 From: rj at maxxian.com (RJ Juneau) Date: Sun Feb 5 08:08:22 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000101c5516f$3b96de90$6505a8c0@rjlaptop> More interesting info on the problem: If I execute the query directly in the "test" window of the base eGenix mxODBC Database Connection window, it works fine and returns the 20 lines expected. That could point to a problem in the rendering, which seems to be where the traceback ends. Note that within the same Zope system I also have an ODBC connection to a Sybase database, and I have successfully tested multi-line ZSQL queries there. This is the traceback: Time 2005/05/05 07:55:15.294 GMT-4 Exception Type KeyError Exception Value 'query' Traceback (innermost last): Module ZPublisher.Publish, line 101, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 39, in call_object Module Shared.DC.ZRDB.DA, line 337, in manage_test Module DocumentTemplate.DT_String, line 474, in __call__ Module DocumentTemplate.DT_In, line 602, in renderwb Module DocumentTemplate.DT_Var, line 219, in render KeyError: 'query' I don't think the following is an issue, but I'll include it for completeness.I am also getting the following iODBC warnings and errors in the Zope console log, which are related to the ODBC parameters being passed by iODBC. Note that these errors also appear for all of the successful queries. [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (Setup). [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (UsageCount). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Timeout). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Reuse). As for the ZSQL snippet from the template... Since there's no template involved yet (I'm still testing directly from the ZSQL method), I assume you mean the SQL code? select h.host_name, s.system_name, s.system_handle, count(*) from terminal t, system_map s, host h where t.system_index = s.system_index and s.host_index = h.host_index group by s.system_name order by h.host_name Nothing complicated here. There are no parameters passed to the query. RJ -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: May 5, 2005 5:38 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: Re: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is > 2.3.4 with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ---------------------------------------------------------------------- > -- > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 16:00:32 2005 From: charlie at egenix.com (Charlie Clark) Date: Sun Feb 5 08:08:22 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000101c5516f$3b96de90$6505a8c0@rjlaptop> References: <000101c5516f$3b96de90$6505a8c0@rjlaptop> Message-ID: <20050505150032.644.1@bepc.1115296715.fake> On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base eGenix > mxODBC Database Connection window, it works fine and returns the 20 > lines expected. That could point to a problem in the rendering, which > seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection to > a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 10:22:17 2005 From: rj at maxxian.com (RJ Juneau) Date: Sun Feb 5 08:08:22 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505150032.644.1@bepc.1115296715.fake> Message-ID: <000201c55175$75bcad10$6505a8c0@rjlaptop> At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 11:47:14 2005 From: rj at maxxian.com (RJ Juneau) Date: Sun Feb 5 08:08:22 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c55181$549be0e0$6505a8c0@rjlaptop> Charlie, I found a fix. Here it is in case anyone else runs into this. You were correct - the problem is in another part of Zope. Based on your feedback, I did a bit more searching and found something here: http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. html The problem appears to be in Zope versions after 2.7.0. I'm running 2.7.6, and the post indicates that it also happens in 2.7.4. The solution: Edit file /lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. There are two lines in the file that start with . Edit them as follows: Change first line to: Change second line to: Just to be after, I shut down Zope before I made the changes and restarted it after. Thanks for the help! RJ -----Original Message----- From: RJ Juneau [mailto:rj@maxxian.com] Sent: May 5, 2005 9:22 AM To: 'Charlie Clark' Cc: 'egenix-users@lists.egenix.com' Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 17:57:25 2005 From: charlie at egenix.com (Charlie Clark) Date: Sun Feb 5 08:08:22 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <20050505165725.3380.2@bepc.1115296715.fake> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Thu May 5 09:15:21 2005 From: charlie at egenix.com (Charlie Clark) Date: Sun Feb 5 08:08:22 2006 Subject: [Zope-DB] RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <000001c55185$41477730$6b00a8c0@fonacier.local> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________ Zope-DB mailing list Zope-DB@zope.org http://mail.zope.org/mailman/listinfo/zope-db From rj at maxxian.com Thu May 5 12:38:00 2005 From: rj at maxxian.com (RJ Juneau) Date: Sun Feb 5 08:08:22 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000001c55188$6b841eb0$6505a8c0@rjlaptop> I just double-checked. Zope-2.7.6-final. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 12:49:16 2005 From: rj at maxxian.com (RJ Juneau) Date: Sun Feb 5 08:08:22 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000501c55189$fe149ba0$6505a8c0@rjlaptop> Charlie, The fix has only been applied for 2.7.7, 2.8b2. The info is in the original bug report which is closed and can be found here: http://www.zope.org/Collectors/Zope/1745 RJ -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Fri May 6 11:50:09 2005 From: rj at maxxian.com (RJ Juneau) Date: Sun Feb 5 08:08:23 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC Message-ID: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Still on eval for the product. I cannot get a stable connection to Sybase via the iODBC drivers. - The Sybase ODBC connection - including a query - have been verified at the iODBC level. - The setup is already working well for ODBC connection to MySQL. Symptoms include: - If I click on "Open Connection", it still comes back with "Connection Closed" when I go to a ZSQL method - Using 'Connect on Demand' is not working either. - Clicking "Open Connection" gives me the following error: Connection string: DSN=lixbox_sybase; UID=sa; PWD=XXXXXXX Connection pool entry: 0 Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection rejected by data source', 7952) The odbc.ini definition for DSN "lixbox_sybase" is as follows: [lixbox_sybase] JetFix = No NoRowSetSizeLimit = No Description = Test connection to listbox Options = LIXBOX DSQUERY = SQLSERVER TDSHOST = lixbox TDSPORT = 5000 TDSVER = 5.0 SQLSERVER_CATALOG = N CURSOR_SENSITIVITY = LOW UserName = sa Password = XXXXXXXX ServerType = Sybase 10/11/12 Driver = /opt/openlink/lib/sql_mt_lt.so Database = pubs2 ReadOnly = no NoAutoCommit = No NoLoginBox = No FetchBufferSize = 60 Other relevant data: - Connecting via OpenLink's iODBC - Zope 2.7.6-final - Python 2.3.4 - Connection to Sybase has been successfully tested with iODBC, including issuing a query - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC connection RJ Juneau Chief Technology Officer Maxxian Integration Inc. 155 Westhampton Drive Thornhill, Ontario Canada L4J 7X2 E-mail: rj@maxxian.com Phone: +1 905 482 9429 Cell: +1 416 897 6682 Toll free: +1 866 758 9161 Fax: +1 647 722 2038 -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050506/aef33361/attachment-0093.htm From mal at egenix.com Fri May 6 18:27:37 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Feb 5 08:08:23 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC In-Reply-To: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> References: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Message-ID: <427B8CE9.1010601@egenix.com> RJ Juneau wrote: > Still on eval for the product. > > I cannot get a stable connection to Sybase via the iODBC drivers. > > - The Sybase ODBC connection - including a query - have been verified at > the iODBC level. > - The setup is already working well for ODBC connection to MySQL. > > Symptoms include: > > - If I click on "Open Connection", it still comes back with "Connection > Closed" when I go to a ZSQL method > - Using 'Connect on Demand' is not working either. > - Clicking "Open Connection" gives me the following error: > > Connection string: DSN=lixbox_sybase; > UID=sa; > PWD=XXXXXXX Try writing the connection string on one line and without whitespace. ODBC drivers sometimes have problems with this. > Connection pool entry: 0 > Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection > rejected by data source', 7952) This is a generic error that relates to authentication or firewall problems. It is possible that turning on ODBC tracing the ODBC manager will give more clues as to the real cause of the problem. > The odbc.ini definition for DSN "lixbox_sybase" is as follows: > > [lixbox_sybase] > JetFix = No > NoRowSetSizeLimit = No > Description = Test connection to listbox > Options = LIXBOX > DSQUERY = SQLSERVER > TDSHOST = lixbox > TDSPORT = 5000 > TDSVER = 5.0 > SQLSERVER_CATALOG = N > CURSOR_SENSITIVITY = LOW > UserName = sa > Password = XXXXXXXX > ServerType = Sybase 10/11/12 > Driver = /opt/openlink/lib/sql_mt_lt.so > Database = pubs2 > ReadOnly = no > NoAutoCommit = No > NoLoginBox = No > FetchBufferSize = 60 > > > Other relevant data: > - Connecting via OpenLink's iODBC > - Zope 2.7.6-final > - Python 2.3.4 > - Connection to Sybase has been successfully tested with iODBC, > including issuing a query > - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC > connection > > > > RJ Juneau > Chief Technology Officer > Maxxian Integration Inc. > 155 Westhampton Drive > Thornhill, Ontario > Canada L4J 7X2 > E-mail: rj@maxxian.com > Phone: +1 905 482 9429 > Cell: +1 416 897 6682 > Toll free: +1 866 758 9161 > Fax: +1 647 722 2038 > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 06 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From calisp at gmail.com Sun May 15 23:49:03 2005 From: calisp at gmail.com (calisp@gmail.com) Date: Sun Feb 5 08:08:23 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK Message-ID: Hi, I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the following error... 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the last phase of a two-phase commit. This shouldn't happen. Traceback (most recent call last): File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one jar.tpc_finish(self) File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish try: self._finish() File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could not perform COMMIT or ROLLBACK', 1023) What could be causing this? Can I get the mxODBCZopeDA source from somewhere? It would make debugging this much easier. Thanks, Calisp. From mal at egenix.com Mon May 16 13:52:12 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Feb 5 08:08:23 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK In-Reply-To: References: Message-ID: <42887B5C.4010109@egenix.com> calisp@gmail.com wrote: > Hi, > > I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with > unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the > following error... > > 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the > last phase of a two-phase commit. This shouldn't happen. > Traceback (most recent call last): > File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one > jar.tpc_finish(self) > File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish > try: self._finish() > File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish > File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler > ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could > not perform COMMIT or ROLLBACK', 1023) You should have a look at the database logs to see what prevented the commit from being completed. > What could be causing this? Hard to say: mxODBCZopeDA is trying to commit the transaction, but the driver or database failed to complete the request. The above error was generated by the ODBC driver. This could be network or DNS problems, or be related to a bug in FreeTDS (which is getting more stable with every new release, but should still be considered beta quality software at the moment). > Can I get the mxODBCZopeDA source from > somewhere? It would make debugging this much easier. Getting the source is not an option and won't help much either since the source of the problem is not mxODBCZopeDA. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 16 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Sun May 1 21:29:25 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Feb 5 12:03:08 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <427259F3.4090806@egenix.com> References: <20050427130906.52878.qmail@web30008.mail.mud.yahoo.com> <427259F3.4090806@egenix.com> Message-ID: <42752005.7080904@egenix.com> M.-A. Lemburg wrote: > David Rushby wrote: > >> --- "M.-A. Lemburg" wrote: >> >>> Are you using the standard mxDateTime build or one >>> with WANT_SUBCLASSABLE_TYPES defined... >> >> >> >> Presumably "the standard", since I just built with 'py24d setup.py >> build', making no attempt to enable special directives. >> >> >>> ... (mxDateTime_Deallocate is only used by the latter)? >> >> >> >> That's true in 2.1.0-2005-04-15, but not in 2.1.0b5. >> >> >>> In any case, please try our latest snapshot: >>> >>> >> >> http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-04-15.zip >> >>> to see if that makes any difference. >> >> >> >> I can't build it out of the box: > > > Hmm, looks like distutils' sdist command doesn't like our new > repository layout which uses symlinks (after we've switched to > subversion). > > We'll have to debug distutils first, I guess :-( Ok, we've found the problem and fixed it. Here's the new release (which does build out of the box at least on our boxes ;-): http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 01 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From davidrushby at yahoo.com Mon May 2 15:49:53 2005 From: davidrushby at yahoo.com (David Rushby) Date: Sun Feb 5 12:03:09 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Ok, we've found the problem and fixed it. Here's the new > release (which does build out of the box at least on our > boxes ;-): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip It does build now, but: py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" still behaves as it did when I submitted my original message: Fatal Python error: UNREF invalid object Aborted This is the same debug build of Python 2.4.1 that I was previously using, running the same configuration (CentOS Linux 4.0/i386, everything compiled with GCC 3.4.3). Have you examined my original claim as to the cause of the bug? __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 10:21:55 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Feb 5 12:03:09 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> References: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> Message-ID: <42772693.8050306@egenix.com> David Rushby wrote: > --- "M.-A. Lemburg" wrote: > >>Ok, we've found the problem and fixed it. Here's the new >>release (which does build out of the box at least on our >>boxes ;-): >> >> > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip > > It does build now, but: > py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" > still behaves as it did when I submitted my original message: > Fatal Python error: UNREF invalid object > Aborted > > This is the same debug build of Python 2.4.1 that I was previously > using, running the same configuration (CentOS Linux 4.0/i386, > everything compiled with GCC 3.4.3). > > Have you examined my original claim as to the cause of the bug? No. We haven't had time for looking into it. I'm not sure whether your analysis of the problem is correct: if you don't define WANT_SUBCLASSABLE_TYPES, the API mxDateTime_Deallocate() is neither defined nor used. Furthermore, PyObject_Del() is only called by mxDateTime_Free() if you have explicitely edited mxDateTime.c to disabled the free list #defines. In a standard build, PyObject_Del() is only called at module finalization time. Note that the reason we call mxDateTime_Free() in the constructor is that we don't want the destructor of the object to be called. Py_DECREF() would call the destructor (mxDateTime_Deallocate). It is possible that the debug code in Python complains about the refcount in the object not being 0 at the time the object is finalized (module finalization time), but I don't see any such checks in PyObject_Free() (which is what PyObject_Del() maps to). Again, all of this does not happen in regular non-debug Python builds. Please be aware that we don't support debug builds, so fixing the problem (if there is one - gcc has some serious optimization problems on some combinations of platform and version) will take a while. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 09:27:37 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Sun Feb 5 12:03:09 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 Message-ID: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Hi all- I am trying to build the mx-base package, v.2.0.6. This will be used with postgresql 7.3.9, psycopg 1.1.18, and Roundup 0.8.2. RHEL 3.0 Python 2.3 egenix-mx-base-2.0.6.tar.gz I performed a: /usr/local/bin/python2.3 setup.py install Everything looks proper with the exeception of this series of warning statements: ----------------- gcc -pthread -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fno-strict-aliasing -fPIC -Imx/BeeBase/mxBeeBase -I/usr/local/incl ude/python2.3 -I/usr/local/include -c mx/BeeBase/mxBeeBase/btr.c -o build/temp.linux-i686-2.3/mx/BeeBase/mxBeeBase/mxBeeBa se/mx/BeeBase/mxBeeBase/btr.o mx/BeeBase/mxBeeBase/btr.c: In function `dumpBuf': mx/BeeBase/mxBeeBase/btr.c:249: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:250: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:255: warning: unsigned int format, long unsigned int arg (arg 4) mx/BeeBase/mxBeeBase/btr.c:256: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c: In function `_validateTree': mx/BeeBase/mxBeeBase/btr.c:330: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:337: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:339: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:349: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:351: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 3) creating build/lib.linux-i686-2.3/mx/BeeBase creating build/lib.linux-i686-2.3/mx/BeeBase/mxBeeBase -------------- Would someone be kind enough to let me know whether these messages were expected, and if not, how I might resolve these? Thanks! DC __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 22:06:33 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Feb 5 12:03:09 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> References: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Message-ID: <4277CBB9.8020302@egenix.com> Dianne Chen wrote: > Hi all- > > I am trying to build the mx-base package, v.2.0.6. > This will be used with postgresql 7.3.9, psycopg > 1.1.18, and Roundup 0.8.2. > > RHEL 3.0 > Python 2.3 > egenix-mx-base-2.0.6.tar.gz > > I performed a: > > /usr/local/bin/python2.3 setup.py install > > Everything looks proper with the exeception of this > series of warning statements: > > ----------------- > ... > -------------- > > Would someone be kind enough to let me know whether > these messages were expected, and if not, how I might > resolve these? These warning can safely be ignored. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 13:41:14 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Sun Feb 5 12:03:09 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: 6667 Message-ID: <20050503194114.72091.qmail@web31414.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Dianne Chen wrote: > > Hi all- > > > > I am trying to build the mx-base package, v.2.0.6. > > This will be used with postgresql 7.3.9, psycopg > > 1.1.18, and Roundup 0.8.2. > > > > RHEL 3.0 > > Python 2.3 > > egenix-mx-base-2.0.6.tar.gz > > > > I performed a: > > > > /usr/local/bin/python2.3 setup.py install > > > > Everything looks proper with the exeception of > this > > series of warning statements: > > > > ----------------- > > ... > > -------------- > > > > Would someone be kind enough to let me know > whether > > these messages were expected, and if not, how I > might > > resolve these? > > These warning can safely be ignored. > > -- > Marc-Andre Lemburg > eGenix.com > Marc- Thank you very much for the reply. It helps greatly. With kind regards, DC __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From davidrushby at yahoo.com Tue May 3 17:18:46 2005 From: davidrushby at yahoo.com (David Rushby) Date: Sun Feb 5 12:03:09 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050503231846.35012.qmail@web30009.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > I'm not sure whether your analysis of the problem is correct... Indeed, my original analysis wasn't correct; I think this one is. The fatal error I'm complaining about only arises if the arguments to DateTime.DateTime are invalid, so that the object is deallocated in the onError block of mxDateTime_FromDateAndTime. If the object is created successfully, and later deallocated by Python's garbage collector, the fatal error doesn't arise. Here's my analysis of the problem: --- If the debugging directive Py_TRACE_REFS is enabled, as it is in my case, the Python interpreter maintains a doubly linked list of all Python objects (named refchain) via the _ob_next and _ob_prev pointers added to PyObject via _PyObject_HEAD_EXTRA. Each object is inserted into refchain by the _Py_AddToAllObjects call in _Py_NewReference, and removed from refchain by the _Py_ForgetReference call in _Py_Dealloc. _Py_ForgetReference performs an integrity check on the object being deallocated (op) to make sure that its neighbors in refchain recognize it. Specifically, _Py_ForgetReference verifies that the _ob_next pointer of the previous object in refchain (op->_ob_prev->_ob_next) points to op, and that the _ob_prev pointer of the next object in refchain (op->_ob_next->_ob_prev) points to op. If either of those conditions is false, the interpreter raises the fatal error I'm seeing. After mxDateTime_New pulls an mxDateTimeObject out of the free list, it calls _Py_NewReference on that object to transform it from a "conceptually deallocated" object to a "conceptually allocated" one. _Py_NewReference inserts the object into refchain. Later, when the object is being "conceptually deallocated", it should be removed from refchain with _Py_ForgetReference. The version of _Py_Dealloc that's active when Py_TRACE_REFS is enabled does this (_Py_Dealloc is the element of Py_DECREF that performs the actual destruction). _Py_Dealloc first calls _Py_ForgetReference to remove the object from refchain, then calls the object's destructor (op->ob_type->tp_dealloc). If WANT_SUBCLASSABLE_TYPES is not defined (it is not in my case), the destructor for mxDateTime_Type is mxDateTime_Free. So, if a DateTime object is deallocated normally, as a result of its reference count falling to zero, _Py_Dealloc is called on the object, which first removes it from refchain, then passes it to mxDateTime_Free. If a DateTime object is destroyed prematurely, as a result of invalid arguments to its destructor, the onError handler calls mxDateTime_Free, so the object is "conceptually deallocated" (placed in the free list), *but* the object is not removed from refchain. So if a refchain-membership-integrity-check is performed on the object in question or one of its immediate neighbors in refchain, that integrity check fails, leading to the fatal error. --- The solution is to 'Py_DECREF(...)' the object in the onError handler of its constructor, instead of passing the object directly to mxDateTime_Free. That change solves two problems: 1) It causes _Py_Dealloc to execute, which in turn executes _Py_ForgetReference, so the object is removed from refchain, as it should be. 2) At present, objects that are created successfully and later deallocated by normal reference count mechanics have a reference count of 0 when they enter the free list, whereas objects whose constructors abort their creation due to invalid arguments have a reference count of 1 when they enter the free list. Although AFAIK this doesn't cause an actual execution problem (because the object's reference count is *explicitly set to 1* rather than *incremented by 1* when the object is later "conceptually allocated" by _Py_NewReference), it is likely to confuse future maintainers and thereby lead to the introduction of an actual execution problem. I assume that if you agree that this is a reasonable solution, you'll want to apply the change not only to mxDateTime_FromDateAndTime, but to all similar constructors in mxDateTime.c. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From rj at maxxian.com Thu May 5 01:57:40 2005 From: rj at maxxian.com (RJ Juneau) Date: Sun Feb 5 12:03:09 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c5512e$f72798c0$6505a8c0@rjlaptop> I'm on the 30 day evaluation for mxodbc_zope_da. I'm getting the following error when I submit some queries: Error Type: KeyError Error Value: 'query' I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 with UCS4. The error seems to be caused by multiple rows being returned. I did see an earlier posting with the same error message. The response suggested a template error, but this is clearly not the case here. The additional evidence I've gathered so far: - I'm running the test directly from the ZSQL method, so there's no template involved. - If I use the same query with an additional "where" clause to ensure that only one row is returned, it works - If I use a value in the 'where' clause with no rows returned, it works - The same ZSQL query is being used on a Windows machine running Zope and the free ZODBC module without a problem - The query has been verified directly in mysql-client-browser Other info: - The database is MySQL 4.1.10A-0 - iODBC is the DB driver RJ Juneau -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050505/68d278bf/attachment-0094.htm From mal at egenix.com Thu May 5 12:37:43 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Feb 5 12:03:09 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c5512e$f72798c0$6505a8c0@rjlaptop> References: <000301c5512e$f72798c0$6505a8c0@rjlaptop> Message-ID: <4279E967.6010904@egenix.com> RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 > with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 09:37:42 2005 From: rj at maxxian.com (RJ Juneau) Date: Sun Feb 5 12:03:09 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000101c5516f$3b96de90$6505a8c0@rjlaptop> More interesting info on the problem: If I execute the query directly in the "test" window of the base eGenix mxODBC Database Connection window, it works fine and returns the 20 lines expected. That could point to a problem in the rendering, which seems to be where the traceback ends. Note that within the same Zope system I also have an ODBC connection to a Sybase database, and I have successfully tested multi-line ZSQL queries there. This is the traceback: Time 2005/05/05 07:55:15.294 GMT-4 Exception Type KeyError Exception Value 'query' Traceback (innermost last): Module ZPublisher.Publish, line 101, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 39, in call_object Module Shared.DC.ZRDB.DA, line 337, in manage_test Module DocumentTemplate.DT_String, line 474, in __call__ Module DocumentTemplate.DT_In, line 602, in renderwb Module DocumentTemplate.DT_Var, line 219, in render KeyError: 'query' I don't think the following is an issue, but I'll include it for completeness.I am also getting the following iODBC warnings and errors in the Zope console log, which are related to the ODBC parameters being passed by iODBC. Note that these errors also appear for all of the successful queries. [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (Setup). [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (UsageCount). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Timeout). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Reuse). As for the ZSQL snippet from the template... Since there's no template involved yet (I'm still testing directly from the ZSQL method), I assume you mean the SQL code? select h.host_name, s.system_name, s.system_handle, count(*) from terminal t, system_map s, host h where t.system_index = s.system_index and s.host_index = h.host_index group by s.system_name order by h.host_name Nothing complicated here. There are no parameters passed to the query. RJ -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: May 5, 2005 5:38 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: Re: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is > 2.3.4 with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ---------------------------------------------------------------------- > -- > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 16:00:32 2005 From: charlie at egenix.com (Charlie Clark) Date: Sun Feb 5 12:03:09 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000101c5516f$3b96de90$6505a8c0@rjlaptop> References: <000101c5516f$3b96de90$6505a8c0@rjlaptop> Message-ID: <20050505150032.644.1@bepc.1115296715.fake> On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base eGenix > mxODBC Database Connection window, it works fine and returns the 20 > lines expected. That could point to a problem in the rendering, which > seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection to > a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 10:22:17 2005 From: rj at maxxian.com (RJ Juneau) Date: Sun Feb 5 12:03:09 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505150032.644.1@bepc.1115296715.fake> Message-ID: <000201c55175$75bcad10$6505a8c0@rjlaptop> At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 11:47:14 2005 From: rj at maxxian.com (RJ Juneau) Date: Sun Feb 5 12:03:09 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c55181$549be0e0$6505a8c0@rjlaptop> Charlie, I found a fix. Here it is in case anyone else runs into this. You were correct - the problem is in another part of Zope. Based on your feedback, I did a bit more searching and found something here: http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. html The problem appears to be in Zope versions after 2.7.0. I'm running 2.7.6, and the post indicates that it also happens in 2.7.4. The solution: Edit file /lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. There are two lines in the file that start with . Edit them as follows: Change first line to: Change second line to: Just to be after, I shut down Zope before I made the changes and restarted it after. Thanks for the help! RJ -----Original Message----- From: RJ Juneau [mailto:rj@maxxian.com] Sent: May 5, 2005 9:22 AM To: 'Charlie Clark' Cc: 'egenix-users@lists.egenix.com' Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 17:57:25 2005 From: charlie at egenix.com (Charlie Clark) Date: Sun Feb 5 12:03:09 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <20050505165725.3380.2@bepc.1115296715.fake> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Thu May 5 09:15:21 2005 From: charlie at egenix.com (Charlie Clark) Date: Sun Feb 5 12:03:09 2006 Subject: [Zope-DB] RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <000001c55185$41477730$6b00a8c0@fonacier.local> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________ Zope-DB mailing list Zope-DB@zope.org http://mail.zope.org/mailman/listinfo/zope-db From rj at maxxian.com Thu May 5 12:38:00 2005 From: rj at maxxian.com (RJ Juneau) Date: Sun Feb 5 12:03:09 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000001c55188$6b841eb0$6505a8c0@rjlaptop> I just double-checked. Zope-2.7.6-final. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 12:49:16 2005 From: rj at maxxian.com (RJ Juneau) Date: Sun Feb 5 12:03:09 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000501c55189$fe149ba0$6505a8c0@rjlaptop> Charlie, The fix has only been applied for 2.7.7, 2.8b2. The info is in the original bug report which is closed and can be found here: http://www.zope.org/Collectors/Zope/1745 RJ -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Fri May 6 11:50:09 2005 From: rj at maxxian.com (RJ Juneau) Date: Sun Feb 5 12:03:09 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC Message-ID: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Still on eval for the product. I cannot get a stable connection to Sybase via the iODBC drivers. - The Sybase ODBC connection - including a query - have been verified at the iODBC level. - The setup is already working well for ODBC connection to MySQL. Symptoms include: - If I click on "Open Connection", it still comes back with "Connection Closed" when I go to a ZSQL method - Using 'Connect on Demand' is not working either. - Clicking "Open Connection" gives me the following error: Connection string: DSN=lixbox_sybase; UID=sa; PWD=XXXXXXX Connection pool entry: 0 Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection rejected by data source', 7952) The odbc.ini definition for DSN "lixbox_sybase" is as follows: [lixbox_sybase] JetFix = No NoRowSetSizeLimit = No Description = Test connection to listbox Options = LIXBOX DSQUERY = SQLSERVER TDSHOST = lixbox TDSPORT = 5000 TDSVER = 5.0 SQLSERVER_CATALOG = N CURSOR_SENSITIVITY = LOW UserName = sa Password = XXXXXXXX ServerType = Sybase 10/11/12 Driver = /opt/openlink/lib/sql_mt_lt.so Database = pubs2 ReadOnly = no NoAutoCommit = No NoLoginBox = No FetchBufferSize = 60 Other relevant data: - Connecting via OpenLink's iODBC - Zope 2.7.6-final - Python 2.3.4 - Connection to Sybase has been successfully tested with iODBC, including issuing a query - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC connection RJ Juneau Chief Technology Officer Maxxian Integration Inc. 155 Westhampton Drive Thornhill, Ontario Canada L4J 7X2 E-mail: rj@maxxian.com Phone: +1 905 482 9429 Cell: +1 416 897 6682 Toll free: +1 866 758 9161 Fax: +1 647 722 2038 -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050506/aef33361/attachment-0094.htm From mal at egenix.com Fri May 6 18:27:37 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Feb 5 12:03:09 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC In-Reply-To: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> References: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Message-ID: <427B8CE9.1010601@egenix.com> RJ Juneau wrote: > Still on eval for the product. > > I cannot get a stable connection to Sybase via the iODBC drivers. > > - The Sybase ODBC connection - including a query - have been verified at > the iODBC level. > - The setup is already working well for ODBC connection to MySQL. > > Symptoms include: > > - If I click on "Open Connection", it still comes back with "Connection > Closed" when I go to a ZSQL method > - Using 'Connect on Demand' is not working either. > - Clicking "Open Connection" gives me the following error: > > Connection string: DSN=lixbox_sybase; > UID=sa; > PWD=XXXXXXX Try writing the connection string on one line and without whitespace. ODBC drivers sometimes have problems with this. > Connection pool entry: 0 > Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection > rejected by data source', 7952) This is a generic error that relates to authentication or firewall problems. It is possible that turning on ODBC tracing the ODBC manager will give more clues as to the real cause of the problem. > The odbc.ini definition for DSN "lixbox_sybase" is as follows: > > [lixbox_sybase] > JetFix = No > NoRowSetSizeLimit = No > Description = Test connection to listbox > Options = LIXBOX > DSQUERY = SQLSERVER > TDSHOST = lixbox > TDSPORT = 5000 > TDSVER = 5.0 > SQLSERVER_CATALOG = N > CURSOR_SENSITIVITY = LOW > UserName = sa > Password = XXXXXXXX > ServerType = Sybase 10/11/12 > Driver = /opt/openlink/lib/sql_mt_lt.so > Database = pubs2 > ReadOnly = no > NoAutoCommit = No > NoLoginBox = No > FetchBufferSize = 60 > > > Other relevant data: > - Connecting via OpenLink's iODBC > - Zope 2.7.6-final > - Python 2.3.4 > - Connection to Sybase has been successfully tested with iODBC, > including issuing a query > - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC > connection > > > > RJ Juneau > Chief Technology Officer > Maxxian Integration Inc. > 155 Westhampton Drive > Thornhill, Ontario > Canada L4J 7X2 > E-mail: rj@maxxian.com > Phone: +1 905 482 9429 > Cell: +1 416 897 6682 > Toll free: +1 866 758 9161 > Fax: +1 647 722 2038 > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 06 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From calisp at gmail.com Sun May 15 23:49:03 2005 From: calisp at gmail.com (calisp@gmail.com) Date: Sun Feb 5 12:03:09 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK Message-ID: Hi, I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the following error... 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the last phase of a two-phase commit. This shouldn't happen. Traceback (most recent call last): File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one jar.tpc_finish(self) File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish try: self._finish() File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could not perform COMMIT or ROLLBACK', 1023) What could be causing this? Can I get the mxODBCZopeDA source from somewhere? It would make debugging this much easier. Thanks, Calisp. From mal at egenix.com Mon May 16 13:52:12 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Feb 5 12:03:09 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK In-Reply-To: References: Message-ID: <42887B5C.4010109@egenix.com> calisp@gmail.com wrote: > Hi, > > I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with > unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the > following error... > > 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the > last phase of a two-phase commit. This shouldn't happen. > Traceback (most recent call last): > File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one > jar.tpc_finish(self) > File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish > try: self._finish() > File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish > File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler > ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could > not perform COMMIT or ROLLBACK', 1023) You should have a look at the database logs to see what prevented the commit from being completed. > What could be causing this? Hard to say: mxODBCZopeDA is trying to commit the transaction, but the driver or database failed to complete the request. The above error was generated by the ODBC driver. This could be network or DNS problems, or be related to a bug in FreeTDS (which is getting more stable with every new release, but should still be considered beta quality software at the moment). > Can I get the mxODBCZopeDA source from > somewhere? It would make debugging this much easier. Getting the source is not an option and won't help much either since the source of the problem is not mxODBCZopeDA. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 16 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Sun May 1 21:29:25 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Feb 5 16:01:23 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <427259F3.4090806@egenix.com> References: <20050427130906.52878.qmail@web30008.mail.mud.yahoo.com> <427259F3.4090806@egenix.com> Message-ID: <42752005.7080904@egenix.com> M.-A. Lemburg wrote: > David Rushby wrote: > >> --- "M.-A. Lemburg" wrote: >> >>> Are you using the standard mxDateTime build or one >>> with WANT_SUBCLASSABLE_TYPES defined... >> >> >> >> Presumably "the standard", since I just built with 'py24d setup.py >> build', making no attempt to enable special directives. >> >> >>> ... (mxDateTime_Deallocate is only used by the latter)? >> >> >> >> That's true in 2.1.0-2005-04-15, but not in 2.1.0b5. >> >> >>> In any case, please try our latest snapshot: >>> >>> >> >> http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-04-15.zip >> >>> to see if that makes any difference. >> >> >> >> I can't build it out of the box: > > > Hmm, looks like distutils' sdist command doesn't like our new > repository layout which uses symlinks (after we've switched to > subversion). > > We'll have to debug distutils first, I guess :-( Ok, we've found the problem and fixed it. Here's the new release (which does build out of the box at least on our boxes ;-): http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 01 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From davidrushby at yahoo.com Mon May 2 15:49:53 2005 From: davidrushby at yahoo.com (David Rushby) Date: Sun Feb 5 16:01:23 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Ok, we've found the problem and fixed it. Here's the new > release (which does build out of the box at least on our > boxes ;-): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip It does build now, but: py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" still behaves as it did when I submitted my original message: Fatal Python error: UNREF invalid object Aborted This is the same debug build of Python 2.4.1 that I was previously using, running the same configuration (CentOS Linux 4.0/i386, everything compiled with GCC 3.4.3). Have you examined my original claim as to the cause of the bug? __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 10:21:55 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Feb 5 16:01:23 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> References: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> Message-ID: <42772693.8050306@egenix.com> David Rushby wrote: > --- "M.-A. Lemburg" wrote: > >>Ok, we've found the problem and fixed it. Here's the new >>release (which does build out of the box at least on our >>boxes ;-): >> >> > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip > > It does build now, but: > py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" > still behaves as it did when I submitted my original message: > Fatal Python error: UNREF invalid object > Aborted > > This is the same debug build of Python 2.4.1 that I was previously > using, running the same configuration (CentOS Linux 4.0/i386, > everything compiled with GCC 3.4.3). > > Have you examined my original claim as to the cause of the bug? No. We haven't had time for looking into it. I'm not sure whether your analysis of the problem is correct: if you don't define WANT_SUBCLASSABLE_TYPES, the API mxDateTime_Deallocate() is neither defined nor used. Furthermore, PyObject_Del() is only called by mxDateTime_Free() if you have explicitely edited mxDateTime.c to disabled the free list #defines. In a standard build, PyObject_Del() is only called at module finalization time. Note that the reason we call mxDateTime_Free() in the constructor is that we don't want the destructor of the object to be called. Py_DECREF() would call the destructor (mxDateTime_Deallocate). It is possible that the debug code in Python complains about the refcount in the object not being 0 at the time the object is finalized (module finalization time), but I don't see any such checks in PyObject_Free() (which is what PyObject_Del() maps to). Again, all of this does not happen in regular non-debug Python builds. Please be aware that we don't support debug builds, so fixing the problem (if there is one - gcc has some serious optimization problems on some combinations of platform and version) will take a while. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 09:27:37 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Sun Feb 5 16:01:23 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 Message-ID: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Hi all- I am trying to build the mx-base package, v.2.0.6. This will be used with postgresql 7.3.9, psycopg 1.1.18, and Roundup 0.8.2. RHEL 3.0 Python 2.3 egenix-mx-base-2.0.6.tar.gz I performed a: /usr/local/bin/python2.3 setup.py install Everything looks proper with the exeception of this series of warning statements: ----------------- gcc -pthread -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fno-strict-aliasing -fPIC -Imx/BeeBase/mxBeeBase -I/usr/local/incl ude/python2.3 -I/usr/local/include -c mx/BeeBase/mxBeeBase/btr.c -o build/temp.linux-i686-2.3/mx/BeeBase/mxBeeBase/mxBeeBa se/mx/BeeBase/mxBeeBase/btr.o mx/BeeBase/mxBeeBase/btr.c: In function `dumpBuf': mx/BeeBase/mxBeeBase/btr.c:249: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:250: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:255: warning: unsigned int format, long unsigned int arg (arg 4) mx/BeeBase/mxBeeBase/btr.c:256: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c: In function `_validateTree': mx/BeeBase/mxBeeBase/btr.c:330: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:337: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:339: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:349: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:351: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 3) creating build/lib.linux-i686-2.3/mx/BeeBase creating build/lib.linux-i686-2.3/mx/BeeBase/mxBeeBase -------------- Would someone be kind enough to let me know whether these messages were expected, and if not, how I might resolve these? Thanks! DC __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 22:06:33 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Feb 5 16:01:23 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> References: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Message-ID: <4277CBB9.8020302@egenix.com> Dianne Chen wrote: > Hi all- > > I am trying to build the mx-base package, v.2.0.6. > This will be used with postgresql 7.3.9, psycopg > 1.1.18, and Roundup 0.8.2. > > RHEL 3.0 > Python 2.3 > egenix-mx-base-2.0.6.tar.gz > > I performed a: > > /usr/local/bin/python2.3 setup.py install > > Everything looks proper with the exeception of this > series of warning statements: > > ----------------- > ... > -------------- > > Would someone be kind enough to let me know whether > these messages were expected, and if not, how I might > resolve these? These warning can safely be ignored. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 13:41:14 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Sun Feb 5 16:01:23 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: 6667 Message-ID: <20050503194114.72091.qmail@web31414.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Dianne Chen wrote: > > Hi all- > > > > I am trying to build the mx-base package, v.2.0.6. > > This will be used with postgresql 7.3.9, psycopg > > 1.1.18, and Roundup 0.8.2. > > > > RHEL 3.0 > > Python 2.3 > > egenix-mx-base-2.0.6.tar.gz > > > > I performed a: > > > > /usr/local/bin/python2.3 setup.py install > > > > Everything looks proper with the exeception of > this > > series of warning statements: > > > > ----------------- > > ... > > -------------- > > > > Would someone be kind enough to let me know > whether > > these messages were expected, and if not, how I > might > > resolve these? > > These warning can safely be ignored. > > -- > Marc-Andre Lemburg > eGenix.com > Marc- Thank you very much for the reply. It helps greatly. With kind regards, DC __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From davidrushby at yahoo.com Tue May 3 17:18:46 2005 From: davidrushby at yahoo.com (David Rushby) Date: Sun Feb 5 16:01:23 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050503231846.35012.qmail@web30009.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > I'm not sure whether your analysis of the problem is correct... Indeed, my original analysis wasn't correct; I think this one is. The fatal error I'm complaining about only arises if the arguments to DateTime.DateTime are invalid, so that the object is deallocated in the onError block of mxDateTime_FromDateAndTime. If the object is created successfully, and later deallocated by Python's garbage collector, the fatal error doesn't arise. Here's my analysis of the problem: --- If the debugging directive Py_TRACE_REFS is enabled, as it is in my case, the Python interpreter maintains a doubly linked list of all Python objects (named refchain) via the _ob_next and _ob_prev pointers added to PyObject via _PyObject_HEAD_EXTRA. Each object is inserted into refchain by the _Py_AddToAllObjects call in _Py_NewReference, and removed from refchain by the _Py_ForgetReference call in _Py_Dealloc. _Py_ForgetReference performs an integrity check on the object being deallocated (op) to make sure that its neighbors in refchain recognize it. Specifically, _Py_ForgetReference verifies that the _ob_next pointer of the previous object in refchain (op->_ob_prev->_ob_next) points to op, and that the _ob_prev pointer of the next object in refchain (op->_ob_next->_ob_prev) points to op. If either of those conditions is false, the interpreter raises the fatal error I'm seeing. After mxDateTime_New pulls an mxDateTimeObject out of the free list, it calls _Py_NewReference on that object to transform it from a "conceptually deallocated" object to a "conceptually allocated" one. _Py_NewReference inserts the object into refchain. Later, when the object is being "conceptually deallocated", it should be removed from refchain with _Py_ForgetReference. The version of _Py_Dealloc that's active when Py_TRACE_REFS is enabled does this (_Py_Dealloc is the element of Py_DECREF that performs the actual destruction). _Py_Dealloc first calls _Py_ForgetReference to remove the object from refchain, then calls the object's destructor (op->ob_type->tp_dealloc). If WANT_SUBCLASSABLE_TYPES is not defined (it is not in my case), the destructor for mxDateTime_Type is mxDateTime_Free. So, if a DateTime object is deallocated normally, as a result of its reference count falling to zero, _Py_Dealloc is called on the object, which first removes it from refchain, then passes it to mxDateTime_Free. If a DateTime object is destroyed prematurely, as a result of invalid arguments to its destructor, the onError handler calls mxDateTime_Free, so the object is "conceptually deallocated" (placed in the free list), *but* the object is not removed from refchain. So if a refchain-membership-integrity-check is performed on the object in question or one of its immediate neighbors in refchain, that integrity check fails, leading to the fatal error. --- The solution is to 'Py_DECREF(...)' the object in the onError handler of its constructor, instead of passing the object directly to mxDateTime_Free. That change solves two problems: 1) It causes _Py_Dealloc to execute, which in turn executes _Py_ForgetReference, so the object is removed from refchain, as it should be. 2) At present, objects that are created successfully and later deallocated by normal reference count mechanics have a reference count of 0 when they enter the free list, whereas objects whose constructors abort their creation due to invalid arguments have a reference count of 1 when they enter the free list. Although AFAIK this doesn't cause an actual execution problem (because the object's reference count is *explicitly set to 1* rather than *incremented by 1* when the object is later "conceptually allocated" by _Py_NewReference), it is likely to confuse future maintainers and thereby lead to the introduction of an actual execution problem. I assume that if you agree that this is a reasonable solution, you'll want to apply the change not only to mxDateTime_FromDateAndTime, but to all similar constructors in mxDateTime.c. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From rj at maxxian.com Thu May 5 01:57:40 2005 From: rj at maxxian.com (RJ Juneau) Date: Sun Feb 5 16:01:23 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c5512e$f72798c0$6505a8c0@rjlaptop> I'm on the 30 day evaluation for mxodbc_zope_da. I'm getting the following error when I submit some queries: Error Type: KeyError Error Value: 'query' I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 with UCS4. The error seems to be caused by multiple rows being returned. I did see an earlier posting with the same error message. The response suggested a template error, but this is clearly not the case here. The additional evidence I've gathered so far: - I'm running the test directly from the ZSQL method, so there's no template involved. - If I use the same query with an additional "where" clause to ensure that only one row is returned, it works - If I use a value in the 'where' clause with no rows returned, it works - The same ZSQL query is being used on a Windows machine running Zope and the free ZODBC module without a problem - The query has been verified directly in mysql-client-browser Other info: - The database is MySQL 4.1.10A-0 - iODBC is the DB driver RJ Juneau -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050505/68d278bf/attachment-0095.htm From mal at egenix.com Thu May 5 12:37:43 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Feb 5 16:01:23 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c5512e$f72798c0$6505a8c0@rjlaptop> References: <000301c5512e$f72798c0$6505a8c0@rjlaptop> Message-ID: <4279E967.6010904@egenix.com> RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 > with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 09:37:42 2005 From: rj at maxxian.com (RJ Juneau) Date: Sun Feb 5 16:01:23 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000101c5516f$3b96de90$6505a8c0@rjlaptop> More interesting info on the problem: If I execute the query directly in the "test" window of the base eGenix mxODBC Database Connection window, it works fine and returns the 20 lines expected. That could point to a problem in the rendering, which seems to be where the traceback ends. Note that within the same Zope system I also have an ODBC connection to a Sybase database, and I have successfully tested multi-line ZSQL queries there. This is the traceback: Time 2005/05/05 07:55:15.294 GMT-4 Exception Type KeyError Exception Value 'query' Traceback (innermost last): Module ZPublisher.Publish, line 101, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 39, in call_object Module Shared.DC.ZRDB.DA, line 337, in manage_test Module DocumentTemplate.DT_String, line 474, in __call__ Module DocumentTemplate.DT_In, line 602, in renderwb Module DocumentTemplate.DT_Var, line 219, in render KeyError: 'query' I don't think the following is an issue, but I'll include it for completeness.I am also getting the following iODBC warnings and errors in the Zope console log, which are related to the ODBC parameters being passed by iODBC. Note that these errors also appear for all of the successful queries. [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (Setup). [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (UsageCount). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Timeout). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Reuse). As for the ZSQL snippet from the template... Since there's no template involved yet (I'm still testing directly from the ZSQL method), I assume you mean the SQL code? select h.host_name, s.system_name, s.system_handle, count(*) from terminal t, system_map s, host h where t.system_index = s.system_index and s.host_index = h.host_index group by s.system_name order by h.host_name Nothing complicated here. There are no parameters passed to the query. RJ -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: May 5, 2005 5:38 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: Re: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is > 2.3.4 with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ---------------------------------------------------------------------- > -- > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 16:00:32 2005 From: charlie at egenix.com (Charlie Clark) Date: Sun Feb 5 16:01:23 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000101c5516f$3b96de90$6505a8c0@rjlaptop> References: <000101c5516f$3b96de90$6505a8c0@rjlaptop> Message-ID: <20050505150032.644.1@bepc.1115296715.fake> On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base eGenix > mxODBC Database Connection window, it works fine and returns the 20 > lines expected. That could point to a problem in the rendering, which > seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection to > a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 10:22:17 2005 From: rj at maxxian.com (RJ Juneau) Date: Sun Feb 5 16:01:23 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505150032.644.1@bepc.1115296715.fake> Message-ID: <000201c55175$75bcad10$6505a8c0@rjlaptop> At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 11:47:14 2005 From: rj at maxxian.com (RJ Juneau) Date: Sun Feb 5 16:01:23 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c55181$549be0e0$6505a8c0@rjlaptop> Charlie, I found a fix. Here it is in case anyone else runs into this. You were correct - the problem is in another part of Zope. Based on your feedback, I did a bit more searching and found something here: http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. html The problem appears to be in Zope versions after 2.7.0. I'm running 2.7.6, and the post indicates that it also happens in 2.7.4. The solution: Edit file /lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. There are two lines in the file that start with . Edit them as follows: Change first line to: Change second line to: Just to be after, I shut down Zope before I made the changes and restarted it after. Thanks for the help! RJ -----Original Message----- From: RJ Juneau [mailto:rj@maxxian.com] Sent: May 5, 2005 9:22 AM To: 'Charlie Clark' Cc: 'egenix-users@lists.egenix.com' Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 17:57:25 2005 From: charlie at egenix.com (Charlie Clark) Date: Sun Feb 5 16:01:23 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <20050505165725.3380.2@bepc.1115296715.fake> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Thu May 5 09:15:21 2005 From: charlie at egenix.com (Charlie Clark) Date: Sun Feb 5 16:01:23 2006 Subject: [Zope-DB] RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <000001c55185$41477730$6b00a8c0@fonacier.local> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________ Zope-DB mailing list Zope-DB@zope.org http://mail.zope.org/mailman/listinfo/zope-db From rj at maxxian.com Thu May 5 12:38:00 2005 From: rj at maxxian.com (RJ Juneau) Date: Sun Feb 5 16:01:23 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000001c55188$6b841eb0$6505a8c0@rjlaptop> I just double-checked. Zope-2.7.6-final. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 12:49:16 2005 From: rj at maxxian.com (RJ Juneau) Date: Sun Feb 5 16:01:23 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000501c55189$fe149ba0$6505a8c0@rjlaptop> Charlie, The fix has only been applied for 2.7.7, 2.8b2. The info is in the original bug report which is closed and can be found here: http://www.zope.org/Collectors/Zope/1745 RJ -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Fri May 6 11:50:09 2005 From: rj at maxxian.com (RJ Juneau) Date: Sun Feb 5 16:01:23 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC Message-ID: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Still on eval for the product. I cannot get a stable connection to Sybase via the iODBC drivers. - The Sybase ODBC connection - including a query - have been verified at the iODBC level. - The setup is already working well for ODBC connection to MySQL. Symptoms include: - If I click on "Open Connection", it still comes back with "Connection Closed" when I go to a ZSQL method - Using 'Connect on Demand' is not working either. - Clicking "Open Connection" gives me the following error: Connection string: DSN=lixbox_sybase; UID=sa; PWD=XXXXXXX Connection pool entry: 0 Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection rejected by data source', 7952) The odbc.ini definition for DSN "lixbox_sybase" is as follows: [lixbox_sybase] JetFix = No NoRowSetSizeLimit = No Description = Test connection to listbox Options = LIXBOX DSQUERY = SQLSERVER TDSHOST = lixbox TDSPORT = 5000 TDSVER = 5.0 SQLSERVER_CATALOG = N CURSOR_SENSITIVITY = LOW UserName = sa Password = XXXXXXXX ServerType = Sybase 10/11/12 Driver = /opt/openlink/lib/sql_mt_lt.so Database = pubs2 ReadOnly = no NoAutoCommit = No NoLoginBox = No FetchBufferSize = 60 Other relevant data: - Connecting via OpenLink's iODBC - Zope 2.7.6-final - Python 2.3.4 - Connection to Sybase has been successfully tested with iODBC, including issuing a query - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC connection RJ Juneau Chief Technology Officer Maxxian Integration Inc. 155 Westhampton Drive Thornhill, Ontario Canada L4J 7X2 E-mail: rj@maxxian.com Phone: +1 905 482 9429 Cell: +1 416 897 6682 Toll free: +1 866 758 9161 Fax: +1 647 722 2038 -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050506/aef33361/attachment-0095.htm From mal at egenix.com Fri May 6 18:27:37 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Feb 5 16:01:23 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC In-Reply-To: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> References: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Message-ID: <427B8CE9.1010601@egenix.com> RJ Juneau wrote: > Still on eval for the product. > > I cannot get a stable connection to Sybase via the iODBC drivers. > > - The Sybase ODBC connection - including a query - have been verified at > the iODBC level. > - The setup is already working well for ODBC connection to MySQL. > > Symptoms include: > > - If I click on "Open Connection", it still comes back with "Connection > Closed" when I go to a ZSQL method > - Using 'Connect on Demand' is not working either. > - Clicking "Open Connection" gives me the following error: > > Connection string: DSN=lixbox_sybase; > UID=sa; > PWD=XXXXXXX Try writing the connection string on one line and without whitespace. ODBC drivers sometimes have problems with this. > Connection pool entry: 0 > Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection > rejected by data source', 7952) This is a generic error that relates to authentication or firewall problems. It is possible that turning on ODBC tracing the ODBC manager will give more clues as to the real cause of the problem. > The odbc.ini definition for DSN "lixbox_sybase" is as follows: > > [lixbox_sybase] > JetFix = No > NoRowSetSizeLimit = No > Description = Test connection to listbox > Options = LIXBOX > DSQUERY = SQLSERVER > TDSHOST = lixbox > TDSPORT = 5000 > TDSVER = 5.0 > SQLSERVER_CATALOG = N > CURSOR_SENSITIVITY = LOW > UserName = sa > Password = XXXXXXXX > ServerType = Sybase 10/11/12 > Driver = /opt/openlink/lib/sql_mt_lt.so > Database = pubs2 > ReadOnly = no > NoAutoCommit = No > NoLoginBox = No > FetchBufferSize = 60 > > > Other relevant data: > - Connecting via OpenLink's iODBC > - Zope 2.7.6-final > - Python 2.3.4 > - Connection to Sybase has been successfully tested with iODBC, > including issuing a query > - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC > connection > > > > RJ Juneau > Chief Technology Officer > Maxxian Integration Inc. > 155 Westhampton Drive > Thornhill, Ontario > Canada L4J 7X2 > E-mail: rj@maxxian.com > Phone: +1 905 482 9429 > Cell: +1 416 897 6682 > Toll free: +1 866 758 9161 > Fax: +1 647 722 2038 > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 06 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From calisp at gmail.com Sun May 15 23:49:03 2005 From: calisp at gmail.com (calisp@gmail.com) Date: Sun Feb 5 16:01:23 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK Message-ID: Hi, I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the following error... 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the last phase of a two-phase commit. This shouldn't happen. Traceback (most recent call last): File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one jar.tpc_finish(self) File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish try: self._finish() File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could not perform COMMIT or ROLLBACK', 1023) What could be causing this? Can I get the mxODBCZopeDA source from somewhere? It would make debugging this much easier. Thanks, Calisp. From mal at egenix.com Mon May 16 13:52:12 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Feb 5 16:01:23 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK In-Reply-To: References: Message-ID: <42887B5C.4010109@egenix.com> calisp@gmail.com wrote: > Hi, > > I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with > unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the > following error... > > 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the > last phase of a two-phase commit. This shouldn't happen. > Traceback (most recent call last): > File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one > jar.tpc_finish(self) > File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish > try: self._finish() > File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish > File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler > ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could > not perform COMMIT or ROLLBACK', 1023) You should have a look at the database logs to see what prevented the commit from being completed. > What could be causing this? Hard to say: mxODBCZopeDA is trying to commit the transaction, but the driver or database failed to complete the request. The above error was generated by the ODBC driver. This could be network or DNS problems, or be related to a bug in FreeTDS (which is getting more stable with every new release, but should still be considered beta quality software at the moment). > Can I get the mxODBCZopeDA source from > somewhere? It would make debugging this much easier. Getting the source is not an option and won't help much either since the source of the problem is not mxODBCZopeDA. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 16 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Sun May 1 21:29:25 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Feb 5 20:01:15 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <427259F3.4090806@egenix.com> References: <20050427130906.52878.qmail@web30008.mail.mud.yahoo.com> <427259F3.4090806@egenix.com> Message-ID: <42752005.7080904@egenix.com> M.-A. Lemburg wrote: > David Rushby wrote: > >> --- "M.-A. Lemburg" wrote: >> >>> Are you using the standard mxDateTime build or one >>> with WANT_SUBCLASSABLE_TYPES defined... >> >> >> >> Presumably "the standard", since I just built with 'py24d setup.py >> build', making no attempt to enable special directives. >> >> >>> ... (mxDateTime_Deallocate is only used by the latter)? >> >> >> >> That's true in 2.1.0-2005-04-15, but not in 2.1.0b5. >> >> >>> In any case, please try our latest snapshot: >>> >>> >> >> http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-04-15.zip >> >>> to see if that makes any difference. >> >> >> >> I can't build it out of the box: > > > Hmm, looks like distutils' sdist command doesn't like our new > repository layout which uses symlinks (after we've switched to > subversion). > > We'll have to debug distutils first, I guess :-( Ok, we've found the problem and fixed it. Here's the new release (which does build out of the box at least on our boxes ;-): http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 01 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From davidrushby at yahoo.com Mon May 2 15:49:53 2005 From: davidrushby at yahoo.com (David Rushby) Date: Sun Feb 5 20:01:15 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Ok, we've found the problem and fixed it. Here's the new > release (which does build out of the box at least on our > boxes ;-): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip It does build now, but: py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" still behaves as it did when I submitted my original message: Fatal Python error: UNREF invalid object Aborted This is the same debug build of Python 2.4.1 that I was previously using, running the same configuration (CentOS Linux 4.0/i386, everything compiled with GCC 3.4.3). Have you examined my original claim as to the cause of the bug? __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 10:21:55 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Feb 5 20:01:15 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> References: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> Message-ID: <42772693.8050306@egenix.com> David Rushby wrote: > --- "M.-A. Lemburg" wrote: > >>Ok, we've found the problem and fixed it. Here's the new >>release (which does build out of the box at least on our >>boxes ;-): >> >> > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip > > It does build now, but: > py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" > still behaves as it did when I submitted my original message: > Fatal Python error: UNREF invalid object > Aborted > > This is the same debug build of Python 2.4.1 that I was previously > using, running the same configuration (CentOS Linux 4.0/i386, > everything compiled with GCC 3.4.3). > > Have you examined my original claim as to the cause of the bug? No. We haven't had time for looking into it. I'm not sure whether your analysis of the problem is correct: if you don't define WANT_SUBCLASSABLE_TYPES, the API mxDateTime_Deallocate() is neither defined nor used. Furthermore, PyObject_Del() is only called by mxDateTime_Free() if you have explicitely edited mxDateTime.c to disabled the free list #defines. In a standard build, PyObject_Del() is only called at module finalization time. Note that the reason we call mxDateTime_Free() in the constructor is that we don't want the destructor of the object to be called. Py_DECREF() would call the destructor (mxDateTime_Deallocate). It is possible that the debug code in Python complains about the refcount in the object not being 0 at the time the object is finalized (module finalization time), but I don't see any such checks in PyObject_Free() (which is what PyObject_Del() maps to). Again, all of this does not happen in regular non-debug Python builds. Please be aware that we don't support debug builds, so fixing the problem (if there is one - gcc has some serious optimization problems on some combinations of platform and version) will take a while. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 09:27:37 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Sun Feb 5 20:01:15 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 Message-ID: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Hi all- I am trying to build the mx-base package, v.2.0.6. This will be used with postgresql 7.3.9, psycopg 1.1.18, and Roundup 0.8.2. RHEL 3.0 Python 2.3 egenix-mx-base-2.0.6.tar.gz I performed a: /usr/local/bin/python2.3 setup.py install Everything looks proper with the exeception of this series of warning statements: ----------------- gcc -pthread -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fno-strict-aliasing -fPIC -Imx/BeeBase/mxBeeBase -I/usr/local/incl ude/python2.3 -I/usr/local/include -c mx/BeeBase/mxBeeBase/btr.c -o build/temp.linux-i686-2.3/mx/BeeBase/mxBeeBase/mxBeeBa se/mx/BeeBase/mxBeeBase/btr.o mx/BeeBase/mxBeeBase/btr.c: In function `dumpBuf': mx/BeeBase/mxBeeBase/btr.c:249: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:250: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:255: warning: unsigned int format, long unsigned int arg (arg 4) mx/BeeBase/mxBeeBase/btr.c:256: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c: In function `_validateTree': mx/BeeBase/mxBeeBase/btr.c:330: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:337: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:339: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:349: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:351: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 3) creating build/lib.linux-i686-2.3/mx/BeeBase creating build/lib.linux-i686-2.3/mx/BeeBase/mxBeeBase -------------- Would someone be kind enough to let me know whether these messages were expected, and if not, how I might resolve these? Thanks! DC __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 22:06:33 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Feb 5 20:01:15 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> References: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Message-ID: <4277CBB9.8020302@egenix.com> Dianne Chen wrote: > Hi all- > > I am trying to build the mx-base package, v.2.0.6. > This will be used with postgresql 7.3.9, psycopg > 1.1.18, and Roundup 0.8.2. > > RHEL 3.0 > Python 2.3 > egenix-mx-base-2.0.6.tar.gz > > I performed a: > > /usr/local/bin/python2.3 setup.py install > > Everything looks proper with the exeception of this > series of warning statements: > > ----------------- > ... > -------------- > > Would someone be kind enough to let me know whether > these messages were expected, and if not, how I might > resolve these? These warning can safely be ignored. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 13:41:14 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Sun Feb 5 20:01:15 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: 6667 Message-ID: <20050503194114.72091.qmail@web31414.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Dianne Chen wrote: > > Hi all- > > > > I am trying to build the mx-base package, v.2.0.6. > > This will be used with postgresql 7.3.9, psycopg > > 1.1.18, and Roundup 0.8.2. > > > > RHEL 3.0 > > Python 2.3 > > egenix-mx-base-2.0.6.tar.gz > > > > I performed a: > > > > /usr/local/bin/python2.3 setup.py install > > > > Everything looks proper with the exeception of > this > > series of warning statements: > > > > ----------------- > > ... > > -------------- > > > > Would someone be kind enough to let me know > whether > > these messages were expected, and if not, how I > might > > resolve these? > > These warning can safely be ignored. > > -- > Marc-Andre Lemburg > eGenix.com > Marc- Thank you very much for the reply. It helps greatly. With kind regards, DC __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From davidrushby at yahoo.com Tue May 3 17:18:46 2005 From: davidrushby at yahoo.com (David Rushby) Date: Sun Feb 5 20:01:15 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050503231846.35012.qmail@web30009.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > I'm not sure whether your analysis of the problem is correct... Indeed, my original analysis wasn't correct; I think this one is. The fatal error I'm complaining about only arises if the arguments to DateTime.DateTime are invalid, so that the object is deallocated in the onError block of mxDateTime_FromDateAndTime. If the object is created successfully, and later deallocated by Python's garbage collector, the fatal error doesn't arise. Here's my analysis of the problem: --- If the debugging directive Py_TRACE_REFS is enabled, as it is in my case, the Python interpreter maintains a doubly linked list of all Python objects (named refchain) via the _ob_next and _ob_prev pointers added to PyObject via _PyObject_HEAD_EXTRA. Each object is inserted into refchain by the _Py_AddToAllObjects call in _Py_NewReference, and removed from refchain by the _Py_ForgetReference call in _Py_Dealloc. _Py_ForgetReference performs an integrity check on the object being deallocated (op) to make sure that its neighbors in refchain recognize it. Specifically, _Py_ForgetReference verifies that the _ob_next pointer of the previous object in refchain (op->_ob_prev->_ob_next) points to op, and that the _ob_prev pointer of the next object in refchain (op->_ob_next->_ob_prev) points to op. If either of those conditions is false, the interpreter raises the fatal error I'm seeing. After mxDateTime_New pulls an mxDateTimeObject out of the free list, it calls _Py_NewReference on that object to transform it from a "conceptually deallocated" object to a "conceptually allocated" one. _Py_NewReference inserts the object into refchain. Later, when the object is being "conceptually deallocated", it should be removed from refchain with _Py_ForgetReference. The version of _Py_Dealloc that's active when Py_TRACE_REFS is enabled does this (_Py_Dealloc is the element of Py_DECREF that performs the actual destruction). _Py_Dealloc first calls _Py_ForgetReference to remove the object from refchain, then calls the object's destructor (op->ob_type->tp_dealloc). If WANT_SUBCLASSABLE_TYPES is not defined (it is not in my case), the destructor for mxDateTime_Type is mxDateTime_Free. So, if a DateTime object is deallocated normally, as a result of its reference count falling to zero, _Py_Dealloc is called on the object, which first removes it from refchain, then passes it to mxDateTime_Free. If a DateTime object is destroyed prematurely, as a result of invalid arguments to its destructor, the onError handler calls mxDateTime_Free, so the object is "conceptually deallocated" (placed in the free list), *but* the object is not removed from refchain. So if a refchain-membership-integrity-check is performed on the object in question or one of its immediate neighbors in refchain, that integrity check fails, leading to the fatal error. --- The solution is to 'Py_DECREF(...)' the object in the onError handler of its constructor, instead of passing the object directly to mxDateTime_Free. That change solves two problems: 1) It causes _Py_Dealloc to execute, which in turn executes _Py_ForgetReference, so the object is removed from refchain, as it should be. 2) At present, objects that are created successfully and later deallocated by normal reference count mechanics have a reference count of 0 when they enter the free list, whereas objects whose constructors abort their creation due to invalid arguments have a reference count of 1 when they enter the free list. Although AFAIK this doesn't cause an actual execution problem (because the object's reference count is *explicitly set to 1* rather than *incremented by 1* when the object is later "conceptually allocated" by _Py_NewReference), it is likely to confuse future maintainers and thereby lead to the introduction of an actual execution problem. I assume that if you agree that this is a reasonable solution, you'll want to apply the change not only to mxDateTime_FromDateAndTime, but to all similar constructors in mxDateTime.c. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From rj at maxxian.com Thu May 5 01:57:40 2005 From: rj at maxxian.com (RJ Juneau) Date: Sun Feb 5 20:01:15 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c5512e$f72798c0$6505a8c0@rjlaptop> I'm on the 30 day evaluation for mxodbc_zope_da. I'm getting the following error when I submit some queries: Error Type: KeyError Error Value: 'query' I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 with UCS4. The error seems to be caused by multiple rows being returned. I did see an earlier posting with the same error message. The response suggested a template error, but this is clearly not the case here. The additional evidence I've gathered so far: - I'm running the test directly from the ZSQL method, so there's no template involved. - If I use the same query with an additional "where" clause to ensure that only one row is returned, it works - If I use a value in the 'where' clause with no rows returned, it works - The same ZSQL query is being used on a Windows machine running Zope and the free ZODBC module without a problem - The query has been verified directly in mysql-client-browser Other info: - The database is MySQL 4.1.10A-0 - iODBC is the DB driver RJ Juneau -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050505/68d278bf/attachment-0096.htm From mal at egenix.com Thu May 5 12:37:43 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Feb 5 20:01:15 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c5512e$f72798c0$6505a8c0@rjlaptop> References: <000301c5512e$f72798c0$6505a8c0@rjlaptop> Message-ID: <4279E967.6010904@egenix.com> RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 > with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 09:37:42 2005 From: rj at maxxian.com (RJ Juneau) Date: Sun Feb 5 20:01:15 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000101c5516f$3b96de90$6505a8c0@rjlaptop> More interesting info on the problem: If I execute the query directly in the "test" window of the base eGenix mxODBC Database Connection window, it works fine and returns the 20 lines expected. That could point to a problem in the rendering, which seems to be where the traceback ends. Note that within the same Zope system I also have an ODBC connection to a Sybase database, and I have successfully tested multi-line ZSQL queries there. This is the traceback: Time 2005/05/05 07:55:15.294 GMT-4 Exception Type KeyError Exception Value 'query' Traceback (innermost last): Module ZPublisher.Publish, line 101, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 39, in call_object Module Shared.DC.ZRDB.DA, line 337, in manage_test Module DocumentTemplate.DT_String, line 474, in __call__ Module DocumentTemplate.DT_In, line 602, in renderwb Module DocumentTemplate.DT_Var, line 219, in render KeyError: 'query' I don't think the following is an issue, but I'll include it for completeness.I am also getting the following iODBC warnings and errors in the Zope console log, which are related to the ODBC parameters being passed by iODBC. Note that these errors also appear for all of the successful queries. [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (Setup). [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (UsageCount). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Timeout). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Reuse). As for the ZSQL snippet from the template... Since there's no template involved yet (I'm still testing directly from the ZSQL method), I assume you mean the SQL code? select h.host_name, s.system_name, s.system_handle, count(*) from terminal t, system_map s, host h where t.system_index = s.system_index and s.host_index = h.host_index group by s.system_name order by h.host_name Nothing complicated here. There are no parameters passed to the query. RJ -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: May 5, 2005 5:38 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: Re: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is > 2.3.4 with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ---------------------------------------------------------------------- > -- > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 16:00:32 2005 From: charlie at egenix.com (Charlie Clark) Date: Sun Feb 5 20:01:15 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000101c5516f$3b96de90$6505a8c0@rjlaptop> References: <000101c5516f$3b96de90$6505a8c0@rjlaptop> Message-ID: <20050505150032.644.1@bepc.1115296715.fake> On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base eGenix > mxODBC Database Connection window, it works fine and returns the 20 > lines expected. That could point to a problem in the rendering, which > seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection to > a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 10:22:17 2005 From: rj at maxxian.com (RJ Juneau) Date: Sun Feb 5 20:01:16 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505150032.644.1@bepc.1115296715.fake> Message-ID: <000201c55175$75bcad10$6505a8c0@rjlaptop> At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 11:47:14 2005 From: rj at maxxian.com (RJ Juneau) Date: Sun Feb 5 20:01:16 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c55181$549be0e0$6505a8c0@rjlaptop> Charlie, I found a fix. Here it is in case anyone else runs into this. You were correct - the problem is in another part of Zope. Based on your feedback, I did a bit more searching and found something here: http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. html The problem appears to be in Zope versions after 2.7.0. I'm running 2.7.6, and the post indicates that it also happens in 2.7.4. The solution: Edit file /lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. There are two lines in the file that start with . Edit them as follows: Change first line to: Change second line to: Just to be after, I shut down Zope before I made the changes and restarted it after. Thanks for the help! RJ -----Original Message----- From: RJ Juneau [mailto:rj@maxxian.com] Sent: May 5, 2005 9:22 AM To: 'Charlie Clark' Cc: 'egenix-users@lists.egenix.com' Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 17:57:25 2005 From: charlie at egenix.com (Charlie Clark) Date: Sun Feb 5 20:01:16 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <20050505165725.3380.2@bepc.1115296715.fake> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Thu May 5 09:15:21 2005 From: charlie at egenix.com (Charlie Clark) Date: Sun Feb 5 20:01:16 2006 Subject: [Zope-DB] RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <000001c55185$41477730$6b00a8c0@fonacier.local> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________ Zope-DB mailing list Zope-DB@zope.org http://mail.zope.org/mailman/listinfo/zope-db From rj at maxxian.com Thu May 5 12:38:00 2005 From: rj at maxxian.com (RJ Juneau) Date: Sun Feb 5 20:01:16 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000001c55188$6b841eb0$6505a8c0@rjlaptop> I just double-checked. Zope-2.7.6-final. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 12:49:16 2005 From: rj at maxxian.com (RJ Juneau) Date: Sun Feb 5 20:01:16 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000501c55189$fe149ba0$6505a8c0@rjlaptop> Charlie, The fix has only been applied for 2.7.7, 2.8b2. The info is in the original bug report which is closed and can be found here: http://www.zope.org/Collectors/Zope/1745 RJ -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Fri May 6 11:50:09 2005 From: rj at maxxian.com (RJ Juneau) Date: Sun Feb 5 20:01:16 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC Message-ID: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Still on eval for the product. I cannot get a stable connection to Sybase via the iODBC drivers. - The Sybase ODBC connection - including a query - have been verified at the iODBC level. - The setup is already working well for ODBC connection to MySQL. Symptoms include: - If I click on "Open Connection", it still comes back with "Connection Closed" when I go to a ZSQL method - Using 'Connect on Demand' is not working either. - Clicking "Open Connection" gives me the following error: Connection string: DSN=lixbox_sybase; UID=sa; PWD=XXXXXXX Connection pool entry: 0 Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection rejected by data source', 7952) The odbc.ini definition for DSN "lixbox_sybase" is as follows: [lixbox_sybase] JetFix = No NoRowSetSizeLimit = No Description = Test connection to listbox Options = LIXBOX DSQUERY = SQLSERVER TDSHOST = lixbox TDSPORT = 5000 TDSVER = 5.0 SQLSERVER_CATALOG = N CURSOR_SENSITIVITY = LOW UserName = sa Password = XXXXXXXX ServerType = Sybase 10/11/12 Driver = /opt/openlink/lib/sql_mt_lt.so Database = pubs2 ReadOnly = no NoAutoCommit = No NoLoginBox = No FetchBufferSize = 60 Other relevant data: - Connecting via OpenLink's iODBC - Zope 2.7.6-final - Python 2.3.4 - Connection to Sybase has been successfully tested with iODBC, including issuing a query - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC connection RJ Juneau Chief Technology Officer Maxxian Integration Inc. 155 Westhampton Drive Thornhill, Ontario Canada L4J 7X2 E-mail: rj@maxxian.com Phone: +1 905 482 9429 Cell: +1 416 897 6682 Toll free: +1 866 758 9161 Fax: +1 647 722 2038 -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050506/aef33361/attachment-0096.htm From mal at egenix.com Fri May 6 18:27:37 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Feb 5 20:01:16 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC In-Reply-To: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> References: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Message-ID: <427B8CE9.1010601@egenix.com> RJ Juneau wrote: > Still on eval for the product. > > I cannot get a stable connection to Sybase via the iODBC drivers. > > - The Sybase ODBC connection - including a query - have been verified at > the iODBC level. > - The setup is already working well for ODBC connection to MySQL. > > Symptoms include: > > - If I click on "Open Connection", it still comes back with "Connection > Closed" when I go to a ZSQL method > - Using 'Connect on Demand' is not working either. > - Clicking "Open Connection" gives me the following error: > > Connection string: DSN=lixbox_sybase; > UID=sa; > PWD=XXXXXXX Try writing the connection string on one line and without whitespace. ODBC drivers sometimes have problems with this. > Connection pool entry: 0 > Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection > rejected by data source', 7952) This is a generic error that relates to authentication or firewall problems. It is possible that turning on ODBC tracing the ODBC manager will give more clues as to the real cause of the problem. > The odbc.ini definition for DSN "lixbox_sybase" is as follows: > > [lixbox_sybase] > JetFix = No > NoRowSetSizeLimit = No > Description = Test connection to listbox > Options = LIXBOX > DSQUERY = SQLSERVER > TDSHOST = lixbox > TDSPORT = 5000 > TDSVER = 5.0 > SQLSERVER_CATALOG = N > CURSOR_SENSITIVITY = LOW > UserName = sa > Password = XXXXXXXX > ServerType = Sybase 10/11/12 > Driver = /opt/openlink/lib/sql_mt_lt.so > Database = pubs2 > ReadOnly = no > NoAutoCommit = No > NoLoginBox = No > FetchBufferSize = 60 > > > Other relevant data: > - Connecting via OpenLink's iODBC > - Zope 2.7.6-final > - Python 2.3.4 > - Connection to Sybase has been successfully tested with iODBC, > including issuing a query > - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC > connection > > > > RJ Juneau > Chief Technology Officer > Maxxian Integration Inc. > 155 Westhampton Drive > Thornhill, Ontario > Canada L4J 7X2 > E-mail: rj@maxxian.com > Phone: +1 905 482 9429 > Cell: +1 416 897 6682 > Toll free: +1 866 758 9161 > Fax: +1 647 722 2038 > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 06 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From calisp at gmail.com Sun May 15 23:49:03 2005 From: calisp at gmail.com (calisp@gmail.com) Date: Sun Feb 5 20:01:16 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK Message-ID: Hi, I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the following error... 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the last phase of a two-phase commit. This shouldn't happen. Traceback (most recent call last): File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one jar.tpc_finish(self) File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish try: self._finish() File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could not perform COMMIT or ROLLBACK', 1023) What could be causing this? Can I get the mxODBCZopeDA source from somewhere? It would make debugging this much easier. Thanks, Calisp. From mal at egenix.com Mon May 16 13:52:12 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Feb 5 20:01:16 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK In-Reply-To: References: Message-ID: <42887B5C.4010109@egenix.com> calisp@gmail.com wrote: > Hi, > > I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with > unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the > following error... > > 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the > last phase of a two-phase commit. This shouldn't happen. > Traceback (most recent call last): > File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one > jar.tpc_finish(self) > File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish > try: self._finish() > File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish > File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler > ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could > not perform COMMIT or ROLLBACK', 1023) You should have a look at the database logs to see what prevented the commit from being completed. > What could be causing this? Hard to say: mxODBCZopeDA is trying to commit the transaction, but the driver or database failed to complete the request. The above error was generated by the ODBC driver. This could be network or DNS problems, or be related to a bug in FreeTDS (which is getting more stable with every new release, but should still be considered beta quality software at the moment). > Can I get the mxODBCZopeDA source from > somewhere? It would make debugging this much easier. Getting the source is not an option and won't help much either since the source of the problem is not mxODBCZopeDA. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 16 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Sun May 1 21:29:25 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Feb 6 08:17:02 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <427259F3.4090806@egenix.com> References: <20050427130906.52878.qmail@web30008.mail.mud.yahoo.com> <427259F3.4090806@egenix.com> Message-ID: <42752005.7080904@egenix.com> M.-A. Lemburg wrote: > David Rushby wrote: > >> --- "M.-A. Lemburg" wrote: >> >>> Are you using the standard mxDateTime build or one >>> with WANT_SUBCLASSABLE_TYPES defined... >> >> >> >> Presumably "the standard", since I just built with 'py24d setup.py >> build', making no attempt to enable special directives. >> >> >>> ... (mxDateTime_Deallocate is only used by the latter)? >> >> >> >> That's true in 2.1.0-2005-04-15, but not in 2.1.0b5. >> >> >>> In any case, please try our latest snapshot: >>> >>> >> >> http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-04-15.zip >> >>> to see if that makes any difference. >> >> >> >> I can't build it out of the box: > > > Hmm, looks like distutils' sdist command doesn't like our new > repository layout which uses symlinks (after we've switched to > subversion). > > We'll have to debug distutils first, I guess :-( Ok, we've found the problem and fixed it. Here's the new release (which does build out of the box at least on our boxes ;-): http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 01 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From davidrushby at yahoo.com Mon May 2 15:49:53 2005 From: davidrushby at yahoo.com (David Rushby) Date: Mon Feb 6 08:17:03 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Ok, we've found the problem and fixed it. Here's the new > release (which does build out of the box at least on our > boxes ;-): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip It does build now, but: py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" still behaves as it did when I submitted my original message: Fatal Python error: UNREF invalid object Aborted This is the same debug build of Python 2.4.1 that I was previously using, running the same configuration (CentOS Linux 4.0/i386, everything compiled with GCC 3.4.3). Have you examined my original claim as to the cause of the bug? __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 10:21:55 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Feb 6 08:17:03 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> References: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> Message-ID: <42772693.8050306@egenix.com> David Rushby wrote: > --- "M.-A. Lemburg" wrote: > >>Ok, we've found the problem and fixed it. Here's the new >>release (which does build out of the box at least on our >>boxes ;-): >> >> > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip > > It does build now, but: > py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" > still behaves as it did when I submitted my original message: > Fatal Python error: UNREF invalid object > Aborted > > This is the same debug build of Python 2.4.1 that I was previously > using, running the same configuration (CentOS Linux 4.0/i386, > everything compiled with GCC 3.4.3). > > Have you examined my original claim as to the cause of the bug? No. We haven't had time for looking into it. I'm not sure whether your analysis of the problem is correct: if you don't define WANT_SUBCLASSABLE_TYPES, the API mxDateTime_Deallocate() is neither defined nor used. Furthermore, PyObject_Del() is only called by mxDateTime_Free() if you have explicitely edited mxDateTime.c to disabled the free list #defines. In a standard build, PyObject_Del() is only called at module finalization time. Note that the reason we call mxDateTime_Free() in the constructor is that we don't want the destructor of the object to be called. Py_DECREF() would call the destructor (mxDateTime_Deallocate). It is possible that the debug code in Python complains about the refcount in the object not being 0 at the time the object is finalized (module finalization time), but I don't see any such checks in PyObject_Free() (which is what PyObject_Del() maps to). Again, all of this does not happen in regular non-debug Python builds. Please be aware that we don't support debug builds, so fixing the problem (if there is one - gcc has some serious optimization problems on some combinations of platform and version) will take a while. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 09:27:37 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Mon Feb 6 08:17:03 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 Message-ID: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Hi all- I am trying to build the mx-base package, v.2.0.6. This will be used with postgresql 7.3.9, psycopg 1.1.18, and Roundup 0.8.2. RHEL 3.0 Python 2.3 egenix-mx-base-2.0.6.tar.gz I performed a: /usr/local/bin/python2.3 setup.py install Everything looks proper with the exeception of this series of warning statements: ----------------- gcc -pthread -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fno-strict-aliasing -fPIC -Imx/BeeBase/mxBeeBase -I/usr/local/incl ude/python2.3 -I/usr/local/include -c mx/BeeBase/mxBeeBase/btr.c -o build/temp.linux-i686-2.3/mx/BeeBase/mxBeeBase/mxBeeBa se/mx/BeeBase/mxBeeBase/btr.o mx/BeeBase/mxBeeBase/btr.c: In function `dumpBuf': mx/BeeBase/mxBeeBase/btr.c:249: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:250: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:255: warning: unsigned int format, long unsigned int arg (arg 4) mx/BeeBase/mxBeeBase/btr.c:256: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c: In function `_validateTree': mx/BeeBase/mxBeeBase/btr.c:330: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:337: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:339: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:349: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:351: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 3) creating build/lib.linux-i686-2.3/mx/BeeBase creating build/lib.linux-i686-2.3/mx/BeeBase/mxBeeBase -------------- Would someone be kind enough to let me know whether these messages were expected, and if not, how I might resolve these? Thanks! DC __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 22:06:33 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Feb 6 08:17:03 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> References: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Message-ID: <4277CBB9.8020302@egenix.com> Dianne Chen wrote: > Hi all- > > I am trying to build the mx-base package, v.2.0.6. > This will be used with postgresql 7.3.9, psycopg > 1.1.18, and Roundup 0.8.2. > > RHEL 3.0 > Python 2.3 > egenix-mx-base-2.0.6.tar.gz > > I performed a: > > /usr/local/bin/python2.3 setup.py install > > Everything looks proper with the exeception of this > series of warning statements: > > ----------------- > ... > -------------- > > Would someone be kind enough to let me know whether > these messages were expected, and if not, how I might > resolve these? These warning can safely be ignored. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 13:41:14 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Mon Feb 6 08:17:03 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: 6667 Message-ID: <20050503194114.72091.qmail@web31414.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Dianne Chen wrote: > > Hi all- > > > > I am trying to build the mx-base package, v.2.0.6. > > This will be used with postgresql 7.3.9, psycopg > > 1.1.18, and Roundup 0.8.2. > > > > RHEL 3.0 > > Python 2.3 > > egenix-mx-base-2.0.6.tar.gz > > > > I performed a: > > > > /usr/local/bin/python2.3 setup.py install > > > > Everything looks proper with the exeception of > this > > series of warning statements: > > > > ----------------- > > ... > > -------------- > > > > Would someone be kind enough to let me know > whether > > these messages were expected, and if not, how I > might > > resolve these? > > These warning can safely be ignored. > > -- > Marc-Andre Lemburg > eGenix.com > Marc- Thank you very much for the reply. It helps greatly. With kind regards, DC __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From davidrushby at yahoo.com Tue May 3 17:18:46 2005 From: davidrushby at yahoo.com (David Rushby) Date: Mon Feb 6 08:17:03 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050503231846.35012.qmail@web30009.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > I'm not sure whether your analysis of the problem is correct... Indeed, my original analysis wasn't correct; I think this one is. The fatal error I'm complaining about only arises if the arguments to DateTime.DateTime are invalid, so that the object is deallocated in the onError block of mxDateTime_FromDateAndTime. If the object is created successfully, and later deallocated by Python's garbage collector, the fatal error doesn't arise. Here's my analysis of the problem: --- If the debugging directive Py_TRACE_REFS is enabled, as it is in my case, the Python interpreter maintains a doubly linked list of all Python objects (named refchain) via the _ob_next and _ob_prev pointers added to PyObject via _PyObject_HEAD_EXTRA. Each object is inserted into refchain by the _Py_AddToAllObjects call in _Py_NewReference, and removed from refchain by the _Py_ForgetReference call in _Py_Dealloc. _Py_ForgetReference performs an integrity check on the object being deallocated (op) to make sure that its neighbors in refchain recognize it. Specifically, _Py_ForgetReference verifies that the _ob_next pointer of the previous object in refchain (op->_ob_prev->_ob_next) points to op, and that the _ob_prev pointer of the next object in refchain (op->_ob_next->_ob_prev) points to op. If either of those conditions is false, the interpreter raises the fatal error I'm seeing. After mxDateTime_New pulls an mxDateTimeObject out of the free list, it calls _Py_NewReference on that object to transform it from a "conceptually deallocated" object to a "conceptually allocated" one. _Py_NewReference inserts the object into refchain. Later, when the object is being "conceptually deallocated", it should be removed from refchain with _Py_ForgetReference. The version of _Py_Dealloc that's active when Py_TRACE_REFS is enabled does this (_Py_Dealloc is the element of Py_DECREF that performs the actual destruction). _Py_Dealloc first calls _Py_ForgetReference to remove the object from refchain, then calls the object's destructor (op->ob_type->tp_dealloc). If WANT_SUBCLASSABLE_TYPES is not defined (it is not in my case), the destructor for mxDateTime_Type is mxDateTime_Free. So, if a DateTime object is deallocated normally, as a result of its reference count falling to zero, _Py_Dealloc is called on the object, which first removes it from refchain, then passes it to mxDateTime_Free. If a DateTime object is destroyed prematurely, as a result of invalid arguments to its destructor, the onError handler calls mxDateTime_Free, so the object is "conceptually deallocated" (placed in the free list), *but* the object is not removed from refchain. So if a refchain-membership-integrity-check is performed on the object in question or one of its immediate neighbors in refchain, that integrity check fails, leading to the fatal error. --- The solution is to 'Py_DECREF(...)' the object in the onError handler of its constructor, instead of passing the object directly to mxDateTime_Free. That change solves two problems: 1) It causes _Py_Dealloc to execute, which in turn executes _Py_ForgetReference, so the object is removed from refchain, as it should be. 2) At present, objects that are created successfully and later deallocated by normal reference count mechanics have a reference count of 0 when they enter the free list, whereas objects whose constructors abort their creation due to invalid arguments have a reference count of 1 when they enter the free list. Although AFAIK this doesn't cause an actual execution problem (because the object's reference count is *explicitly set to 1* rather than *incremented by 1* when the object is later "conceptually allocated" by _Py_NewReference), it is likely to confuse future maintainers and thereby lead to the introduction of an actual execution problem. I assume that if you agree that this is a reasonable solution, you'll want to apply the change not only to mxDateTime_FromDateAndTime, but to all similar constructors in mxDateTime.c. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From rj at maxxian.com Thu May 5 01:57:40 2005 From: rj at maxxian.com (RJ Juneau) Date: Mon Feb 6 08:17:04 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c5512e$f72798c0$6505a8c0@rjlaptop> I'm on the 30 day evaluation for mxodbc_zope_da. I'm getting the following error when I submit some queries: Error Type: KeyError Error Value: 'query' I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 with UCS4. The error seems to be caused by multiple rows being returned. I did see an earlier posting with the same error message. The response suggested a template error, but this is clearly not the case here. The additional evidence I've gathered so far: - I'm running the test directly from the ZSQL method, so there's no template involved. - If I use the same query with an additional "where" clause to ensure that only one row is returned, it works - If I use a value in the 'where' clause with no rows returned, it works - The same ZSQL query is being used on a Windows machine running Zope and the free ZODBC module without a problem - The query has been verified directly in mysql-client-browser Other info: - The database is MySQL 4.1.10A-0 - iODBC is the DB driver RJ Juneau -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050505/68d278bf/attachment-0097.htm From mal at egenix.com Thu May 5 12:37:43 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Feb 6 08:17:04 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c5512e$f72798c0$6505a8c0@rjlaptop> References: <000301c5512e$f72798c0$6505a8c0@rjlaptop> Message-ID: <4279E967.6010904@egenix.com> RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 > with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 09:37:42 2005 From: rj at maxxian.com (RJ Juneau) Date: Mon Feb 6 08:17:04 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000101c5516f$3b96de90$6505a8c0@rjlaptop> More interesting info on the problem: If I execute the query directly in the "test" window of the base eGenix mxODBC Database Connection window, it works fine and returns the 20 lines expected. That could point to a problem in the rendering, which seems to be where the traceback ends. Note that within the same Zope system I also have an ODBC connection to a Sybase database, and I have successfully tested multi-line ZSQL queries there. This is the traceback: Time 2005/05/05 07:55:15.294 GMT-4 Exception Type KeyError Exception Value 'query' Traceback (innermost last): Module ZPublisher.Publish, line 101, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 39, in call_object Module Shared.DC.ZRDB.DA, line 337, in manage_test Module DocumentTemplate.DT_String, line 474, in __call__ Module DocumentTemplate.DT_In, line 602, in renderwb Module DocumentTemplate.DT_Var, line 219, in render KeyError: 'query' I don't think the following is an issue, but I'll include it for completeness.I am also getting the following iODBC warnings and errors in the Zope console log, which are related to the ODBC parameters being passed by iODBC. Note that these errors also appear for all of the successful queries. [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (Setup). [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (UsageCount). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Timeout). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Reuse). As for the ZSQL snippet from the template... Since there's no template involved yet (I'm still testing directly from the ZSQL method), I assume you mean the SQL code? select h.host_name, s.system_name, s.system_handle, count(*) from terminal t, system_map s, host h where t.system_index = s.system_index and s.host_index = h.host_index group by s.system_name order by h.host_name Nothing complicated here. There are no parameters passed to the query. RJ -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: May 5, 2005 5:38 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: Re: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is > 2.3.4 with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ---------------------------------------------------------------------- > -- > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 16:00:32 2005 From: charlie at egenix.com (Charlie Clark) Date: Mon Feb 6 08:17:04 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000101c5516f$3b96de90$6505a8c0@rjlaptop> References: <000101c5516f$3b96de90$6505a8c0@rjlaptop> Message-ID: <20050505150032.644.1@bepc.1115296715.fake> On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base eGenix > mxODBC Database Connection window, it works fine and returns the 20 > lines expected. That could point to a problem in the rendering, which > seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection to > a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 10:22:17 2005 From: rj at maxxian.com (RJ Juneau) Date: Mon Feb 6 08:17:04 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505150032.644.1@bepc.1115296715.fake> Message-ID: <000201c55175$75bcad10$6505a8c0@rjlaptop> At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 11:47:14 2005 From: rj at maxxian.com (RJ Juneau) Date: Mon Feb 6 08:17:05 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c55181$549be0e0$6505a8c0@rjlaptop> Charlie, I found a fix. Here it is in case anyone else runs into this. You were correct - the problem is in another part of Zope. Based on your feedback, I did a bit more searching and found something here: http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. html The problem appears to be in Zope versions after 2.7.0. I'm running 2.7.6, and the post indicates that it also happens in 2.7.4. The solution: Edit file /lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. There are two lines in the file that start with . Edit them as follows: Change first line to: Change second line to: Just to be after, I shut down Zope before I made the changes and restarted it after. Thanks for the help! RJ -----Original Message----- From: RJ Juneau [mailto:rj@maxxian.com] Sent: May 5, 2005 9:22 AM To: 'Charlie Clark' Cc: 'egenix-users@lists.egenix.com' Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 17:57:25 2005 From: charlie at egenix.com (Charlie Clark) Date: Mon Feb 6 08:17:05 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <20050505165725.3380.2@bepc.1115296715.fake> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Thu May 5 09:15:21 2005 From: charlie at egenix.com (Charlie Clark) Date: Mon Feb 6 08:17:05 2006 Subject: [Zope-DB] RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <000001c55185$41477730$6b00a8c0@fonacier.local> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________ Zope-DB mailing list Zope-DB@zope.org http://mail.zope.org/mailman/listinfo/zope-db From rj at maxxian.com Thu May 5 12:38:00 2005 From: rj at maxxian.com (RJ Juneau) Date: Mon Feb 6 08:17:06 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000001c55188$6b841eb0$6505a8c0@rjlaptop> I just double-checked. Zope-2.7.6-final. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 12:49:16 2005 From: rj at maxxian.com (RJ Juneau) Date: Mon Feb 6 08:17:06 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000501c55189$fe149ba0$6505a8c0@rjlaptop> Charlie, The fix has only been applied for 2.7.7, 2.8b2. The info is in the original bug report which is closed and can be found here: http://www.zope.org/Collectors/Zope/1745 RJ -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Fri May 6 11:50:09 2005 From: rj at maxxian.com (RJ Juneau) Date: Mon Feb 6 08:17:06 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC Message-ID: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Still on eval for the product. I cannot get a stable connection to Sybase via the iODBC drivers. - The Sybase ODBC connection - including a query - have been verified at the iODBC level. - The setup is already working well for ODBC connection to MySQL. Symptoms include: - If I click on "Open Connection", it still comes back with "Connection Closed" when I go to a ZSQL method - Using 'Connect on Demand' is not working either. - Clicking "Open Connection" gives me the following error: Connection string: DSN=lixbox_sybase; UID=sa; PWD=XXXXXXX Connection pool entry: 0 Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection rejected by data source', 7952) The odbc.ini definition for DSN "lixbox_sybase" is as follows: [lixbox_sybase] JetFix = No NoRowSetSizeLimit = No Description = Test connection to listbox Options = LIXBOX DSQUERY = SQLSERVER TDSHOST = lixbox TDSPORT = 5000 TDSVER = 5.0 SQLSERVER_CATALOG = N CURSOR_SENSITIVITY = LOW UserName = sa Password = XXXXXXXX ServerType = Sybase 10/11/12 Driver = /opt/openlink/lib/sql_mt_lt.so Database = pubs2 ReadOnly = no NoAutoCommit = No NoLoginBox = No FetchBufferSize = 60 Other relevant data: - Connecting via OpenLink's iODBC - Zope 2.7.6-final - Python 2.3.4 - Connection to Sybase has been successfully tested with iODBC, including issuing a query - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC connection RJ Juneau Chief Technology Officer Maxxian Integration Inc. 155 Westhampton Drive Thornhill, Ontario Canada L4J 7X2 E-mail: rj@maxxian.com Phone: +1 905 482 9429 Cell: +1 416 897 6682 Toll free: +1 866 758 9161 Fax: +1 647 722 2038 -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050506/aef33361/attachment-0097.htm From mal at egenix.com Fri May 6 18:27:37 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Feb 6 08:17:06 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC In-Reply-To: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> References: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Message-ID: <427B8CE9.1010601@egenix.com> RJ Juneau wrote: > Still on eval for the product. > > I cannot get a stable connection to Sybase via the iODBC drivers. > > - The Sybase ODBC connection - including a query - have been verified at > the iODBC level. > - The setup is already working well for ODBC connection to MySQL. > > Symptoms include: > > - If I click on "Open Connection", it still comes back with "Connection > Closed" when I go to a ZSQL method > - Using 'Connect on Demand' is not working either. > - Clicking "Open Connection" gives me the following error: > > Connection string: DSN=lixbox_sybase; > UID=sa; > PWD=XXXXXXX Try writing the connection string on one line and without whitespace. ODBC drivers sometimes have problems with this. > Connection pool entry: 0 > Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection > rejected by data source', 7952) This is a generic error that relates to authentication or firewall problems. It is possible that turning on ODBC tracing the ODBC manager will give more clues as to the real cause of the problem. > The odbc.ini definition for DSN "lixbox_sybase" is as follows: > > [lixbox_sybase] > JetFix = No > NoRowSetSizeLimit = No > Description = Test connection to listbox > Options = LIXBOX > DSQUERY = SQLSERVER > TDSHOST = lixbox > TDSPORT = 5000 > TDSVER = 5.0 > SQLSERVER_CATALOG = N > CURSOR_SENSITIVITY = LOW > UserName = sa > Password = XXXXXXXX > ServerType = Sybase 10/11/12 > Driver = /opt/openlink/lib/sql_mt_lt.so > Database = pubs2 > ReadOnly = no > NoAutoCommit = No > NoLoginBox = No > FetchBufferSize = 60 > > > Other relevant data: > - Connecting via OpenLink's iODBC > - Zope 2.7.6-final > - Python 2.3.4 > - Connection to Sybase has been successfully tested with iODBC, > including issuing a query > - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC > connection > > > > RJ Juneau > Chief Technology Officer > Maxxian Integration Inc. > 155 Westhampton Drive > Thornhill, Ontario > Canada L4J 7X2 > E-mail: rj@maxxian.com > Phone: +1 905 482 9429 > Cell: +1 416 897 6682 > Toll free: +1 866 758 9161 > Fax: +1 647 722 2038 > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 06 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From calisp at gmail.com Sun May 15 23:49:03 2005 From: calisp at gmail.com (calisp@gmail.com) Date: Mon Feb 6 08:17:06 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK Message-ID: Hi, I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the following error... 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the last phase of a two-phase commit. This shouldn't happen. Traceback (most recent call last): File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one jar.tpc_finish(self) File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish try: self._finish() File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could not perform COMMIT or ROLLBACK', 1023) What could be causing this? Can I get the mxODBCZopeDA source from somewhere? It would make debugging this much easier. Thanks, Calisp. From mal at egenix.com Mon May 16 13:52:12 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Feb 6 08:17:06 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK In-Reply-To: References: Message-ID: <42887B5C.4010109@egenix.com> calisp@gmail.com wrote: > Hi, > > I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with > unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the > following error... > > 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the > last phase of a two-phase commit. This shouldn't happen. > Traceback (most recent call last): > File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one > jar.tpc_finish(self) > File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish > try: self._finish() > File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish > File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler > ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could > not perform COMMIT or ROLLBACK', 1023) You should have a look at the database logs to see what prevented the commit from being completed. > What could be causing this? Hard to say: mxODBCZopeDA is trying to commit the transaction, but the driver or database failed to complete the request. The above error was generated by the ODBC driver. This could be network or DNS problems, or be related to a bug in FreeTDS (which is getting more stable with every new release, but should still be considered beta quality software at the moment). > Can I get the mxODBCZopeDA source from > somewhere? It would make debugging this much easier. Getting the source is not an option and won't help much either since the source of the problem is not mxODBCZopeDA. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 16 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Sun May 1 21:29:25 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Feb 6 12:03:15 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <427259F3.4090806@egenix.com> References: <20050427130906.52878.qmail@web30008.mail.mud.yahoo.com> <427259F3.4090806@egenix.com> Message-ID: <42752005.7080904@egenix.com> M.-A. Lemburg wrote: > David Rushby wrote: > >> --- "M.-A. Lemburg" wrote: >> >>> Are you using the standard mxDateTime build or one >>> with WANT_SUBCLASSABLE_TYPES defined... >> >> >> >> Presumably "the standard", since I just built with 'py24d setup.py >> build', making no attempt to enable special directives. >> >> >>> ... (mxDateTime_Deallocate is only used by the latter)? >> >> >> >> That's true in 2.1.0-2005-04-15, but not in 2.1.0b5. >> >> >>> In any case, please try our latest snapshot: >>> >>> >> >> http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-04-15.zip >> >>> to see if that makes any difference. >> >> >> >> I can't build it out of the box: > > > Hmm, looks like distutils' sdist command doesn't like our new > repository layout which uses symlinks (after we've switched to > subversion). > > We'll have to debug distutils first, I guess :-( Ok, we've found the problem and fixed it. Here's the new release (which does build out of the box at least on our boxes ;-): http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 01 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From davidrushby at yahoo.com Mon May 2 15:49:53 2005 From: davidrushby at yahoo.com (David Rushby) Date: Mon Feb 6 12:03:15 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Ok, we've found the problem and fixed it. Here's the new > release (which does build out of the box at least on our > boxes ;-): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip It does build now, but: py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" still behaves as it did when I submitted my original message: Fatal Python error: UNREF invalid object Aborted This is the same debug build of Python 2.4.1 that I was previously using, running the same configuration (CentOS Linux 4.0/i386, everything compiled with GCC 3.4.3). Have you examined my original claim as to the cause of the bug? __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 10:21:55 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Feb 6 12:03:15 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> References: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> Message-ID: <42772693.8050306@egenix.com> David Rushby wrote: > --- "M.-A. Lemburg" wrote: > >>Ok, we've found the problem and fixed it. Here's the new >>release (which does build out of the box at least on our >>boxes ;-): >> >> > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip > > It does build now, but: > py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" > still behaves as it did when I submitted my original message: > Fatal Python error: UNREF invalid object > Aborted > > This is the same debug build of Python 2.4.1 that I was previously > using, running the same configuration (CentOS Linux 4.0/i386, > everything compiled with GCC 3.4.3). > > Have you examined my original claim as to the cause of the bug? No. We haven't had time for looking into it. I'm not sure whether your analysis of the problem is correct: if you don't define WANT_SUBCLASSABLE_TYPES, the API mxDateTime_Deallocate() is neither defined nor used. Furthermore, PyObject_Del() is only called by mxDateTime_Free() if you have explicitely edited mxDateTime.c to disabled the free list #defines. In a standard build, PyObject_Del() is only called at module finalization time. Note that the reason we call mxDateTime_Free() in the constructor is that we don't want the destructor of the object to be called. Py_DECREF() would call the destructor (mxDateTime_Deallocate). It is possible that the debug code in Python complains about the refcount in the object not being 0 at the time the object is finalized (module finalization time), but I don't see any such checks in PyObject_Free() (which is what PyObject_Del() maps to). Again, all of this does not happen in regular non-debug Python builds. Please be aware that we don't support debug builds, so fixing the problem (if there is one - gcc has some serious optimization problems on some combinations of platform and version) will take a while. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 09:27:37 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Mon Feb 6 12:03:15 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 Message-ID: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Hi all- I am trying to build the mx-base package, v.2.0.6. This will be used with postgresql 7.3.9, psycopg 1.1.18, and Roundup 0.8.2. RHEL 3.0 Python 2.3 egenix-mx-base-2.0.6.tar.gz I performed a: /usr/local/bin/python2.3 setup.py install Everything looks proper with the exeception of this series of warning statements: ----------------- gcc -pthread -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fno-strict-aliasing -fPIC -Imx/BeeBase/mxBeeBase -I/usr/local/incl ude/python2.3 -I/usr/local/include -c mx/BeeBase/mxBeeBase/btr.c -o build/temp.linux-i686-2.3/mx/BeeBase/mxBeeBase/mxBeeBa se/mx/BeeBase/mxBeeBase/btr.o mx/BeeBase/mxBeeBase/btr.c: In function `dumpBuf': mx/BeeBase/mxBeeBase/btr.c:249: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:250: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:255: warning: unsigned int format, long unsigned int arg (arg 4) mx/BeeBase/mxBeeBase/btr.c:256: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c: In function `_validateTree': mx/BeeBase/mxBeeBase/btr.c:330: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:337: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:339: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:349: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:351: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 3) creating build/lib.linux-i686-2.3/mx/BeeBase creating build/lib.linux-i686-2.3/mx/BeeBase/mxBeeBase -------------- Would someone be kind enough to let me know whether these messages were expected, and if not, how I might resolve these? Thanks! DC __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 22:06:33 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Feb 6 12:03:15 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> References: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Message-ID: <4277CBB9.8020302@egenix.com> Dianne Chen wrote: > Hi all- > > I am trying to build the mx-base package, v.2.0.6. > This will be used with postgresql 7.3.9, psycopg > 1.1.18, and Roundup 0.8.2. > > RHEL 3.0 > Python 2.3 > egenix-mx-base-2.0.6.tar.gz > > I performed a: > > /usr/local/bin/python2.3 setup.py install > > Everything looks proper with the exeception of this > series of warning statements: > > ----------------- > ... > -------------- > > Would someone be kind enough to let me know whether > these messages were expected, and if not, how I might > resolve these? These warning can safely be ignored. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 13:41:14 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Mon Feb 6 12:03:15 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: 6667 Message-ID: <20050503194114.72091.qmail@web31414.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Dianne Chen wrote: > > Hi all- > > > > I am trying to build the mx-base package, v.2.0.6. > > This will be used with postgresql 7.3.9, psycopg > > 1.1.18, and Roundup 0.8.2. > > > > RHEL 3.0 > > Python 2.3 > > egenix-mx-base-2.0.6.tar.gz > > > > I performed a: > > > > /usr/local/bin/python2.3 setup.py install > > > > Everything looks proper with the exeception of > this > > series of warning statements: > > > > ----------------- > > ... > > -------------- > > > > Would someone be kind enough to let me know > whether > > these messages were expected, and if not, how I > might > > resolve these? > > These warning can safely be ignored. > > -- > Marc-Andre Lemburg > eGenix.com > Marc- Thank you very much for the reply. It helps greatly. With kind regards, DC __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From davidrushby at yahoo.com Tue May 3 17:18:46 2005 From: davidrushby at yahoo.com (David Rushby) Date: Mon Feb 6 12:03:15 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050503231846.35012.qmail@web30009.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > I'm not sure whether your analysis of the problem is correct... Indeed, my original analysis wasn't correct; I think this one is. The fatal error I'm complaining about only arises if the arguments to DateTime.DateTime are invalid, so that the object is deallocated in the onError block of mxDateTime_FromDateAndTime. If the object is created successfully, and later deallocated by Python's garbage collector, the fatal error doesn't arise. Here's my analysis of the problem: --- If the debugging directive Py_TRACE_REFS is enabled, as it is in my case, the Python interpreter maintains a doubly linked list of all Python objects (named refchain) via the _ob_next and _ob_prev pointers added to PyObject via _PyObject_HEAD_EXTRA. Each object is inserted into refchain by the _Py_AddToAllObjects call in _Py_NewReference, and removed from refchain by the _Py_ForgetReference call in _Py_Dealloc. _Py_ForgetReference performs an integrity check on the object being deallocated (op) to make sure that its neighbors in refchain recognize it. Specifically, _Py_ForgetReference verifies that the _ob_next pointer of the previous object in refchain (op->_ob_prev->_ob_next) points to op, and that the _ob_prev pointer of the next object in refchain (op->_ob_next->_ob_prev) points to op. If either of those conditions is false, the interpreter raises the fatal error I'm seeing. After mxDateTime_New pulls an mxDateTimeObject out of the free list, it calls _Py_NewReference on that object to transform it from a "conceptually deallocated" object to a "conceptually allocated" one. _Py_NewReference inserts the object into refchain. Later, when the object is being "conceptually deallocated", it should be removed from refchain with _Py_ForgetReference. The version of _Py_Dealloc that's active when Py_TRACE_REFS is enabled does this (_Py_Dealloc is the element of Py_DECREF that performs the actual destruction). _Py_Dealloc first calls _Py_ForgetReference to remove the object from refchain, then calls the object's destructor (op->ob_type->tp_dealloc). If WANT_SUBCLASSABLE_TYPES is not defined (it is not in my case), the destructor for mxDateTime_Type is mxDateTime_Free. So, if a DateTime object is deallocated normally, as a result of its reference count falling to zero, _Py_Dealloc is called on the object, which first removes it from refchain, then passes it to mxDateTime_Free. If a DateTime object is destroyed prematurely, as a result of invalid arguments to its destructor, the onError handler calls mxDateTime_Free, so the object is "conceptually deallocated" (placed in the free list), *but* the object is not removed from refchain. So if a refchain-membership-integrity-check is performed on the object in question or one of its immediate neighbors in refchain, that integrity check fails, leading to the fatal error. --- The solution is to 'Py_DECREF(...)' the object in the onError handler of its constructor, instead of passing the object directly to mxDateTime_Free. That change solves two problems: 1) It causes _Py_Dealloc to execute, which in turn executes _Py_ForgetReference, so the object is removed from refchain, as it should be. 2) At present, objects that are created successfully and later deallocated by normal reference count mechanics have a reference count of 0 when they enter the free list, whereas objects whose constructors abort their creation due to invalid arguments have a reference count of 1 when they enter the free list. Although AFAIK this doesn't cause an actual execution problem (because the object's reference count is *explicitly set to 1* rather than *incremented by 1* when the object is later "conceptually allocated" by _Py_NewReference), it is likely to confuse future maintainers and thereby lead to the introduction of an actual execution problem. I assume that if you agree that this is a reasonable solution, you'll want to apply the change not only to mxDateTime_FromDateAndTime, but to all similar constructors in mxDateTime.c. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From rj at maxxian.com Thu May 5 01:57:40 2005 From: rj at maxxian.com (RJ Juneau) Date: Mon Feb 6 12:03:16 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c5512e$f72798c0$6505a8c0@rjlaptop> I'm on the 30 day evaluation for mxodbc_zope_da. I'm getting the following error when I submit some queries: Error Type: KeyError Error Value: 'query' I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 with UCS4. The error seems to be caused by multiple rows being returned. I did see an earlier posting with the same error message. The response suggested a template error, but this is clearly not the case here. The additional evidence I've gathered so far: - I'm running the test directly from the ZSQL method, so there's no template involved. - If I use the same query with an additional "where" clause to ensure that only one row is returned, it works - If I use a value in the 'where' clause with no rows returned, it works - The same ZSQL query is being used on a Windows machine running Zope and the free ZODBC module without a problem - The query has been verified directly in mysql-client-browser Other info: - The database is MySQL 4.1.10A-0 - iODBC is the DB driver RJ Juneau -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050505/68d278bf/attachment-0098.htm From mal at egenix.com Thu May 5 12:37:43 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Feb 6 12:03:16 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c5512e$f72798c0$6505a8c0@rjlaptop> References: <000301c5512e$f72798c0$6505a8c0@rjlaptop> Message-ID: <4279E967.6010904@egenix.com> RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 > with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 09:37:42 2005 From: rj at maxxian.com (RJ Juneau) Date: Mon Feb 6 12:03:16 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000101c5516f$3b96de90$6505a8c0@rjlaptop> More interesting info on the problem: If I execute the query directly in the "test" window of the base eGenix mxODBC Database Connection window, it works fine and returns the 20 lines expected. That could point to a problem in the rendering, which seems to be where the traceback ends. Note that within the same Zope system I also have an ODBC connection to a Sybase database, and I have successfully tested multi-line ZSQL queries there. This is the traceback: Time 2005/05/05 07:55:15.294 GMT-4 Exception Type KeyError Exception Value 'query' Traceback (innermost last): Module ZPublisher.Publish, line 101, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 39, in call_object Module Shared.DC.ZRDB.DA, line 337, in manage_test Module DocumentTemplate.DT_String, line 474, in __call__ Module DocumentTemplate.DT_In, line 602, in renderwb Module DocumentTemplate.DT_Var, line 219, in render KeyError: 'query' I don't think the following is an issue, but I'll include it for completeness.I am also getting the following iODBC warnings and errors in the Zope console log, which are related to the ODBC parameters being passed by iODBC. Note that these errors also appear for all of the successful queries. [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (Setup). [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (UsageCount). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Timeout). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Reuse). As for the ZSQL snippet from the template... Since there's no template involved yet (I'm still testing directly from the ZSQL method), I assume you mean the SQL code? select h.host_name, s.system_name, s.system_handle, count(*) from terminal t, system_map s, host h where t.system_index = s.system_index and s.host_index = h.host_index group by s.system_name order by h.host_name Nothing complicated here. There are no parameters passed to the query. RJ -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: May 5, 2005 5:38 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: Re: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is > 2.3.4 with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ---------------------------------------------------------------------- > -- > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 16:00:32 2005 From: charlie at egenix.com (Charlie Clark) Date: Mon Feb 6 12:03:16 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000101c5516f$3b96de90$6505a8c0@rjlaptop> References: <000101c5516f$3b96de90$6505a8c0@rjlaptop> Message-ID: <20050505150032.644.1@bepc.1115296715.fake> On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base eGenix > mxODBC Database Connection window, it works fine and returns the 20 > lines expected. That could point to a problem in the rendering, which > seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection to > a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 10:22:17 2005 From: rj at maxxian.com (RJ Juneau) Date: Mon Feb 6 12:03:16 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505150032.644.1@bepc.1115296715.fake> Message-ID: <000201c55175$75bcad10$6505a8c0@rjlaptop> At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 11:47:14 2005 From: rj at maxxian.com (RJ Juneau) Date: Mon Feb 6 12:03:16 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c55181$549be0e0$6505a8c0@rjlaptop> Charlie, I found a fix. Here it is in case anyone else runs into this. You were correct - the problem is in another part of Zope. Based on your feedback, I did a bit more searching and found something here: http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. html The problem appears to be in Zope versions after 2.7.0. I'm running 2.7.6, and the post indicates that it also happens in 2.7.4. The solution: Edit file /lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. There are two lines in the file that start with . Edit them as follows: Change first line to: Change second line to: Just to be after, I shut down Zope before I made the changes and restarted it after. Thanks for the help! RJ -----Original Message----- From: RJ Juneau [mailto:rj@maxxian.com] Sent: May 5, 2005 9:22 AM To: 'Charlie Clark' Cc: 'egenix-users@lists.egenix.com' Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 17:57:25 2005 From: charlie at egenix.com (Charlie Clark) Date: Mon Feb 6 12:03:16 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <20050505165725.3380.2@bepc.1115296715.fake> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Thu May 5 09:15:21 2005 From: charlie at egenix.com (Charlie Clark) Date: Mon Feb 6 12:03:16 2006 Subject: [Zope-DB] RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <000001c55185$41477730$6b00a8c0@fonacier.local> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________ Zope-DB mailing list Zope-DB@zope.org http://mail.zope.org/mailman/listinfo/zope-db From rj at maxxian.com Thu May 5 12:38:00 2005 From: rj at maxxian.com (RJ Juneau) Date: Mon Feb 6 12:03:16 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000001c55188$6b841eb0$6505a8c0@rjlaptop> I just double-checked. Zope-2.7.6-final. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 12:49:16 2005 From: rj at maxxian.com (RJ Juneau) Date: Mon Feb 6 12:03:16 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000501c55189$fe149ba0$6505a8c0@rjlaptop> Charlie, The fix has only been applied for 2.7.7, 2.8b2. The info is in the original bug report which is closed and can be found here: http://www.zope.org/Collectors/Zope/1745 RJ -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Fri May 6 11:50:09 2005 From: rj at maxxian.com (RJ Juneau) Date: Mon Feb 6 12:03:16 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC Message-ID: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Still on eval for the product. I cannot get a stable connection to Sybase via the iODBC drivers. - The Sybase ODBC connection - including a query - have been verified at the iODBC level. - The setup is already working well for ODBC connection to MySQL. Symptoms include: - If I click on "Open Connection", it still comes back with "Connection Closed" when I go to a ZSQL method - Using 'Connect on Demand' is not working either. - Clicking "Open Connection" gives me the following error: Connection string: DSN=lixbox_sybase; UID=sa; PWD=XXXXXXX Connection pool entry: 0 Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection rejected by data source', 7952) The odbc.ini definition for DSN "lixbox_sybase" is as follows: [lixbox_sybase] JetFix = No NoRowSetSizeLimit = No Description = Test connection to listbox Options = LIXBOX DSQUERY = SQLSERVER TDSHOST = lixbox TDSPORT = 5000 TDSVER = 5.0 SQLSERVER_CATALOG = N CURSOR_SENSITIVITY = LOW UserName = sa Password = XXXXXXXX ServerType = Sybase 10/11/12 Driver = /opt/openlink/lib/sql_mt_lt.so Database = pubs2 ReadOnly = no NoAutoCommit = No NoLoginBox = No FetchBufferSize = 60 Other relevant data: - Connecting via OpenLink's iODBC - Zope 2.7.6-final - Python 2.3.4 - Connection to Sybase has been successfully tested with iODBC, including issuing a query - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC connection RJ Juneau Chief Technology Officer Maxxian Integration Inc. 155 Westhampton Drive Thornhill, Ontario Canada L4J 7X2 E-mail: rj@maxxian.com Phone: +1 905 482 9429 Cell: +1 416 897 6682 Toll free: +1 866 758 9161 Fax: +1 647 722 2038 -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050506/aef33361/attachment-0098.htm From mal at egenix.com Fri May 6 18:27:37 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Feb 6 12:03:16 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC In-Reply-To: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> References: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Message-ID: <427B8CE9.1010601@egenix.com> RJ Juneau wrote: > Still on eval for the product. > > I cannot get a stable connection to Sybase via the iODBC drivers. > > - The Sybase ODBC connection - including a query - have been verified at > the iODBC level. > - The setup is already working well for ODBC connection to MySQL. > > Symptoms include: > > - If I click on "Open Connection", it still comes back with "Connection > Closed" when I go to a ZSQL method > - Using 'Connect on Demand' is not working either. > - Clicking "Open Connection" gives me the following error: > > Connection string: DSN=lixbox_sybase; > UID=sa; > PWD=XXXXXXX Try writing the connection string on one line and without whitespace. ODBC drivers sometimes have problems with this. > Connection pool entry: 0 > Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection > rejected by data source', 7952) This is a generic error that relates to authentication or firewall problems. It is possible that turning on ODBC tracing the ODBC manager will give more clues as to the real cause of the problem. > The odbc.ini definition for DSN "lixbox_sybase" is as follows: > > [lixbox_sybase] > JetFix = No > NoRowSetSizeLimit = No > Description = Test connection to listbox > Options = LIXBOX > DSQUERY = SQLSERVER > TDSHOST = lixbox > TDSPORT = 5000 > TDSVER = 5.0 > SQLSERVER_CATALOG = N > CURSOR_SENSITIVITY = LOW > UserName = sa > Password = XXXXXXXX > ServerType = Sybase 10/11/12 > Driver = /opt/openlink/lib/sql_mt_lt.so > Database = pubs2 > ReadOnly = no > NoAutoCommit = No > NoLoginBox = No > FetchBufferSize = 60 > > > Other relevant data: > - Connecting via OpenLink's iODBC > - Zope 2.7.6-final > - Python 2.3.4 > - Connection to Sybase has been successfully tested with iODBC, > including issuing a query > - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC > connection > > > > RJ Juneau > Chief Technology Officer > Maxxian Integration Inc. > 155 Westhampton Drive > Thornhill, Ontario > Canada L4J 7X2 > E-mail: rj@maxxian.com > Phone: +1 905 482 9429 > Cell: +1 416 897 6682 > Toll free: +1 866 758 9161 > Fax: +1 647 722 2038 > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 06 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From calisp at gmail.com Sun May 15 23:49:03 2005 From: calisp at gmail.com (calisp@gmail.com) Date: Mon Feb 6 12:03:16 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK Message-ID: Hi, I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the following error... 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the last phase of a two-phase commit. This shouldn't happen. Traceback (most recent call last): File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one jar.tpc_finish(self) File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish try: self._finish() File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could not perform COMMIT or ROLLBACK', 1023) What could be causing this? Can I get the mxODBCZopeDA source from somewhere? It would make debugging this much easier. Thanks, Calisp. From mal at egenix.com Mon May 16 13:52:12 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Feb 6 12:03:16 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK In-Reply-To: References: Message-ID: <42887B5C.4010109@egenix.com> calisp@gmail.com wrote: > Hi, > > I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with > unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the > following error... > > 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the > last phase of a two-phase commit. This shouldn't happen. > Traceback (most recent call last): > File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one > jar.tpc_finish(self) > File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish > try: self._finish() > File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish > File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler > ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could > not perform COMMIT or ROLLBACK', 1023) You should have a look at the database logs to see what prevented the commit from being completed. > What could be causing this? Hard to say: mxODBCZopeDA is trying to commit the transaction, but the driver or database failed to complete the request. The above error was generated by the ODBC driver. This could be network or DNS problems, or be related to a bug in FreeTDS (which is getting more stable with every new release, but should still be considered beta quality software at the moment). > Can I get the mxODBCZopeDA source from > somewhere? It would make debugging this much easier. Getting the source is not an option and won't help much either since the source of the problem is not mxODBCZopeDA. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 16 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Sun May 1 21:29:25 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Feb 6 16:01:18 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <427259F3.4090806@egenix.com> References: <20050427130906.52878.qmail@web30008.mail.mud.yahoo.com> <427259F3.4090806@egenix.com> Message-ID: <42752005.7080904@egenix.com> M.-A. Lemburg wrote: > David Rushby wrote: > >> --- "M.-A. Lemburg" wrote: >> >>> Are you using the standard mxDateTime build or one >>> with WANT_SUBCLASSABLE_TYPES defined... >> >> >> >> Presumably "the standard", since I just built with 'py24d setup.py >> build', making no attempt to enable special directives. >> >> >>> ... (mxDateTime_Deallocate is only used by the latter)? >> >> >> >> That's true in 2.1.0-2005-04-15, but not in 2.1.0b5. >> >> >>> In any case, please try our latest snapshot: >>> >>> >> >> http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-04-15.zip >> >>> to see if that makes any difference. >> >> >> >> I can't build it out of the box: > > > Hmm, looks like distutils' sdist command doesn't like our new > repository layout which uses symlinks (after we've switched to > subversion). > > We'll have to debug distutils first, I guess :-( Ok, we've found the problem and fixed it. Here's the new release (which does build out of the box at least on our boxes ;-): http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 01 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From davidrushby at yahoo.com Mon May 2 15:49:53 2005 From: davidrushby at yahoo.com (David Rushby) Date: Mon Feb 6 16:01:18 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Ok, we've found the problem and fixed it. Here's the new > release (which does build out of the box at least on our > boxes ;-): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip It does build now, but: py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" still behaves as it did when I submitted my original message: Fatal Python error: UNREF invalid object Aborted This is the same debug build of Python 2.4.1 that I was previously using, running the same configuration (CentOS Linux 4.0/i386, everything compiled with GCC 3.4.3). Have you examined my original claim as to the cause of the bug? __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 10:21:55 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Feb 6 16:01:18 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> References: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> Message-ID: <42772693.8050306@egenix.com> David Rushby wrote: > --- "M.-A. Lemburg" wrote: > >>Ok, we've found the problem and fixed it. Here's the new >>release (which does build out of the box at least on our >>boxes ;-): >> >> > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip > > It does build now, but: > py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" > still behaves as it did when I submitted my original message: > Fatal Python error: UNREF invalid object > Aborted > > This is the same debug build of Python 2.4.1 that I was previously > using, running the same configuration (CentOS Linux 4.0/i386, > everything compiled with GCC 3.4.3). > > Have you examined my original claim as to the cause of the bug? No. We haven't had time for looking into it. I'm not sure whether your analysis of the problem is correct: if you don't define WANT_SUBCLASSABLE_TYPES, the API mxDateTime_Deallocate() is neither defined nor used. Furthermore, PyObject_Del() is only called by mxDateTime_Free() if you have explicitely edited mxDateTime.c to disabled the free list #defines. In a standard build, PyObject_Del() is only called at module finalization time. Note that the reason we call mxDateTime_Free() in the constructor is that we don't want the destructor of the object to be called. Py_DECREF() would call the destructor (mxDateTime_Deallocate). It is possible that the debug code in Python complains about the refcount in the object not being 0 at the time the object is finalized (module finalization time), but I don't see any such checks in PyObject_Free() (which is what PyObject_Del() maps to). Again, all of this does not happen in regular non-debug Python builds. Please be aware that we don't support debug builds, so fixing the problem (if there is one - gcc has some serious optimization problems on some combinations of platform and version) will take a while. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 09:27:37 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Mon Feb 6 16:01:18 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 Message-ID: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Hi all- I am trying to build the mx-base package, v.2.0.6. This will be used with postgresql 7.3.9, psycopg 1.1.18, and Roundup 0.8.2. RHEL 3.0 Python 2.3 egenix-mx-base-2.0.6.tar.gz I performed a: /usr/local/bin/python2.3 setup.py install Everything looks proper with the exeception of this series of warning statements: ----------------- gcc -pthread -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fno-strict-aliasing -fPIC -Imx/BeeBase/mxBeeBase -I/usr/local/incl ude/python2.3 -I/usr/local/include -c mx/BeeBase/mxBeeBase/btr.c -o build/temp.linux-i686-2.3/mx/BeeBase/mxBeeBase/mxBeeBa se/mx/BeeBase/mxBeeBase/btr.o mx/BeeBase/mxBeeBase/btr.c: In function `dumpBuf': mx/BeeBase/mxBeeBase/btr.c:249: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:250: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:255: warning: unsigned int format, long unsigned int arg (arg 4) mx/BeeBase/mxBeeBase/btr.c:256: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c: In function `_validateTree': mx/BeeBase/mxBeeBase/btr.c:330: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:337: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:339: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:349: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:351: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 3) creating build/lib.linux-i686-2.3/mx/BeeBase creating build/lib.linux-i686-2.3/mx/BeeBase/mxBeeBase -------------- Would someone be kind enough to let me know whether these messages were expected, and if not, how I might resolve these? Thanks! DC __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 22:06:33 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Feb 6 16:01:18 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> References: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Message-ID: <4277CBB9.8020302@egenix.com> Dianne Chen wrote: > Hi all- > > I am trying to build the mx-base package, v.2.0.6. > This will be used with postgresql 7.3.9, psycopg > 1.1.18, and Roundup 0.8.2. > > RHEL 3.0 > Python 2.3 > egenix-mx-base-2.0.6.tar.gz > > I performed a: > > /usr/local/bin/python2.3 setup.py install > > Everything looks proper with the exeception of this > series of warning statements: > > ----------------- > ... > -------------- > > Would someone be kind enough to let me know whether > these messages were expected, and if not, how I might > resolve these? These warning can safely be ignored. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 13:41:14 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Mon Feb 6 16:01:18 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: 6667 Message-ID: <20050503194114.72091.qmail@web31414.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Dianne Chen wrote: > > Hi all- > > > > I am trying to build the mx-base package, v.2.0.6. > > This will be used with postgresql 7.3.9, psycopg > > 1.1.18, and Roundup 0.8.2. > > > > RHEL 3.0 > > Python 2.3 > > egenix-mx-base-2.0.6.tar.gz > > > > I performed a: > > > > /usr/local/bin/python2.3 setup.py install > > > > Everything looks proper with the exeception of > this > > series of warning statements: > > > > ----------------- > > ... > > -------------- > > > > Would someone be kind enough to let me know > whether > > these messages were expected, and if not, how I > might > > resolve these? > > These warning can safely be ignored. > > -- > Marc-Andre Lemburg > eGenix.com > Marc- Thank you very much for the reply. It helps greatly. With kind regards, DC __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From davidrushby at yahoo.com Tue May 3 17:18:46 2005 From: davidrushby at yahoo.com (David Rushby) Date: Mon Feb 6 16:01:18 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050503231846.35012.qmail@web30009.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > I'm not sure whether your analysis of the problem is correct... Indeed, my original analysis wasn't correct; I think this one is. The fatal error I'm complaining about only arises if the arguments to DateTime.DateTime are invalid, so that the object is deallocated in the onError block of mxDateTime_FromDateAndTime. If the object is created successfully, and later deallocated by Python's garbage collector, the fatal error doesn't arise. Here's my analysis of the problem: --- If the debugging directive Py_TRACE_REFS is enabled, as it is in my case, the Python interpreter maintains a doubly linked list of all Python objects (named refchain) via the _ob_next and _ob_prev pointers added to PyObject via _PyObject_HEAD_EXTRA. Each object is inserted into refchain by the _Py_AddToAllObjects call in _Py_NewReference, and removed from refchain by the _Py_ForgetReference call in _Py_Dealloc. _Py_ForgetReference performs an integrity check on the object being deallocated (op) to make sure that its neighbors in refchain recognize it. Specifically, _Py_ForgetReference verifies that the _ob_next pointer of the previous object in refchain (op->_ob_prev->_ob_next) points to op, and that the _ob_prev pointer of the next object in refchain (op->_ob_next->_ob_prev) points to op. If either of those conditions is false, the interpreter raises the fatal error I'm seeing. After mxDateTime_New pulls an mxDateTimeObject out of the free list, it calls _Py_NewReference on that object to transform it from a "conceptually deallocated" object to a "conceptually allocated" one. _Py_NewReference inserts the object into refchain. Later, when the object is being "conceptually deallocated", it should be removed from refchain with _Py_ForgetReference. The version of _Py_Dealloc that's active when Py_TRACE_REFS is enabled does this (_Py_Dealloc is the element of Py_DECREF that performs the actual destruction). _Py_Dealloc first calls _Py_ForgetReference to remove the object from refchain, then calls the object's destructor (op->ob_type->tp_dealloc). If WANT_SUBCLASSABLE_TYPES is not defined (it is not in my case), the destructor for mxDateTime_Type is mxDateTime_Free. So, if a DateTime object is deallocated normally, as a result of its reference count falling to zero, _Py_Dealloc is called on the object, which first removes it from refchain, then passes it to mxDateTime_Free. If a DateTime object is destroyed prematurely, as a result of invalid arguments to its destructor, the onError handler calls mxDateTime_Free, so the object is "conceptually deallocated" (placed in the free list), *but* the object is not removed from refchain. So if a refchain-membership-integrity-check is performed on the object in question or one of its immediate neighbors in refchain, that integrity check fails, leading to the fatal error. --- The solution is to 'Py_DECREF(...)' the object in the onError handler of its constructor, instead of passing the object directly to mxDateTime_Free. That change solves two problems: 1) It causes _Py_Dealloc to execute, which in turn executes _Py_ForgetReference, so the object is removed from refchain, as it should be. 2) At present, objects that are created successfully and later deallocated by normal reference count mechanics have a reference count of 0 when they enter the free list, whereas objects whose constructors abort their creation due to invalid arguments have a reference count of 1 when they enter the free list. Although AFAIK this doesn't cause an actual execution problem (because the object's reference count is *explicitly set to 1* rather than *incremented by 1* when the object is later "conceptually allocated" by _Py_NewReference), it is likely to confuse future maintainers and thereby lead to the introduction of an actual execution problem. I assume that if you agree that this is a reasonable solution, you'll want to apply the change not only to mxDateTime_FromDateAndTime, but to all similar constructors in mxDateTime.c. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From rj at maxxian.com Thu May 5 01:57:40 2005 From: rj at maxxian.com (RJ Juneau) Date: Mon Feb 6 16:01:18 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c5512e$f72798c0$6505a8c0@rjlaptop> I'm on the 30 day evaluation for mxodbc_zope_da. I'm getting the following error when I submit some queries: Error Type: KeyError Error Value: 'query' I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 with UCS4. The error seems to be caused by multiple rows being returned. I did see an earlier posting with the same error message. The response suggested a template error, but this is clearly not the case here. The additional evidence I've gathered so far: - I'm running the test directly from the ZSQL method, so there's no template involved. - If I use the same query with an additional "where" clause to ensure that only one row is returned, it works - If I use a value in the 'where' clause with no rows returned, it works - The same ZSQL query is being used on a Windows machine running Zope and the free ZODBC module without a problem - The query has been verified directly in mysql-client-browser Other info: - The database is MySQL 4.1.10A-0 - iODBC is the DB driver RJ Juneau -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050505/68d278bf/attachment-0099.htm From mal at egenix.com Thu May 5 12:37:43 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Feb 6 16:01:18 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c5512e$f72798c0$6505a8c0@rjlaptop> References: <000301c5512e$f72798c0$6505a8c0@rjlaptop> Message-ID: <4279E967.6010904@egenix.com> RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 > with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 09:37:42 2005 From: rj at maxxian.com (RJ Juneau) Date: Mon Feb 6 16:01:20 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000101c5516f$3b96de90$6505a8c0@rjlaptop> More interesting info on the problem: If I execute the query directly in the "test" window of the base eGenix mxODBC Database Connection window, it works fine and returns the 20 lines expected. That could point to a problem in the rendering, which seems to be where the traceback ends. Note that within the same Zope system I also have an ODBC connection to a Sybase database, and I have successfully tested multi-line ZSQL queries there. This is the traceback: Time 2005/05/05 07:55:15.294 GMT-4 Exception Type KeyError Exception Value 'query' Traceback (innermost last): Module ZPublisher.Publish, line 101, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 39, in call_object Module Shared.DC.ZRDB.DA, line 337, in manage_test Module DocumentTemplate.DT_String, line 474, in __call__ Module DocumentTemplate.DT_In, line 602, in renderwb Module DocumentTemplate.DT_Var, line 219, in render KeyError: 'query' I don't think the following is an issue, but I'll include it for completeness.I am also getting the following iODBC warnings and errors in the Zope console log, which are related to the ODBC parameters being passed by iODBC. Note that these errors also appear for all of the successful queries. [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (Setup). [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (UsageCount). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Timeout). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Reuse). As for the ZSQL snippet from the template... Since there's no template involved yet (I'm still testing directly from the ZSQL method), I assume you mean the SQL code? select h.host_name, s.system_name, s.system_handle, count(*) from terminal t, system_map s, host h where t.system_index = s.system_index and s.host_index = h.host_index group by s.system_name order by h.host_name Nothing complicated here. There are no parameters passed to the query. RJ -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: May 5, 2005 5:38 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: Re: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is > 2.3.4 with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ---------------------------------------------------------------------- > -- > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 16:00:32 2005 From: charlie at egenix.com (Charlie Clark) Date: Mon Feb 6 16:01:20 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000101c5516f$3b96de90$6505a8c0@rjlaptop> References: <000101c5516f$3b96de90$6505a8c0@rjlaptop> Message-ID: <20050505150032.644.1@bepc.1115296715.fake> On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base eGenix > mxODBC Database Connection window, it works fine and returns the 20 > lines expected. That could point to a problem in the rendering, which > seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection to > a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 10:22:17 2005 From: rj at maxxian.com (RJ Juneau) Date: Mon Feb 6 16:01:20 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505150032.644.1@bepc.1115296715.fake> Message-ID: <000201c55175$75bcad10$6505a8c0@rjlaptop> At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 11:47:14 2005 From: rj at maxxian.com (RJ Juneau) Date: Mon Feb 6 16:01:20 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c55181$549be0e0$6505a8c0@rjlaptop> Charlie, I found a fix. Here it is in case anyone else runs into this. You were correct - the problem is in another part of Zope. Based on your feedback, I did a bit more searching and found something here: http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. html The problem appears to be in Zope versions after 2.7.0. I'm running 2.7.6, and the post indicates that it also happens in 2.7.4. The solution: Edit file /lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. There are two lines in the file that start with . Edit them as follows: Change first line to: Change second line to: Just to be after, I shut down Zope before I made the changes and restarted it after. Thanks for the help! RJ -----Original Message----- From: RJ Juneau [mailto:rj@maxxian.com] Sent: May 5, 2005 9:22 AM To: 'Charlie Clark' Cc: 'egenix-users@lists.egenix.com' Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 17:57:25 2005 From: charlie at egenix.com (Charlie Clark) Date: Mon Feb 6 16:01:20 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <20050505165725.3380.2@bepc.1115296715.fake> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Thu May 5 09:15:21 2005 From: charlie at egenix.com (Charlie Clark) Date: Mon Feb 6 16:01:20 2006 Subject: [Zope-DB] RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <000001c55185$41477730$6b00a8c0@fonacier.local> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________ Zope-DB mailing list Zope-DB@zope.org http://mail.zope.org/mailman/listinfo/zope-db From rj at maxxian.com Thu May 5 12:38:00 2005 From: rj at maxxian.com (RJ Juneau) Date: Mon Feb 6 16:01:20 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000001c55188$6b841eb0$6505a8c0@rjlaptop> I just double-checked. Zope-2.7.6-final. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 12:49:16 2005 From: rj at maxxian.com (RJ Juneau) Date: Mon Feb 6 16:01:20 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000501c55189$fe149ba0$6505a8c0@rjlaptop> Charlie, The fix has only been applied for 2.7.7, 2.8b2. The info is in the original bug report which is closed and can be found here: http://www.zope.org/Collectors/Zope/1745 RJ -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Fri May 6 11:50:09 2005 From: rj at maxxian.com (RJ Juneau) Date: Mon Feb 6 16:01:20 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC Message-ID: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Still on eval for the product. I cannot get a stable connection to Sybase via the iODBC drivers. - The Sybase ODBC connection - including a query - have been verified at the iODBC level. - The setup is already working well for ODBC connection to MySQL. Symptoms include: - If I click on "Open Connection", it still comes back with "Connection Closed" when I go to a ZSQL method - Using 'Connect on Demand' is not working either. - Clicking "Open Connection" gives me the following error: Connection string: DSN=lixbox_sybase; UID=sa; PWD=XXXXXXX Connection pool entry: 0 Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection rejected by data source', 7952) The odbc.ini definition for DSN "lixbox_sybase" is as follows: [lixbox_sybase] JetFix = No NoRowSetSizeLimit = No Description = Test connection to listbox Options = LIXBOX DSQUERY = SQLSERVER TDSHOST = lixbox TDSPORT = 5000 TDSVER = 5.0 SQLSERVER_CATALOG = N CURSOR_SENSITIVITY = LOW UserName = sa Password = XXXXXXXX ServerType = Sybase 10/11/12 Driver = /opt/openlink/lib/sql_mt_lt.so Database = pubs2 ReadOnly = no NoAutoCommit = No NoLoginBox = No FetchBufferSize = 60 Other relevant data: - Connecting via OpenLink's iODBC - Zope 2.7.6-final - Python 2.3.4 - Connection to Sybase has been successfully tested with iODBC, including issuing a query - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC connection RJ Juneau Chief Technology Officer Maxxian Integration Inc. 155 Westhampton Drive Thornhill, Ontario Canada L4J 7X2 E-mail: rj@maxxian.com Phone: +1 905 482 9429 Cell: +1 416 897 6682 Toll free: +1 866 758 9161 Fax: +1 647 722 2038 -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050506/aef33361/attachment-0099.htm From mal at egenix.com Fri May 6 18:27:37 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Feb 6 16:01:20 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC In-Reply-To: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> References: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Message-ID: <427B8CE9.1010601@egenix.com> RJ Juneau wrote: > Still on eval for the product. > > I cannot get a stable connection to Sybase via the iODBC drivers. > > - The Sybase ODBC connection - including a query - have been verified at > the iODBC level. > - The setup is already working well for ODBC connection to MySQL. > > Symptoms include: > > - If I click on "Open Connection", it still comes back with "Connection > Closed" when I go to a ZSQL method > - Using 'Connect on Demand' is not working either. > - Clicking "Open Connection" gives me the following error: > > Connection string: DSN=lixbox_sybase; > UID=sa; > PWD=XXXXXXX Try writing the connection string on one line and without whitespace. ODBC drivers sometimes have problems with this. > Connection pool entry: 0 > Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection > rejected by data source', 7952) This is a generic error that relates to authentication or firewall problems. It is possible that turning on ODBC tracing the ODBC manager will give more clues as to the real cause of the problem. > The odbc.ini definition for DSN "lixbox_sybase" is as follows: > > [lixbox_sybase] > JetFix = No > NoRowSetSizeLimit = No > Description = Test connection to listbox > Options = LIXBOX > DSQUERY = SQLSERVER > TDSHOST = lixbox > TDSPORT = 5000 > TDSVER = 5.0 > SQLSERVER_CATALOG = N > CURSOR_SENSITIVITY = LOW > UserName = sa > Password = XXXXXXXX > ServerType = Sybase 10/11/12 > Driver = /opt/openlink/lib/sql_mt_lt.so > Database = pubs2 > ReadOnly = no > NoAutoCommit = No > NoLoginBox = No > FetchBufferSize = 60 > > > Other relevant data: > - Connecting via OpenLink's iODBC > - Zope 2.7.6-final > - Python 2.3.4 > - Connection to Sybase has been successfully tested with iODBC, > including issuing a query > - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC > connection > > > > RJ Juneau > Chief Technology Officer > Maxxian Integration Inc. > 155 Westhampton Drive > Thornhill, Ontario > Canada L4J 7X2 > E-mail: rj@maxxian.com > Phone: +1 905 482 9429 > Cell: +1 416 897 6682 > Toll free: +1 866 758 9161 > Fax: +1 647 722 2038 > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 06 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From calisp at gmail.com Sun May 15 23:49:03 2005 From: calisp at gmail.com (calisp@gmail.com) Date: Mon Feb 6 16:01:20 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK Message-ID: Hi, I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the following error... 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the last phase of a two-phase commit. This shouldn't happen. Traceback (most recent call last): File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one jar.tpc_finish(self) File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish try: self._finish() File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could not perform COMMIT or ROLLBACK', 1023) What could be causing this? Can I get the mxODBCZopeDA source from somewhere? It would make debugging this much easier. Thanks, Calisp. From mal at egenix.com Mon May 16 13:52:12 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Feb 6 16:01:20 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK In-Reply-To: References: Message-ID: <42887B5C.4010109@egenix.com> calisp@gmail.com wrote: > Hi, > > I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with > unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the > following error... > > 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the > last phase of a two-phase commit. This shouldn't happen. > Traceback (most recent call last): > File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one > jar.tpc_finish(self) > File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish > try: self._finish() > File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish > File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler > ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could > not perform COMMIT or ROLLBACK', 1023) You should have a look at the database logs to see what prevented the commit from being completed. > What could be causing this? Hard to say: mxODBCZopeDA is trying to commit the transaction, but the driver or database failed to complete the request. The above error was generated by the ODBC driver. This could be network or DNS problems, or be related to a bug in FreeTDS (which is getting more stable with every new release, but should still be considered beta quality software at the moment). > Can I get the mxODBCZopeDA source from > somewhere? It would make debugging this much easier. Getting the source is not an option and won't help much either since the source of the problem is not mxODBCZopeDA. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 16 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Sun May 1 21:29:25 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Feb 6 20:01:16 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <427259F3.4090806@egenix.com> References: <20050427130906.52878.qmail@web30008.mail.mud.yahoo.com> <427259F3.4090806@egenix.com> Message-ID: <42752005.7080904@egenix.com> M.-A. Lemburg wrote: > David Rushby wrote: > >> --- "M.-A. Lemburg" wrote: >> >>> Are you using the standard mxDateTime build or one >>> with WANT_SUBCLASSABLE_TYPES defined... >> >> >> >> Presumably "the standard", since I just built with 'py24d setup.py >> build', making no attempt to enable special directives. >> >> >>> ... (mxDateTime_Deallocate is only used by the latter)? >> >> >> >> That's true in 2.1.0-2005-04-15, but not in 2.1.0b5. >> >> >>> In any case, please try our latest snapshot: >>> >>> >> >> http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-04-15.zip >> >>> to see if that makes any difference. >> >> >> >> I can't build it out of the box: > > > Hmm, looks like distutils' sdist command doesn't like our new > repository layout which uses symlinks (after we've switched to > subversion). > > We'll have to debug distutils first, I guess :-( Ok, we've found the problem and fixed it. Here's the new release (which does build out of the box at least on our boxes ;-): http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 01 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From davidrushby at yahoo.com Mon May 2 15:49:53 2005 From: davidrushby at yahoo.com (David Rushby) Date: Mon Feb 6 20:01:16 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Ok, we've found the problem and fixed it. Here's the new > release (which does build out of the box at least on our > boxes ;-): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip It does build now, but: py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" still behaves as it did when I submitted my original message: Fatal Python error: UNREF invalid object Aborted This is the same debug build of Python 2.4.1 that I was previously using, running the same configuration (CentOS Linux 4.0/i386, everything compiled with GCC 3.4.3). Have you examined my original claim as to the cause of the bug? __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 10:21:55 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Feb 6 20:01:16 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> References: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> Message-ID: <42772693.8050306@egenix.com> David Rushby wrote: > --- "M.-A. Lemburg" wrote: > >>Ok, we've found the problem and fixed it. Here's the new >>release (which does build out of the box at least on our >>boxes ;-): >> >> > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip > > It does build now, but: > py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" > still behaves as it did when I submitted my original message: > Fatal Python error: UNREF invalid object > Aborted > > This is the same debug build of Python 2.4.1 that I was previously > using, running the same configuration (CentOS Linux 4.0/i386, > everything compiled with GCC 3.4.3). > > Have you examined my original claim as to the cause of the bug? No. We haven't had time for looking into it. I'm not sure whether your analysis of the problem is correct: if you don't define WANT_SUBCLASSABLE_TYPES, the API mxDateTime_Deallocate() is neither defined nor used. Furthermore, PyObject_Del() is only called by mxDateTime_Free() if you have explicitely edited mxDateTime.c to disabled the free list #defines. In a standard build, PyObject_Del() is only called at module finalization time. Note that the reason we call mxDateTime_Free() in the constructor is that we don't want the destructor of the object to be called. Py_DECREF() would call the destructor (mxDateTime_Deallocate). It is possible that the debug code in Python complains about the refcount in the object not being 0 at the time the object is finalized (module finalization time), but I don't see any such checks in PyObject_Free() (which is what PyObject_Del() maps to). Again, all of this does not happen in regular non-debug Python builds. Please be aware that we don't support debug builds, so fixing the problem (if there is one - gcc has some serious optimization problems on some combinations of platform and version) will take a while. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 09:27:37 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Mon Feb 6 20:01:16 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 Message-ID: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Hi all- I am trying to build the mx-base package, v.2.0.6. This will be used with postgresql 7.3.9, psycopg 1.1.18, and Roundup 0.8.2. RHEL 3.0 Python 2.3 egenix-mx-base-2.0.6.tar.gz I performed a: /usr/local/bin/python2.3 setup.py install Everything looks proper with the exeception of this series of warning statements: ----------------- gcc -pthread -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fno-strict-aliasing -fPIC -Imx/BeeBase/mxBeeBase -I/usr/local/incl ude/python2.3 -I/usr/local/include -c mx/BeeBase/mxBeeBase/btr.c -o build/temp.linux-i686-2.3/mx/BeeBase/mxBeeBase/mxBeeBa se/mx/BeeBase/mxBeeBase/btr.o mx/BeeBase/mxBeeBase/btr.c: In function `dumpBuf': mx/BeeBase/mxBeeBase/btr.c:249: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:250: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:255: warning: unsigned int format, long unsigned int arg (arg 4) mx/BeeBase/mxBeeBase/btr.c:256: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c: In function `_validateTree': mx/BeeBase/mxBeeBase/btr.c:330: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:337: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:339: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:349: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:351: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 3) creating build/lib.linux-i686-2.3/mx/BeeBase creating build/lib.linux-i686-2.3/mx/BeeBase/mxBeeBase -------------- Would someone be kind enough to let me know whether these messages were expected, and if not, how I might resolve these? Thanks! DC __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 22:06:33 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Feb 6 20:01:16 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> References: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Message-ID: <4277CBB9.8020302@egenix.com> Dianne Chen wrote: > Hi all- > > I am trying to build the mx-base package, v.2.0.6. > This will be used with postgresql 7.3.9, psycopg > 1.1.18, and Roundup 0.8.2. > > RHEL 3.0 > Python 2.3 > egenix-mx-base-2.0.6.tar.gz > > I performed a: > > /usr/local/bin/python2.3 setup.py install > > Everything looks proper with the exeception of this > series of warning statements: > > ----------------- > ... > -------------- > > Would someone be kind enough to let me know whether > these messages were expected, and if not, how I might > resolve these? These warning can safely be ignored. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 13:41:14 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Mon Feb 6 20:01:16 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: 6667 Message-ID: <20050503194114.72091.qmail@web31414.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Dianne Chen wrote: > > Hi all- > > > > I am trying to build the mx-base package, v.2.0.6. > > This will be used with postgresql 7.3.9, psycopg > > 1.1.18, and Roundup 0.8.2. > > > > RHEL 3.0 > > Python 2.3 > > egenix-mx-base-2.0.6.tar.gz > > > > I performed a: > > > > /usr/local/bin/python2.3 setup.py install > > > > Everything looks proper with the exeception of > this > > series of warning statements: > > > > ----------------- > > ... > > -------------- > > > > Would someone be kind enough to let me know > whether > > these messages were expected, and if not, how I > might > > resolve these? > > These warning can safely be ignored. > > -- > Marc-Andre Lemburg > eGenix.com > Marc- Thank you very much for the reply. It helps greatly. With kind regards, DC __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From davidrushby at yahoo.com Tue May 3 17:18:46 2005 From: davidrushby at yahoo.com (David Rushby) Date: Mon Feb 6 20:01:16 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050503231846.35012.qmail@web30009.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > I'm not sure whether your analysis of the problem is correct... Indeed, my original analysis wasn't correct; I think this one is. The fatal error I'm complaining about only arises if the arguments to DateTime.DateTime are invalid, so that the object is deallocated in the onError block of mxDateTime_FromDateAndTime. If the object is created successfully, and later deallocated by Python's garbage collector, the fatal error doesn't arise. Here's my analysis of the problem: --- If the debugging directive Py_TRACE_REFS is enabled, as it is in my case, the Python interpreter maintains a doubly linked list of all Python objects (named refchain) via the _ob_next and _ob_prev pointers added to PyObject via _PyObject_HEAD_EXTRA. Each object is inserted into refchain by the _Py_AddToAllObjects call in _Py_NewReference, and removed from refchain by the _Py_ForgetReference call in _Py_Dealloc. _Py_ForgetReference performs an integrity check on the object being deallocated (op) to make sure that its neighbors in refchain recognize it. Specifically, _Py_ForgetReference verifies that the _ob_next pointer of the previous object in refchain (op->_ob_prev->_ob_next) points to op, and that the _ob_prev pointer of the next object in refchain (op->_ob_next->_ob_prev) points to op. If either of those conditions is false, the interpreter raises the fatal error I'm seeing. After mxDateTime_New pulls an mxDateTimeObject out of the free list, it calls _Py_NewReference on that object to transform it from a "conceptually deallocated" object to a "conceptually allocated" one. _Py_NewReference inserts the object into refchain. Later, when the object is being "conceptually deallocated", it should be removed from refchain with _Py_ForgetReference. The version of _Py_Dealloc that's active when Py_TRACE_REFS is enabled does this (_Py_Dealloc is the element of Py_DECREF that performs the actual destruction). _Py_Dealloc first calls _Py_ForgetReference to remove the object from refchain, then calls the object's destructor (op->ob_type->tp_dealloc). If WANT_SUBCLASSABLE_TYPES is not defined (it is not in my case), the destructor for mxDateTime_Type is mxDateTime_Free. So, if a DateTime object is deallocated normally, as a result of its reference count falling to zero, _Py_Dealloc is called on the object, which first removes it from refchain, then passes it to mxDateTime_Free. If a DateTime object is destroyed prematurely, as a result of invalid arguments to its destructor, the onError handler calls mxDateTime_Free, so the object is "conceptually deallocated" (placed in the free list), *but* the object is not removed from refchain. So if a refchain-membership-integrity-check is performed on the object in question or one of its immediate neighbors in refchain, that integrity check fails, leading to the fatal error. --- The solution is to 'Py_DECREF(...)' the object in the onError handler of its constructor, instead of passing the object directly to mxDateTime_Free. That change solves two problems: 1) It causes _Py_Dealloc to execute, which in turn executes _Py_ForgetReference, so the object is removed from refchain, as it should be. 2) At present, objects that are created successfully and later deallocated by normal reference count mechanics have a reference count of 0 when they enter the free list, whereas objects whose constructors abort their creation due to invalid arguments have a reference count of 1 when they enter the free list. Although AFAIK this doesn't cause an actual execution problem (because the object's reference count is *explicitly set to 1* rather than *incremented by 1* when the object is later "conceptually allocated" by _Py_NewReference), it is likely to confuse future maintainers and thereby lead to the introduction of an actual execution problem. I assume that if you agree that this is a reasonable solution, you'll want to apply the change not only to mxDateTime_FromDateAndTime, but to all similar constructors in mxDateTime.c. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From rj at maxxian.com Thu May 5 01:57:40 2005 From: rj at maxxian.com (RJ Juneau) Date: Mon Feb 6 20:01:16 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c5512e$f72798c0$6505a8c0@rjlaptop> I'm on the 30 day evaluation for mxodbc_zope_da. I'm getting the following error when I submit some queries: Error Type: KeyError Error Value: 'query' I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 with UCS4. The error seems to be caused by multiple rows being returned. I did see an earlier posting with the same error message. The response suggested a template error, but this is clearly not the case here. The additional evidence I've gathered so far: - I'm running the test directly from the ZSQL method, so there's no template involved. - If I use the same query with an additional "where" clause to ensure that only one row is returned, it works - If I use a value in the 'where' clause with no rows returned, it works - The same ZSQL query is being used on a Windows machine running Zope and the free ZODBC module without a problem - The query has been verified directly in mysql-client-browser Other info: - The database is MySQL 4.1.10A-0 - iODBC is the DB driver RJ Juneau -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050505/68d278bf/attachment-0100.htm From mal at egenix.com Thu May 5 12:37:43 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Feb 6 20:01:16 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c5512e$f72798c0$6505a8c0@rjlaptop> References: <000301c5512e$f72798c0$6505a8c0@rjlaptop> Message-ID: <4279E967.6010904@egenix.com> RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 > with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 09:37:42 2005 From: rj at maxxian.com (RJ Juneau) Date: Mon Feb 6 20:01:16 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000101c5516f$3b96de90$6505a8c0@rjlaptop> More interesting info on the problem: If I execute the query directly in the "test" window of the base eGenix mxODBC Database Connection window, it works fine and returns the 20 lines expected. That could point to a problem in the rendering, which seems to be where the traceback ends. Note that within the same Zope system I also have an ODBC connection to a Sybase database, and I have successfully tested multi-line ZSQL queries there. This is the traceback: Time 2005/05/05 07:55:15.294 GMT-4 Exception Type KeyError Exception Value 'query' Traceback (innermost last): Module ZPublisher.Publish, line 101, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 39, in call_object Module Shared.DC.ZRDB.DA, line 337, in manage_test Module DocumentTemplate.DT_String, line 474, in __call__ Module DocumentTemplate.DT_In, line 602, in renderwb Module DocumentTemplate.DT_Var, line 219, in render KeyError: 'query' I don't think the following is an issue, but I'll include it for completeness.I am also getting the following iODBC warnings and errors in the Zope console log, which are related to the ODBC parameters being passed by iODBC. Note that these errors also appear for all of the successful queries. [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (Setup). [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (UsageCount). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Timeout). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Reuse). As for the ZSQL snippet from the template... Since there's no template involved yet (I'm still testing directly from the ZSQL method), I assume you mean the SQL code? select h.host_name, s.system_name, s.system_handle, count(*) from terminal t, system_map s, host h where t.system_index = s.system_index and s.host_index = h.host_index group by s.system_name order by h.host_name Nothing complicated here. There are no parameters passed to the query. RJ -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: May 5, 2005 5:38 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: Re: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is > 2.3.4 with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ---------------------------------------------------------------------- > -- > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 16:00:32 2005 From: charlie at egenix.com (Charlie Clark) Date: Mon Feb 6 20:01:16 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000101c5516f$3b96de90$6505a8c0@rjlaptop> References: <000101c5516f$3b96de90$6505a8c0@rjlaptop> Message-ID: <20050505150032.644.1@bepc.1115296715.fake> On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base eGenix > mxODBC Database Connection window, it works fine and returns the 20 > lines expected. That could point to a problem in the rendering, which > seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection to > a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 10:22:17 2005 From: rj at maxxian.com (RJ Juneau) Date: Mon Feb 6 20:01:16 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505150032.644.1@bepc.1115296715.fake> Message-ID: <000201c55175$75bcad10$6505a8c0@rjlaptop> At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 11:47:14 2005 From: rj at maxxian.com (RJ Juneau) Date: Mon Feb 6 20:01:16 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c55181$549be0e0$6505a8c0@rjlaptop> Charlie, I found a fix. Here it is in case anyone else runs into this. You were correct - the problem is in another part of Zope. Based on your feedback, I did a bit more searching and found something here: http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. html The problem appears to be in Zope versions after 2.7.0. I'm running 2.7.6, and the post indicates that it also happens in 2.7.4. The solution: Edit file /lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. There are two lines in the file that start with . Edit them as follows: Change first line to: Change second line to: Just to be after, I shut down Zope before I made the changes and restarted it after. Thanks for the help! RJ -----Original Message----- From: RJ Juneau [mailto:rj@maxxian.com] Sent: May 5, 2005 9:22 AM To: 'Charlie Clark' Cc: 'egenix-users@lists.egenix.com' Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 17:57:25 2005 From: charlie at egenix.com (Charlie Clark) Date: Mon Feb 6 20:01:16 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <20050505165725.3380.2@bepc.1115296715.fake> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Thu May 5 09:15:21 2005 From: charlie at egenix.com (Charlie Clark) Date: Mon Feb 6 20:01:16 2006 Subject: [Zope-DB] RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <000001c55185$41477730$6b00a8c0@fonacier.local> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________ Zope-DB mailing list Zope-DB@zope.org http://mail.zope.org/mailman/listinfo/zope-db From rj at maxxian.com Thu May 5 12:38:00 2005 From: rj at maxxian.com (RJ Juneau) Date: Mon Feb 6 20:01:16 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000001c55188$6b841eb0$6505a8c0@rjlaptop> I just double-checked. Zope-2.7.6-final. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 12:49:16 2005 From: rj at maxxian.com (RJ Juneau) Date: Mon Feb 6 20:01:16 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000501c55189$fe149ba0$6505a8c0@rjlaptop> Charlie, The fix has only been applied for 2.7.7, 2.8b2. The info is in the original bug report which is closed and can be found here: http://www.zope.org/Collectors/Zope/1745 RJ -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Fri May 6 11:50:09 2005 From: rj at maxxian.com (RJ Juneau) Date: Mon Feb 6 20:01:16 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC Message-ID: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Still on eval for the product. I cannot get a stable connection to Sybase via the iODBC drivers. - The Sybase ODBC connection - including a query - have been verified at the iODBC level. - The setup is already working well for ODBC connection to MySQL. Symptoms include: - If I click on "Open Connection", it still comes back with "Connection Closed" when I go to a ZSQL method - Using 'Connect on Demand' is not working either. - Clicking "Open Connection" gives me the following error: Connection string: DSN=lixbox_sybase; UID=sa; PWD=XXXXXXX Connection pool entry: 0 Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection rejected by data source', 7952) The odbc.ini definition for DSN "lixbox_sybase" is as follows: [lixbox_sybase] JetFix = No NoRowSetSizeLimit = No Description = Test connection to listbox Options = LIXBOX DSQUERY = SQLSERVER TDSHOST = lixbox TDSPORT = 5000 TDSVER = 5.0 SQLSERVER_CATALOG = N CURSOR_SENSITIVITY = LOW UserName = sa Password = XXXXXXXX ServerType = Sybase 10/11/12 Driver = /opt/openlink/lib/sql_mt_lt.so Database = pubs2 ReadOnly = no NoAutoCommit = No NoLoginBox = No FetchBufferSize = 60 Other relevant data: - Connecting via OpenLink's iODBC - Zope 2.7.6-final - Python 2.3.4 - Connection to Sybase has been successfully tested with iODBC, including issuing a query - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC connection RJ Juneau Chief Technology Officer Maxxian Integration Inc. 155 Westhampton Drive Thornhill, Ontario Canada L4J 7X2 E-mail: rj@maxxian.com Phone: +1 905 482 9429 Cell: +1 416 897 6682 Toll free: +1 866 758 9161 Fax: +1 647 722 2038 -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050506/aef33361/attachment-0100.htm From mal at egenix.com Fri May 6 18:27:37 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Feb 6 20:01:16 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC In-Reply-To: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> References: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Message-ID: <427B8CE9.1010601@egenix.com> RJ Juneau wrote: > Still on eval for the product. > > I cannot get a stable connection to Sybase via the iODBC drivers. > > - The Sybase ODBC connection - including a query - have been verified at > the iODBC level. > - The setup is already working well for ODBC connection to MySQL. > > Symptoms include: > > - If I click on "Open Connection", it still comes back with "Connection > Closed" when I go to a ZSQL method > - Using 'Connect on Demand' is not working either. > - Clicking "Open Connection" gives me the following error: > > Connection string: DSN=lixbox_sybase; > UID=sa; > PWD=XXXXXXX Try writing the connection string on one line and without whitespace. ODBC drivers sometimes have problems with this. > Connection pool entry: 0 > Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection > rejected by data source', 7952) This is a generic error that relates to authentication or firewall problems. It is possible that turning on ODBC tracing the ODBC manager will give more clues as to the real cause of the problem. > The odbc.ini definition for DSN "lixbox_sybase" is as follows: > > [lixbox_sybase] > JetFix = No > NoRowSetSizeLimit = No > Description = Test connection to listbox > Options = LIXBOX > DSQUERY = SQLSERVER > TDSHOST = lixbox > TDSPORT = 5000 > TDSVER = 5.0 > SQLSERVER_CATALOG = N > CURSOR_SENSITIVITY = LOW > UserName = sa > Password = XXXXXXXX > ServerType = Sybase 10/11/12 > Driver = /opt/openlink/lib/sql_mt_lt.so > Database = pubs2 > ReadOnly = no > NoAutoCommit = No > NoLoginBox = No > FetchBufferSize = 60 > > > Other relevant data: > - Connecting via OpenLink's iODBC > - Zope 2.7.6-final > - Python 2.3.4 > - Connection to Sybase has been successfully tested with iODBC, > including issuing a query > - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC > connection > > > > RJ Juneau > Chief Technology Officer > Maxxian Integration Inc. > 155 Westhampton Drive > Thornhill, Ontario > Canada L4J 7X2 > E-mail: rj@maxxian.com > Phone: +1 905 482 9429 > Cell: +1 416 897 6682 > Toll free: +1 866 758 9161 > Fax: +1 647 722 2038 > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 06 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From calisp at gmail.com Sun May 15 23:49:03 2005 From: calisp at gmail.com (calisp@gmail.com) Date: Mon Feb 6 20:01:16 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK Message-ID: Hi, I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the following error... 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the last phase of a two-phase commit. This shouldn't happen. Traceback (most recent call last): File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one jar.tpc_finish(self) File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish try: self._finish() File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could not perform COMMIT or ROLLBACK', 1023) What could be causing this? Can I get the mxODBCZopeDA source from somewhere? It would make debugging this much easier. Thanks, Calisp. From mal at egenix.com Mon May 16 13:52:12 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Feb 6 20:01:18 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK In-Reply-To: References: Message-ID: <42887B5C.4010109@egenix.com> calisp@gmail.com wrote: > Hi, > > I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with > unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the > following error... > > 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the > last phase of a two-phase commit. This shouldn't happen. > Traceback (most recent call last): > File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one > jar.tpc_finish(self) > File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish > try: self._finish() > File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish > File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler > ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could > not perform COMMIT or ROLLBACK', 1023) You should have a look at the database logs to see what prevented the commit from being completed. > What could be causing this? Hard to say: mxODBCZopeDA is trying to commit the transaction, but the driver or database failed to complete the request. The above error was generated by the ODBC driver. This could be network or DNS problems, or be related to a bug in FreeTDS (which is getting more stable with every new release, but should still be considered beta quality software at the moment). > Can I get the mxODBCZopeDA source from > somewhere? It would make debugging this much easier. Getting the source is not an option and won't help much either since the source of the problem is not mxODBCZopeDA. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 16 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Sun May 1 21:29:25 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Feb 7 08:27:03 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <427259F3.4090806@egenix.com> References: <20050427130906.52878.qmail@web30008.mail.mud.yahoo.com> <427259F3.4090806@egenix.com> Message-ID: <42752005.7080904@egenix.com> M.-A. Lemburg wrote: > David Rushby wrote: > >> --- "M.-A. Lemburg" wrote: >> >>> Are you using the standard mxDateTime build or one >>> with WANT_SUBCLASSABLE_TYPES defined... >> >> >> >> Presumably "the standard", since I just built with 'py24d setup.py >> build', making no attempt to enable special directives. >> >> >>> ... (mxDateTime_Deallocate is only used by the latter)? >> >> >> >> That's true in 2.1.0-2005-04-15, but not in 2.1.0b5. >> >> >>> In any case, please try our latest snapshot: >>> >>> >> >> http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-04-15.zip >> >>> to see if that makes any difference. >> >> >> >> I can't build it out of the box: > > > Hmm, looks like distutils' sdist command doesn't like our new > repository layout which uses symlinks (after we've switched to > subversion). > > We'll have to debug distutils first, I guess :-( Ok, we've found the problem and fixed it. Here's the new release (which does build out of the box at least on our boxes ;-): http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 01 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From davidrushby at yahoo.com Mon May 2 15:49:53 2005 From: davidrushby at yahoo.com (David Rushby) Date: Tue Feb 7 08:27:07 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Ok, we've found the problem and fixed it. Here's the new > release (which does build out of the box at least on our > boxes ;-): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip It does build now, but: py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" still behaves as it did when I submitted my original message: Fatal Python error: UNREF invalid object Aborted This is the same debug build of Python 2.4.1 that I was previously using, running the same configuration (CentOS Linux 4.0/i386, everything compiled with GCC 3.4.3). Have you examined my original claim as to the cause of the bug? __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 10:21:55 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Feb 7 08:27:07 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> References: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> Message-ID: <42772693.8050306@egenix.com> David Rushby wrote: > --- "M.-A. Lemburg" wrote: > >>Ok, we've found the problem and fixed it. Here's the new >>release (which does build out of the box at least on our >>boxes ;-): >> >> > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip > > It does build now, but: > py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" > still behaves as it did when I submitted my original message: > Fatal Python error: UNREF invalid object > Aborted > > This is the same debug build of Python 2.4.1 that I was previously > using, running the same configuration (CentOS Linux 4.0/i386, > everything compiled with GCC 3.4.3). > > Have you examined my original claim as to the cause of the bug? No. We haven't had time for looking into it. I'm not sure whether your analysis of the problem is correct: if you don't define WANT_SUBCLASSABLE_TYPES, the API mxDateTime_Deallocate() is neither defined nor used. Furthermore, PyObject_Del() is only called by mxDateTime_Free() if you have explicitely edited mxDateTime.c to disabled the free list #defines. In a standard build, PyObject_Del() is only called at module finalization time. Note that the reason we call mxDateTime_Free() in the constructor is that we don't want the destructor of the object to be called. Py_DECREF() would call the destructor (mxDateTime_Deallocate). It is possible that the debug code in Python complains about the refcount in the object not being 0 at the time the object is finalized (module finalization time), but I don't see any such checks in PyObject_Free() (which is what PyObject_Del() maps to). Again, all of this does not happen in regular non-debug Python builds. Please be aware that we don't support debug builds, so fixing the problem (if there is one - gcc has some serious optimization problems on some combinations of platform and version) will take a while. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 09:27:37 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Tue Feb 7 08:27:07 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 Message-ID: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Hi all- I am trying to build the mx-base package, v.2.0.6. This will be used with postgresql 7.3.9, psycopg 1.1.18, and Roundup 0.8.2. RHEL 3.0 Python 2.3 egenix-mx-base-2.0.6.tar.gz I performed a: /usr/local/bin/python2.3 setup.py install Everything looks proper with the exeception of this series of warning statements: ----------------- gcc -pthread -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fno-strict-aliasing -fPIC -Imx/BeeBase/mxBeeBase -I/usr/local/incl ude/python2.3 -I/usr/local/include -c mx/BeeBase/mxBeeBase/btr.c -o build/temp.linux-i686-2.3/mx/BeeBase/mxBeeBase/mxBeeBa se/mx/BeeBase/mxBeeBase/btr.o mx/BeeBase/mxBeeBase/btr.c: In function `dumpBuf': mx/BeeBase/mxBeeBase/btr.c:249: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:250: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:255: warning: unsigned int format, long unsigned int arg (arg 4) mx/BeeBase/mxBeeBase/btr.c:256: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c: In function `_validateTree': mx/BeeBase/mxBeeBase/btr.c:330: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:337: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:339: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:349: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:351: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 3) creating build/lib.linux-i686-2.3/mx/BeeBase creating build/lib.linux-i686-2.3/mx/BeeBase/mxBeeBase -------------- Would someone be kind enough to let me know whether these messages were expected, and if not, how I might resolve these? Thanks! DC __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 22:06:33 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Feb 7 08:27:07 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> References: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Message-ID: <4277CBB9.8020302@egenix.com> Dianne Chen wrote: > Hi all- > > I am trying to build the mx-base package, v.2.0.6. > This will be used with postgresql 7.3.9, psycopg > 1.1.18, and Roundup 0.8.2. > > RHEL 3.0 > Python 2.3 > egenix-mx-base-2.0.6.tar.gz > > I performed a: > > /usr/local/bin/python2.3 setup.py install > > Everything looks proper with the exeception of this > series of warning statements: > > ----------------- > ... > -------------- > > Would someone be kind enough to let me know whether > these messages were expected, and if not, how I might > resolve these? These warning can safely be ignored. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 13:41:14 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Tue Feb 7 08:27:07 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: 6667 Message-ID: <20050503194114.72091.qmail@web31414.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Dianne Chen wrote: > > Hi all- > > > > I am trying to build the mx-base package, v.2.0.6. > > This will be used with postgresql 7.3.9, psycopg > > 1.1.18, and Roundup 0.8.2. > > > > RHEL 3.0 > > Python 2.3 > > egenix-mx-base-2.0.6.tar.gz > > > > I performed a: > > > > /usr/local/bin/python2.3 setup.py install > > > > Everything looks proper with the exeception of > this > > series of warning statements: > > > > ----------------- > > ... > > -------------- > > > > Would someone be kind enough to let me know > whether > > these messages were expected, and if not, how I > might > > resolve these? > > These warning can safely be ignored. > > -- > Marc-Andre Lemburg > eGenix.com > Marc- Thank you very much for the reply. It helps greatly. With kind regards, DC __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From davidrushby at yahoo.com Tue May 3 17:18:46 2005 From: davidrushby at yahoo.com (David Rushby) Date: Tue Feb 7 08:27:07 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050503231846.35012.qmail@web30009.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > I'm not sure whether your analysis of the problem is correct... Indeed, my original analysis wasn't correct; I think this one is. The fatal error I'm complaining about only arises if the arguments to DateTime.DateTime are invalid, so that the object is deallocated in the onError block of mxDateTime_FromDateAndTime. If the object is created successfully, and later deallocated by Python's garbage collector, the fatal error doesn't arise. Here's my analysis of the problem: --- If the debugging directive Py_TRACE_REFS is enabled, as it is in my case, the Python interpreter maintains a doubly linked list of all Python objects (named refchain) via the _ob_next and _ob_prev pointers added to PyObject via _PyObject_HEAD_EXTRA. Each object is inserted into refchain by the _Py_AddToAllObjects call in _Py_NewReference, and removed from refchain by the _Py_ForgetReference call in _Py_Dealloc. _Py_ForgetReference performs an integrity check on the object being deallocated (op) to make sure that its neighbors in refchain recognize it. Specifically, _Py_ForgetReference verifies that the _ob_next pointer of the previous object in refchain (op->_ob_prev->_ob_next) points to op, and that the _ob_prev pointer of the next object in refchain (op->_ob_next->_ob_prev) points to op. If either of those conditions is false, the interpreter raises the fatal error I'm seeing. After mxDateTime_New pulls an mxDateTimeObject out of the free list, it calls _Py_NewReference on that object to transform it from a "conceptually deallocated" object to a "conceptually allocated" one. _Py_NewReference inserts the object into refchain. Later, when the object is being "conceptually deallocated", it should be removed from refchain with _Py_ForgetReference. The version of _Py_Dealloc that's active when Py_TRACE_REFS is enabled does this (_Py_Dealloc is the element of Py_DECREF that performs the actual destruction). _Py_Dealloc first calls _Py_ForgetReference to remove the object from refchain, then calls the object's destructor (op->ob_type->tp_dealloc). If WANT_SUBCLASSABLE_TYPES is not defined (it is not in my case), the destructor for mxDateTime_Type is mxDateTime_Free. So, if a DateTime object is deallocated normally, as a result of its reference count falling to zero, _Py_Dealloc is called on the object, which first removes it from refchain, then passes it to mxDateTime_Free. If a DateTime object is destroyed prematurely, as a result of invalid arguments to its destructor, the onError handler calls mxDateTime_Free, so the object is "conceptually deallocated" (placed in the free list), *but* the object is not removed from refchain. So if a refchain-membership-integrity-check is performed on the object in question or one of its immediate neighbors in refchain, that integrity check fails, leading to the fatal error. --- The solution is to 'Py_DECREF(...)' the object in the onError handler of its constructor, instead of passing the object directly to mxDateTime_Free. That change solves two problems: 1) It causes _Py_Dealloc to execute, which in turn executes _Py_ForgetReference, so the object is removed from refchain, as it should be. 2) At present, objects that are created successfully and later deallocated by normal reference count mechanics have a reference count of 0 when they enter the free list, whereas objects whose constructors abort their creation due to invalid arguments have a reference count of 1 when they enter the free list. Although AFAIK this doesn't cause an actual execution problem (because the object's reference count is *explicitly set to 1* rather than *incremented by 1* when the object is later "conceptually allocated" by _Py_NewReference), it is likely to confuse future maintainers and thereby lead to the introduction of an actual execution problem. I assume that if you agree that this is a reasonable solution, you'll want to apply the change not only to mxDateTime_FromDateAndTime, but to all similar constructors in mxDateTime.c. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From rj at maxxian.com Thu May 5 01:57:40 2005 From: rj at maxxian.com (RJ Juneau) Date: Tue Feb 7 08:27:08 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c5512e$f72798c0$6505a8c0@rjlaptop> I'm on the 30 day evaluation for mxodbc_zope_da. I'm getting the following error when I submit some queries: Error Type: KeyError Error Value: 'query' I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 with UCS4. The error seems to be caused by multiple rows being returned. I did see an earlier posting with the same error message. The response suggested a template error, but this is clearly not the case here. The additional evidence I've gathered so far: - I'm running the test directly from the ZSQL method, so there's no template involved. - If I use the same query with an additional "where" clause to ensure that only one row is returned, it works - If I use a value in the 'where' clause with no rows returned, it works - The same ZSQL query is being used on a Windows machine running Zope and the free ZODBC module without a problem - The query has been verified directly in mysql-client-browser Other info: - The database is MySQL 4.1.10A-0 - iODBC is the DB driver RJ Juneau -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050505/68d278bf/attachment-0101.htm From mal at egenix.com Thu May 5 12:37:43 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Feb 7 08:27:08 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c5512e$f72798c0$6505a8c0@rjlaptop> References: <000301c5512e$f72798c0$6505a8c0@rjlaptop> Message-ID: <4279E967.6010904@egenix.com> RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 > with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 09:37:42 2005 From: rj at maxxian.com (RJ Juneau) Date: Tue Feb 7 08:27:08 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000101c5516f$3b96de90$6505a8c0@rjlaptop> More interesting info on the problem: If I execute the query directly in the "test" window of the base eGenix mxODBC Database Connection window, it works fine and returns the 20 lines expected. That could point to a problem in the rendering, which seems to be where the traceback ends. Note that within the same Zope system I also have an ODBC connection to a Sybase database, and I have successfully tested multi-line ZSQL queries there. This is the traceback: Time 2005/05/05 07:55:15.294 GMT-4 Exception Type KeyError Exception Value 'query' Traceback (innermost last): Module ZPublisher.Publish, line 101, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 39, in call_object Module Shared.DC.ZRDB.DA, line 337, in manage_test Module DocumentTemplate.DT_String, line 474, in __call__ Module DocumentTemplate.DT_In, line 602, in renderwb Module DocumentTemplate.DT_Var, line 219, in render KeyError: 'query' I don't think the following is an issue, but I'll include it for completeness.I am also getting the following iODBC warnings and errors in the Zope console log, which are related to the ODBC parameters being passed by iODBC. Note that these errors also appear for all of the successful queries. [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (Setup). [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (UsageCount). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Timeout). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Reuse). As for the ZSQL snippet from the template... Since there's no template involved yet (I'm still testing directly from the ZSQL method), I assume you mean the SQL code? select h.host_name, s.system_name, s.system_handle, count(*) from terminal t, system_map s, host h where t.system_index = s.system_index and s.host_index = h.host_index group by s.system_name order by h.host_name Nothing complicated here. There are no parameters passed to the query. RJ -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: May 5, 2005 5:38 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: Re: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is > 2.3.4 with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ---------------------------------------------------------------------- > -- > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 16:00:32 2005 From: charlie at egenix.com (Charlie Clark) Date: Tue Feb 7 08:27:08 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000101c5516f$3b96de90$6505a8c0@rjlaptop> References: <000101c5516f$3b96de90$6505a8c0@rjlaptop> Message-ID: <20050505150032.644.1@bepc.1115296715.fake> On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base eGenix > mxODBC Database Connection window, it works fine and returns the 20 > lines expected. That could point to a problem in the rendering, which > seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection to > a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 10:22:17 2005 From: rj at maxxian.com (RJ Juneau) Date: Tue Feb 7 08:27:08 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505150032.644.1@bepc.1115296715.fake> Message-ID: <000201c55175$75bcad10$6505a8c0@rjlaptop> At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 11:47:14 2005 From: rj at maxxian.com (RJ Juneau) Date: Tue Feb 7 08:27:08 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c55181$549be0e0$6505a8c0@rjlaptop> Charlie, I found a fix. Here it is in case anyone else runs into this. You were correct - the problem is in another part of Zope. Based on your feedback, I did a bit more searching and found something here: http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. html The problem appears to be in Zope versions after 2.7.0. I'm running 2.7.6, and the post indicates that it also happens in 2.7.4. The solution: Edit file /lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. There are two lines in the file that start with . Edit them as follows: Change first line to: Change second line to: Just to be after, I shut down Zope before I made the changes and restarted it after. Thanks for the help! RJ -----Original Message----- From: RJ Juneau [mailto:rj@maxxian.com] Sent: May 5, 2005 9:22 AM To: 'Charlie Clark' Cc: 'egenix-users@lists.egenix.com' Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 17:57:25 2005 From: charlie at egenix.com (Charlie Clark) Date: Tue Feb 7 08:27:08 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <20050505165725.3380.2@bepc.1115296715.fake> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Thu May 5 09:15:21 2005 From: charlie at egenix.com (Charlie Clark) Date: Tue Feb 7 08:27:09 2006 Subject: [Zope-DB] RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <000001c55185$41477730$6b00a8c0@fonacier.local> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________ Zope-DB mailing list Zope-DB@zope.org http://mail.zope.org/mailman/listinfo/zope-db From rj at maxxian.com Thu May 5 12:38:00 2005 From: rj at maxxian.com (RJ Juneau) Date: Tue Feb 7 08:27:09 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000001c55188$6b841eb0$6505a8c0@rjlaptop> I just double-checked. Zope-2.7.6-final. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 12:49:16 2005 From: rj at maxxian.com (RJ Juneau) Date: Tue Feb 7 08:27:10 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000501c55189$fe149ba0$6505a8c0@rjlaptop> Charlie, The fix has only been applied for 2.7.7, 2.8b2. The info is in the original bug report which is closed and can be found here: http://www.zope.org/Collectors/Zope/1745 RJ -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Fri May 6 11:50:09 2005 From: rj at maxxian.com (RJ Juneau) Date: Tue Feb 7 08:27:11 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC Message-ID: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Still on eval for the product. I cannot get a stable connection to Sybase via the iODBC drivers. - The Sybase ODBC connection - including a query - have been verified at the iODBC level. - The setup is already working well for ODBC connection to MySQL. Symptoms include: - If I click on "Open Connection", it still comes back with "Connection Closed" when I go to a ZSQL method - Using 'Connect on Demand' is not working either. - Clicking "Open Connection" gives me the following error: Connection string: DSN=lixbox_sybase; UID=sa; PWD=XXXXXXX Connection pool entry: 0 Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection rejected by data source', 7952) The odbc.ini definition for DSN "lixbox_sybase" is as follows: [lixbox_sybase] JetFix = No NoRowSetSizeLimit = No Description = Test connection to listbox Options = LIXBOX DSQUERY = SQLSERVER TDSHOST = lixbox TDSPORT = 5000 TDSVER = 5.0 SQLSERVER_CATALOG = N CURSOR_SENSITIVITY = LOW UserName = sa Password = XXXXXXXX ServerType = Sybase 10/11/12 Driver = /opt/openlink/lib/sql_mt_lt.so Database = pubs2 ReadOnly = no NoAutoCommit = No NoLoginBox = No FetchBufferSize = 60 Other relevant data: - Connecting via OpenLink's iODBC - Zope 2.7.6-final - Python 2.3.4 - Connection to Sybase has been successfully tested with iODBC, including issuing a query - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC connection RJ Juneau Chief Technology Officer Maxxian Integration Inc. 155 Westhampton Drive Thornhill, Ontario Canada L4J 7X2 E-mail: rj@maxxian.com Phone: +1 905 482 9429 Cell: +1 416 897 6682 Toll free: +1 866 758 9161 Fax: +1 647 722 2038 -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050506/aef33361/attachment-0101.htm From mal at egenix.com Fri May 6 18:27:37 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Feb 7 08:27:13 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC In-Reply-To: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> References: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Message-ID: <427B8CE9.1010601@egenix.com> RJ Juneau wrote: > Still on eval for the product. > > I cannot get a stable connection to Sybase via the iODBC drivers. > > - The Sybase ODBC connection - including a query - have been verified at > the iODBC level. > - The setup is already working well for ODBC connection to MySQL. > > Symptoms include: > > - If I click on "Open Connection", it still comes back with "Connection > Closed" when I go to a ZSQL method > - Using 'Connect on Demand' is not working either. > - Clicking "Open Connection" gives me the following error: > > Connection string: DSN=lixbox_sybase; > UID=sa; > PWD=XXXXXXX Try writing the connection string on one line and without whitespace. ODBC drivers sometimes have problems with this. > Connection pool entry: 0 > Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection > rejected by data source', 7952) This is a generic error that relates to authentication or firewall problems. It is possible that turning on ODBC tracing the ODBC manager will give more clues as to the real cause of the problem. > The odbc.ini definition for DSN "lixbox_sybase" is as follows: > > [lixbox_sybase] > JetFix = No > NoRowSetSizeLimit = No > Description = Test connection to listbox > Options = LIXBOX > DSQUERY = SQLSERVER > TDSHOST = lixbox > TDSPORT = 5000 > TDSVER = 5.0 > SQLSERVER_CATALOG = N > CURSOR_SENSITIVITY = LOW > UserName = sa > Password = XXXXXXXX > ServerType = Sybase 10/11/12 > Driver = /opt/openlink/lib/sql_mt_lt.so > Database = pubs2 > ReadOnly = no > NoAutoCommit = No > NoLoginBox = No > FetchBufferSize = 60 > > > Other relevant data: > - Connecting via OpenLink's iODBC > - Zope 2.7.6-final > - Python 2.3.4 > - Connection to Sybase has been successfully tested with iODBC, > including issuing a query > - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC > connection > > > > RJ Juneau > Chief Technology Officer > Maxxian Integration Inc. > 155 Westhampton Drive > Thornhill, Ontario > Canada L4J 7X2 > E-mail: rj@maxxian.com > Phone: +1 905 482 9429 > Cell: +1 416 897 6682 > Toll free: +1 866 758 9161 > Fax: +1 647 722 2038 > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 06 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From calisp at gmail.com Sun May 15 23:49:03 2005 From: calisp at gmail.com (calisp@gmail.com) Date: Tue Feb 7 08:27:13 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK Message-ID: Hi, I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the following error... 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the last phase of a two-phase commit. This shouldn't happen. Traceback (most recent call last): File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one jar.tpc_finish(self) File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish try: self._finish() File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could not perform COMMIT or ROLLBACK', 1023) What could be causing this? Can I get the mxODBCZopeDA source from somewhere? It would make debugging this much easier. Thanks, Calisp. From mal at egenix.com Mon May 16 13:52:12 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Feb 7 08:27:13 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK In-Reply-To: References: Message-ID: <42887B5C.4010109@egenix.com> calisp@gmail.com wrote: > Hi, > > I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with > unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the > following error... > > 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the > last phase of a two-phase commit. This shouldn't happen. > Traceback (most recent call last): > File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one > jar.tpc_finish(self) > File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish > try: self._finish() > File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish > File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler > ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could > not perform COMMIT or ROLLBACK', 1023) You should have a look at the database logs to see what prevented the commit from being completed. > What could be causing this? Hard to say: mxODBCZopeDA is trying to commit the transaction, but the driver or database failed to complete the request. The above error was generated by the ODBC driver. This could be network or DNS problems, or be related to a bug in FreeTDS (which is getting more stable with every new release, but should still be considered beta quality software at the moment). > Can I get the mxODBCZopeDA source from > somewhere? It would make debugging this much easier. Getting the source is not an option and won't help much either since the source of the problem is not mxODBCZopeDA. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 16 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Sun May 1 21:29:25 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Feb 7 12:03:47 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <427259F3.4090806@egenix.com> References: <20050427130906.52878.qmail@web30008.mail.mud.yahoo.com> <427259F3.4090806@egenix.com> Message-ID: <42752005.7080904@egenix.com> M.-A. Lemburg wrote: > David Rushby wrote: > >> --- "M.-A. Lemburg" wrote: >> >>> Are you using the standard mxDateTime build or one >>> with WANT_SUBCLASSABLE_TYPES defined... >> >> >> >> Presumably "the standard", since I just built with 'py24d setup.py >> build', making no attempt to enable special directives. >> >> >>> ... (mxDateTime_Deallocate is only used by the latter)? >> >> >> >> That's true in 2.1.0-2005-04-15, but not in 2.1.0b5. >> >> >>> In any case, please try our latest snapshot: >>> >>> >> >> http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-04-15.zip >> >>> to see if that makes any difference. >> >> >> >> I can't build it out of the box: > > > Hmm, looks like distutils' sdist command doesn't like our new > repository layout which uses symlinks (after we've switched to > subversion). > > We'll have to debug distutils first, I guess :-( Ok, we've found the problem and fixed it. Here's the new release (which does build out of the box at least on our boxes ;-): http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 01 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From davidrushby at yahoo.com Mon May 2 15:49:53 2005 From: davidrushby at yahoo.com (David Rushby) Date: Tue Feb 7 12:03:47 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Ok, we've found the problem and fixed it. Here's the new > release (which does build out of the box at least on our > boxes ;-): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip It does build now, but: py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" still behaves as it did when I submitted my original message: Fatal Python error: UNREF invalid object Aborted This is the same debug build of Python 2.4.1 that I was previously using, running the same configuration (CentOS Linux 4.0/i386, everything compiled with GCC 3.4.3). Have you examined my original claim as to the cause of the bug? __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 10:21:55 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Feb 7 12:03:47 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> References: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> Message-ID: <42772693.8050306@egenix.com> David Rushby wrote: > --- "M.-A. Lemburg" wrote: > >>Ok, we've found the problem and fixed it. Here's the new >>release (which does build out of the box at least on our >>boxes ;-): >> >> > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip > > It does build now, but: > py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" > still behaves as it did when I submitted my original message: > Fatal Python error: UNREF invalid object > Aborted > > This is the same debug build of Python 2.4.1 that I was previously > using, running the same configuration (CentOS Linux 4.0/i386, > everything compiled with GCC 3.4.3). > > Have you examined my original claim as to the cause of the bug? No. We haven't had time for looking into it. I'm not sure whether your analysis of the problem is correct: if you don't define WANT_SUBCLASSABLE_TYPES, the API mxDateTime_Deallocate() is neither defined nor used. Furthermore, PyObject_Del() is only called by mxDateTime_Free() if you have explicitely edited mxDateTime.c to disabled the free list #defines. In a standard build, PyObject_Del() is only called at module finalization time. Note that the reason we call mxDateTime_Free() in the constructor is that we don't want the destructor of the object to be called. Py_DECREF() would call the destructor (mxDateTime_Deallocate). It is possible that the debug code in Python complains about the refcount in the object not being 0 at the time the object is finalized (module finalization time), but I don't see any such checks in PyObject_Free() (which is what PyObject_Del() maps to). Again, all of this does not happen in regular non-debug Python builds. Please be aware that we don't support debug builds, so fixing the problem (if there is one - gcc has some serious optimization problems on some combinations of platform and version) will take a while. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 09:27:37 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Tue Feb 7 12:03:47 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 Message-ID: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Hi all- I am trying to build the mx-base package, v.2.0.6. This will be used with postgresql 7.3.9, psycopg 1.1.18, and Roundup 0.8.2. RHEL 3.0 Python 2.3 egenix-mx-base-2.0.6.tar.gz I performed a: /usr/local/bin/python2.3 setup.py install Everything looks proper with the exeception of this series of warning statements: ----------------- gcc -pthread -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fno-strict-aliasing -fPIC -Imx/BeeBase/mxBeeBase -I/usr/local/incl ude/python2.3 -I/usr/local/include -c mx/BeeBase/mxBeeBase/btr.c -o build/temp.linux-i686-2.3/mx/BeeBase/mxBeeBase/mxBeeBa se/mx/BeeBase/mxBeeBase/btr.o mx/BeeBase/mxBeeBase/btr.c: In function `dumpBuf': mx/BeeBase/mxBeeBase/btr.c:249: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:250: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:255: warning: unsigned int format, long unsigned int arg (arg 4) mx/BeeBase/mxBeeBase/btr.c:256: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c: In function `_validateTree': mx/BeeBase/mxBeeBase/btr.c:330: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:337: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:339: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:349: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:351: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 3) creating build/lib.linux-i686-2.3/mx/BeeBase creating build/lib.linux-i686-2.3/mx/BeeBase/mxBeeBase -------------- Would someone be kind enough to let me know whether these messages were expected, and if not, how I might resolve these? Thanks! DC __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 22:06:33 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Feb 7 12:03:47 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> References: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Message-ID: <4277CBB9.8020302@egenix.com> Dianne Chen wrote: > Hi all- > > I am trying to build the mx-base package, v.2.0.6. > This will be used with postgresql 7.3.9, psycopg > 1.1.18, and Roundup 0.8.2. > > RHEL 3.0 > Python 2.3 > egenix-mx-base-2.0.6.tar.gz > > I performed a: > > /usr/local/bin/python2.3 setup.py install > > Everything looks proper with the exeception of this > series of warning statements: > > ----------------- > ... > -------------- > > Would someone be kind enough to let me know whether > these messages were expected, and if not, how I might > resolve these? These warning can safely be ignored. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 13:41:14 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Tue Feb 7 12:03:47 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: 6667 Message-ID: <20050503194114.72091.qmail@web31414.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Dianne Chen wrote: > > Hi all- > > > > I am trying to build the mx-base package, v.2.0.6. > > This will be used with postgresql 7.3.9, psycopg > > 1.1.18, and Roundup 0.8.2. > > > > RHEL 3.0 > > Python 2.3 > > egenix-mx-base-2.0.6.tar.gz > > > > I performed a: > > > > /usr/local/bin/python2.3 setup.py install > > > > Everything looks proper with the exeception of > this > > series of warning statements: > > > > ----------------- > > ... > > -------------- > > > > Would someone be kind enough to let me know > whether > > these messages were expected, and if not, how I > might > > resolve these? > > These warning can safely be ignored. > > -- > Marc-Andre Lemburg > eGenix.com > Marc- Thank you very much for the reply. It helps greatly. With kind regards, DC __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From davidrushby at yahoo.com Tue May 3 17:18:46 2005 From: davidrushby at yahoo.com (David Rushby) Date: Tue Feb 7 12:03:47 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050503231846.35012.qmail@web30009.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > I'm not sure whether your analysis of the problem is correct... Indeed, my original analysis wasn't correct; I think this one is. The fatal error I'm complaining about only arises if the arguments to DateTime.DateTime are invalid, so that the object is deallocated in the onError block of mxDateTime_FromDateAndTime. If the object is created successfully, and later deallocated by Python's garbage collector, the fatal error doesn't arise. Here's my analysis of the problem: --- If the debugging directive Py_TRACE_REFS is enabled, as it is in my case, the Python interpreter maintains a doubly linked list of all Python objects (named refchain) via the _ob_next and _ob_prev pointers added to PyObject via _PyObject_HEAD_EXTRA. Each object is inserted into refchain by the _Py_AddToAllObjects call in _Py_NewReference, and removed from refchain by the _Py_ForgetReference call in _Py_Dealloc. _Py_ForgetReference performs an integrity check on the object being deallocated (op) to make sure that its neighbors in refchain recognize it. Specifically, _Py_ForgetReference verifies that the _ob_next pointer of the previous object in refchain (op->_ob_prev->_ob_next) points to op, and that the _ob_prev pointer of the next object in refchain (op->_ob_next->_ob_prev) points to op. If either of those conditions is false, the interpreter raises the fatal error I'm seeing. After mxDateTime_New pulls an mxDateTimeObject out of the free list, it calls _Py_NewReference on that object to transform it from a "conceptually deallocated" object to a "conceptually allocated" one. _Py_NewReference inserts the object into refchain. Later, when the object is being "conceptually deallocated", it should be removed from refchain with _Py_ForgetReference. The version of _Py_Dealloc that's active when Py_TRACE_REFS is enabled does this (_Py_Dealloc is the element of Py_DECREF that performs the actual destruction). _Py_Dealloc first calls _Py_ForgetReference to remove the object from refchain, then calls the object's destructor (op->ob_type->tp_dealloc). If WANT_SUBCLASSABLE_TYPES is not defined (it is not in my case), the destructor for mxDateTime_Type is mxDateTime_Free. So, if a DateTime object is deallocated normally, as a result of its reference count falling to zero, _Py_Dealloc is called on the object, which first removes it from refchain, then passes it to mxDateTime_Free. If a DateTime object is destroyed prematurely, as a result of invalid arguments to its destructor, the onError handler calls mxDateTime_Free, so the object is "conceptually deallocated" (placed in the free list), *but* the object is not removed from refchain. So if a refchain-membership-integrity-check is performed on the object in question or one of its immediate neighbors in refchain, that integrity check fails, leading to the fatal error. --- The solution is to 'Py_DECREF(...)' the object in the onError handler of its constructor, instead of passing the object directly to mxDateTime_Free. That change solves two problems: 1) It causes _Py_Dealloc to execute, which in turn executes _Py_ForgetReference, so the object is removed from refchain, as it should be. 2) At present, objects that are created successfully and later deallocated by normal reference count mechanics have a reference count of 0 when they enter the free list, whereas objects whose constructors abort their creation due to invalid arguments have a reference count of 1 when they enter the free list. Although AFAIK this doesn't cause an actual execution problem (because the object's reference count is *explicitly set to 1* rather than *incremented by 1* when the object is later "conceptually allocated" by _Py_NewReference), it is likely to confuse future maintainers and thereby lead to the introduction of an actual execution problem. I assume that if you agree that this is a reasonable solution, you'll want to apply the change not only to mxDateTime_FromDateAndTime, but to all similar constructors in mxDateTime.c. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From rj at maxxian.com Thu May 5 01:57:40 2005 From: rj at maxxian.com (RJ Juneau) Date: Tue Feb 7 12:03:48 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c5512e$f72798c0$6505a8c0@rjlaptop> I'm on the 30 day evaluation for mxodbc_zope_da. I'm getting the following error when I submit some queries: Error Type: KeyError Error Value: 'query' I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 with UCS4. The error seems to be caused by multiple rows being returned. I did see an earlier posting with the same error message. The response suggested a template error, but this is clearly not the case here. The additional evidence I've gathered so far: - I'm running the test directly from the ZSQL method, so there's no template involved. - If I use the same query with an additional "where" clause to ensure that only one row is returned, it works - If I use a value in the 'where' clause with no rows returned, it works - The same ZSQL query is being used on a Windows machine running Zope and the free ZODBC module without a problem - The query has been verified directly in mysql-client-browser Other info: - The database is MySQL 4.1.10A-0 - iODBC is the DB driver RJ Juneau -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050505/68d278bf/attachment-0102.htm From mal at egenix.com Thu May 5 12:37:43 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Feb 7 12:03:48 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c5512e$f72798c0$6505a8c0@rjlaptop> References: <000301c5512e$f72798c0$6505a8c0@rjlaptop> Message-ID: <4279E967.6010904@egenix.com> RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 > with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 09:37:42 2005 From: rj at maxxian.com (RJ Juneau) Date: Tue Feb 7 12:03:48 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000101c5516f$3b96de90$6505a8c0@rjlaptop> More interesting info on the problem: If I execute the query directly in the "test" window of the base eGenix mxODBC Database Connection window, it works fine and returns the 20 lines expected. That could point to a problem in the rendering, which seems to be where the traceback ends. Note that within the same Zope system I also have an ODBC connection to a Sybase database, and I have successfully tested multi-line ZSQL queries there. This is the traceback: Time 2005/05/05 07:55:15.294 GMT-4 Exception Type KeyError Exception Value 'query' Traceback (innermost last): Module ZPublisher.Publish, line 101, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 39, in call_object Module Shared.DC.ZRDB.DA, line 337, in manage_test Module DocumentTemplate.DT_String, line 474, in __call__ Module DocumentTemplate.DT_In, line 602, in renderwb Module DocumentTemplate.DT_Var, line 219, in render KeyError: 'query' I don't think the following is an issue, but I'll include it for completeness.I am also getting the following iODBC warnings and errors in the Zope console log, which are related to the ODBC parameters being passed by iODBC. Note that these errors also appear for all of the successful queries. [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (Setup). [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (UsageCount). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Timeout). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Reuse). As for the ZSQL snippet from the template... Since there's no template involved yet (I'm still testing directly from the ZSQL method), I assume you mean the SQL code? select h.host_name, s.system_name, s.system_handle, count(*) from terminal t, system_map s, host h where t.system_index = s.system_index and s.host_index = h.host_index group by s.system_name order by h.host_name Nothing complicated here. There are no parameters passed to the query. RJ -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: May 5, 2005 5:38 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: Re: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is > 2.3.4 with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ---------------------------------------------------------------------- > -- > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 16:00:32 2005 From: charlie at egenix.com (Charlie Clark) Date: Tue Feb 7 12:03:48 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000101c5516f$3b96de90$6505a8c0@rjlaptop> References: <000101c5516f$3b96de90$6505a8c0@rjlaptop> Message-ID: <20050505150032.644.1@bepc.1115296715.fake> On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base eGenix > mxODBC Database Connection window, it works fine and returns the 20 > lines expected. That could point to a problem in the rendering, which > seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection to > a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 10:22:17 2005 From: rj at maxxian.com (RJ Juneau) Date: Tue Feb 7 12:03:48 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505150032.644.1@bepc.1115296715.fake> Message-ID: <000201c55175$75bcad10$6505a8c0@rjlaptop> At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 11:47:14 2005 From: rj at maxxian.com (RJ Juneau) Date: Tue Feb 7 12:03:48 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c55181$549be0e0$6505a8c0@rjlaptop> Charlie, I found a fix. Here it is in case anyone else runs into this. You were correct - the problem is in another part of Zope. Based on your feedback, I did a bit more searching and found something here: http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. html The problem appears to be in Zope versions after 2.7.0. I'm running 2.7.6, and the post indicates that it also happens in 2.7.4. The solution: Edit file /lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. There are two lines in the file that start with . Edit them as follows: Change first line to: Change second line to: Just to be after, I shut down Zope before I made the changes and restarted it after. Thanks for the help! RJ -----Original Message----- From: RJ Juneau [mailto:rj@maxxian.com] Sent: May 5, 2005 9:22 AM To: 'Charlie Clark' Cc: 'egenix-users@lists.egenix.com' Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 17:57:25 2005 From: charlie at egenix.com (Charlie Clark) Date: Tue Feb 7 12:03:48 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <20050505165725.3380.2@bepc.1115296715.fake> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Thu May 5 09:15:21 2005 From: charlie at egenix.com (Charlie Clark) Date: Tue Feb 7 12:03:48 2006 Subject: [Zope-DB] RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <000001c55185$41477730$6b00a8c0@fonacier.local> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________ Zope-DB mailing list Zope-DB@zope.org http://mail.zope.org/mailman/listinfo/zope-db From rj at maxxian.com Thu May 5 12:38:00 2005 From: rj at maxxian.com (RJ Juneau) Date: Tue Feb 7 12:03:48 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000001c55188$6b841eb0$6505a8c0@rjlaptop> I just double-checked. Zope-2.7.6-final. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 12:49:16 2005 From: rj at maxxian.com (RJ Juneau) Date: Tue Feb 7 12:03:48 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000501c55189$fe149ba0$6505a8c0@rjlaptop> Charlie, The fix has only been applied for 2.7.7, 2.8b2. The info is in the original bug report which is closed and can be found here: http://www.zope.org/Collectors/Zope/1745 RJ -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Fri May 6 11:50:09 2005 From: rj at maxxian.com (RJ Juneau) Date: Tue Feb 7 12:03:48 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC Message-ID: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Still on eval for the product. I cannot get a stable connection to Sybase via the iODBC drivers. - The Sybase ODBC connection - including a query - have been verified at the iODBC level. - The setup is already working well for ODBC connection to MySQL. Symptoms include: - If I click on "Open Connection", it still comes back with "Connection Closed" when I go to a ZSQL method - Using 'Connect on Demand' is not working either. - Clicking "Open Connection" gives me the following error: Connection string: DSN=lixbox_sybase; UID=sa; PWD=XXXXXXX Connection pool entry: 0 Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection rejected by data source', 7952) The odbc.ini definition for DSN "lixbox_sybase" is as follows: [lixbox_sybase] JetFix = No NoRowSetSizeLimit = No Description = Test connection to listbox Options = LIXBOX DSQUERY = SQLSERVER TDSHOST = lixbox TDSPORT = 5000 TDSVER = 5.0 SQLSERVER_CATALOG = N CURSOR_SENSITIVITY = LOW UserName = sa Password = XXXXXXXX ServerType = Sybase 10/11/12 Driver = /opt/openlink/lib/sql_mt_lt.so Database = pubs2 ReadOnly = no NoAutoCommit = No NoLoginBox = No FetchBufferSize = 60 Other relevant data: - Connecting via OpenLink's iODBC - Zope 2.7.6-final - Python 2.3.4 - Connection to Sybase has been successfully tested with iODBC, including issuing a query - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC connection RJ Juneau Chief Technology Officer Maxxian Integration Inc. 155 Westhampton Drive Thornhill, Ontario Canada L4J 7X2 E-mail: rj@maxxian.com Phone: +1 905 482 9429 Cell: +1 416 897 6682 Toll free: +1 866 758 9161 Fax: +1 647 722 2038 -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050506/aef33361/attachment-0102.htm From mal at egenix.com Fri May 6 18:27:37 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Feb 7 12:03:48 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC In-Reply-To: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> References: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Message-ID: <427B8CE9.1010601@egenix.com> RJ Juneau wrote: > Still on eval for the product. > > I cannot get a stable connection to Sybase via the iODBC drivers. > > - The Sybase ODBC connection - including a query - have been verified at > the iODBC level. > - The setup is already working well for ODBC connection to MySQL. > > Symptoms include: > > - If I click on "Open Connection", it still comes back with "Connection > Closed" when I go to a ZSQL method > - Using 'Connect on Demand' is not working either. > - Clicking "Open Connection" gives me the following error: > > Connection string: DSN=lixbox_sybase; > UID=sa; > PWD=XXXXXXX Try writing the connection string on one line and without whitespace. ODBC drivers sometimes have problems with this. > Connection pool entry: 0 > Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection > rejected by data source', 7952) This is a generic error that relates to authentication or firewall problems. It is possible that turning on ODBC tracing the ODBC manager will give more clues as to the real cause of the problem. > The odbc.ini definition for DSN "lixbox_sybase" is as follows: > > [lixbox_sybase] > JetFix = No > NoRowSetSizeLimit = No > Description = Test connection to listbox > Options = LIXBOX > DSQUERY = SQLSERVER > TDSHOST = lixbox > TDSPORT = 5000 > TDSVER = 5.0 > SQLSERVER_CATALOG = N > CURSOR_SENSITIVITY = LOW > UserName = sa > Password = XXXXXXXX > ServerType = Sybase 10/11/12 > Driver = /opt/openlink/lib/sql_mt_lt.so > Database = pubs2 > ReadOnly = no > NoAutoCommit = No > NoLoginBox = No > FetchBufferSize = 60 > > > Other relevant data: > - Connecting via OpenLink's iODBC > - Zope 2.7.6-final > - Python 2.3.4 > - Connection to Sybase has been successfully tested with iODBC, > including issuing a query > - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC > connection > > > > RJ Juneau > Chief Technology Officer > Maxxian Integration Inc. > 155 Westhampton Drive > Thornhill, Ontario > Canada L4J 7X2 > E-mail: rj@maxxian.com > Phone: +1 905 482 9429 > Cell: +1 416 897 6682 > Toll free: +1 866 758 9161 > Fax: +1 647 722 2038 > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 06 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From calisp at gmail.com Sun May 15 23:49:03 2005 From: calisp at gmail.com (calisp@gmail.com) Date: Tue Feb 7 12:03:48 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK Message-ID: Hi, I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the following error... 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the last phase of a two-phase commit. This shouldn't happen. Traceback (most recent call last): File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one jar.tpc_finish(self) File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish try: self._finish() File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could not perform COMMIT or ROLLBACK', 1023) What could be causing this? Can I get the mxODBCZopeDA source from somewhere? It would make debugging this much easier. Thanks, Calisp. From mal at egenix.com Mon May 16 13:52:12 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Feb 7 12:03:48 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK In-Reply-To: References: Message-ID: <42887B5C.4010109@egenix.com> calisp@gmail.com wrote: > Hi, > > I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with > unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the > following error... > > 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the > last phase of a two-phase commit. This shouldn't happen. > Traceback (most recent call last): > File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one > jar.tpc_finish(self) > File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish > try: self._finish() > File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish > File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler > ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could > not perform COMMIT or ROLLBACK', 1023) You should have a look at the database logs to see what prevented the commit from being completed. > What could be causing this? Hard to say: mxODBCZopeDA is trying to commit the transaction, but the driver or database failed to complete the request. The above error was generated by the ODBC driver. This could be network or DNS problems, or be related to a bug in FreeTDS (which is getting more stable with every new release, but should still be considered beta quality software at the moment). > Can I get the mxODBCZopeDA source from > somewhere? It would make debugging this much easier. Getting the source is not an option and won't help much either since the source of the problem is not mxODBCZopeDA. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 16 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Sun May 1 21:29:25 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Feb 7 16:01:27 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <427259F3.4090806@egenix.com> References: <20050427130906.52878.qmail@web30008.mail.mud.yahoo.com> <427259F3.4090806@egenix.com> Message-ID: <42752005.7080904@egenix.com> M.-A. Lemburg wrote: > David Rushby wrote: > >> --- "M.-A. Lemburg" wrote: >> >>> Are you using the standard mxDateTime build or one >>> with WANT_SUBCLASSABLE_TYPES defined... >> >> >> >> Presumably "the standard", since I just built with 'py24d setup.py >> build', making no attempt to enable special directives. >> >> >>> ... (mxDateTime_Deallocate is only used by the latter)? >> >> >> >> That's true in 2.1.0-2005-04-15, but not in 2.1.0b5. >> >> >>> In any case, please try our latest snapshot: >>> >>> >> >> http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-04-15.zip >> >>> to see if that makes any difference. >> >> >> >> I can't build it out of the box: > > > Hmm, looks like distutils' sdist command doesn't like our new > repository layout which uses symlinks (after we've switched to > subversion). > > We'll have to debug distutils first, I guess :-( Ok, we've found the problem and fixed it. Here's the new release (which does build out of the box at least on our boxes ;-): http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 01 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From davidrushby at yahoo.com Mon May 2 15:49:53 2005 From: davidrushby at yahoo.com (David Rushby) Date: Tue Feb 7 16:01:27 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Ok, we've found the problem and fixed it. Here's the new > release (which does build out of the box at least on our > boxes ;-): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip It does build now, but: py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" still behaves as it did when I submitted my original message: Fatal Python error: UNREF invalid object Aborted This is the same debug build of Python 2.4.1 that I was previously using, running the same configuration (CentOS Linux 4.0/i386, everything compiled with GCC 3.4.3). Have you examined my original claim as to the cause of the bug? __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 10:21:55 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Feb 7 16:01:27 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> References: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> Message-ID: <42772693.8050306@egenix.com> David Rushby wrote: > --- "M.-A. Lemburg" wrote: > >>Ok, we've found the problem and fixed it. Here's the new >>release (which does build out of the box at least on our >>boxes ;-): >> >> > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip > > It does build now, but: > py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" > still behaves as it did when I submitted my original message: > Fatal Python error: UNREF invalid object > Aborted > > This is the same debug build of Python 2.4.1 that I was previously > using, running the same configuration (CentOS Linux 4.0/i386, > everything compiled with GCC 3.4.3). > > Have you examined my original claim as to the cause of the bug? No. We haven't had time for looking into it. I'm not sure whether your analysis of the problem is correct: if you don't define WANT_SUBCLASSABLE_TYPES, the API mxDateTime_Deallocate() is neither defined nor used. Furthermore, PyObject_Del() is only called by mxDateTime_Free() if you have explicitely edited mxDateTime.c to disabled the free list #defines. In a standard build, PyObject_Del() is only called at module finalization time. Note that the reason we call mxDateTime_Free() in the constructor is that we don't want the destructor of the object to be called. Py_DECREF() would call the destructor (mxDateTime_Deallocate). It is possible that the debug code in Python complains about the refcount in the object not being 0 at the time the object is finalized (module finalization time), but I don't see any such checks in PyObject_Free() (which is what PyObject_Del() maps to). Again, all of this does not happen in regular non-debug Python builds. Please be aware that we don't support debug builds, so fixing the problem (if there is one - gcc has some serious optimization problems on some combinations of platform and version) will take a while. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 09:27:37 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Tue Feb 7 16:01:28 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 Message-ID: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Hi all- I am trying to build the mx-base package, v.2.0.6. This will be used with postgresql 7.3.9, psycopg 1.1.18, and Roundup 0.8.2. RHEL 3.0 Python 2.3 egenix-mx-base-2.0.6.tar.gz I performed a: /usr/local/bin/python2.3 setup.py install Everything looks proper with the exeception of this series of warning statements: ----------------- gcc -pthread -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fno-strict-aliasing -fPIC -Imx/BeeBase/mxBeeBase -I/usr/local/incl ude/python2.3 -I/usr/local/include -c mx/BeeBase/mxBeeBase/btr.c -o build/temp.linux-i686-2.3/mx/BeeBase/mxBeeBase/mxBeeBa se/mx/BeeBase/mxBeeBase/btr.o mx/BeeBase/mxBeeBase/btr.c: In function `dumpBuf': mx/BeeBase/mxBeeBase/btr.c:249: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:250: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:255: warning: unsigned int format, long unsigned int arg (arg 4) mx/BeeBase/mxBeeBase/btr.c:256: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c: In function `_validateTree': mx/BeeBase/mxBeeBase/btr.c:330: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:337: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:339: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:349: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:351: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 3) creating build/lib.linux-i686-2.3/mx/BeeBase creating build/lib.linux-i686-2.3/mx/BeeBase/mxBeeBase -------------- Would someone be kind enough to let me know whether these messages were expected, and if not, how I might resolve these? Thanks! DC __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 22:06:33 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Feb 7 16:01:28 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> References: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Message-ID: <4277CBB9.8020302@egenix.com> Dianne Chen wrote: > Hi all- > > I am trying to build the mx-base package, v.2.0.6. > This will be used with postgresql 7.3.9, psycopg > 1.1.18, and Roundup 0.8.2. > > RHEL 3.0 > Python 2.3 > egenix-mx-base-2.0.6.tar.gz > > I performed a: > > /usr/local/bin/python2.3 setup.py install > > Everything looks proper with the exeception of this > series of warning statements: > > ----------------- > ... > -------------- > > Would someone be kind enough to let me know whether > these messages were expected, and if not, how I might > resolve these? These warning can safely be ignored. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 13:41:14 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Tue Feb 7 16:01:28 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: 6667 Message-ID: <20050503194114.72091.qmail@web31414.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Dianne Chen wrote: > > Hi all- > > > > I am trying to build the mx-base package, v.2.0.6. > > This will be used with postgresql 7.3.9, psycopg > > 1.1.18, and Roundup 0.8.2. > > > > RHEL 3.0 > > Python 2.3 > > egenix-mx-base-2.0.6.tar.gz > > > > I performed a: > > > > /usr/local/bin/python2.3 setup.py install > > > > Everything looks proper with the exeception of > this > > series of warning statements: > > > > ----------------- > > ... > > -------------- > > > > Would someone be kind enough to let me know > whether > > these messages were expected, and if not, how I > might > > resolve these? > > These warning can safely be ignored. > > -- > Marc-Andre Lemburg > eGenix.com > Marc- Thank you very much for the reply. It helps greatly. With kind regards, DC __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From davidrushby at yahoo.com Tue May 3 17:18:46 2005 From: davidrushby at yahoo.com (David Rushby) Date: Tue Feb 7 16:01:28 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050503231846.35012.qmail@web30009.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > I'm not sure whether your analysis of the problem is correct... Indeed, my original analysis wasn't correct; I think this one is. The fatal error I'm complaining about only arises if the arguments to DateTime.DateTime are invalid, so that the object is deallocated in the onError block of mxDateTime_FromDateAndTime. If the object is created successfully, and later deallocated by Python's garbage collector, the fatal error doesn't arise. Here's my analysis of the problem: --- If the debugging directive Py_TRACE_REFS is enabled, as it is in my case, the Python interpreter maintains a doubly linked list of all Python objects (named refchain) via the _ob_next and _ob_prev pointers added to PyObject via _PyObject_HEAD_EXTRA. Each object is inserted into refchain by the _Py_AddToAllObjects call in _Py_NewReference, and removed from refchain by the _Py_ForgetReference call in _Py_Dealloc. _Py_ForgetReference performs an integrity check on the object being deallocated (op) to make sure that its neighbors in refchain recognize it. Specifically, _Py_ForgetReference verifies that the _ob_next pointer of the previous object in refchain (op->_ob_prev->_ob_next) points to op, and that the _ob_prev pointer of the next object in refchain (op->_ob_next->_ob_prev) points to op. If either of those conditions is false, the interpreter raises the fatal error I'm seeing. After mxDateTime_New pulls an mxDateTimeObject out of the free list, it calls _Py_NewReference on that object to transform it from a "conceptually deallocated" object to a "conceptually allocated" one. _Py_NewReference inserts the object into refchain. Later, when the object is being "conceptually deallocated", it should be removed from refchain with _Py_ForgetReference. The version of _Py_Dealloc that's active when Py_TRACE_REFS is enabled does this (_Py_Dealloc is the element of Py_DECREF that performs the actual destruction). _Py_Dealloc first calls _Py_ForgetReference to remove the object from refchain, then calls the object's destructor (op->ob_type->tp_dealloc). If WANT_SUBCLASSABLE_TYPES is not defined (it is not in my case), the destructor for mxDateTime_Type is mxDateTime_Free. So, if a DateTime object is deallocated normally, as a result of its reference count falling to zero, _Py_Dealloc is called on the object, which first removes it from refchain, then passes it to mxDateTime_Free. If a DateTime object is destroyed prematurely, as a result of invalid arguments to its destructor, the onError handler calls mxDateTime_Free, so the object is "conceptually deallocated" (placed in the free list), *but* the object is not removed from refchain. So if a refchain-membership-integrity-check is performed on the object in question or one of its immediate neighbors in refchain, that integrity check fails, leading to the fatal error. --- The solution is to 'Py_DECREF(...)' the object in the onError handler of its constructor, instead of passing the object directly to mxDateTime_Free. That change solves two problems: 1) It causes _Py_Dealloc to execute, which in turn executes _Py_ForgetReference, so the object is removed from refchain, as it should be. 2) At present, objects that are created successfully and later deallocated by normal reference count mechanics have a reference count of 0 when they enter the free list, whereas objects whose constructors abort their creation due to invalid arguments have a reference count of 1 when they enter the free list. Although AFAIK this doesn't cause an actual execution problem (because the object's reference count is *explicitly set to 1* rather than *incremented by 1* when the object is later "conceptually allocated" by _Py_NewReference), it is likely to confuse future maintainers and thereby lead to the introduction of an actual execution problem. I assume that if you agree that this is a reasonable solution, you'll want to apply the change not only to mxDateTime_FromDateAndTime, but to all similar constructors in mxDateTime.c. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From rj at maxxian.com Thu May 5 01:57:40 2005 From: rj at maxxian.com (RJ Juneau) Date: Tue Feb 7 16:01:28 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c5512e$f72798c0$6505a8c0@rjlaptop> I'm on the 30 day evaluation for mxodbc_zope_da. I'm getting the following error when I submit some queries: Error Type: KeyError Error Value: 'query' I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 with UCS4. The error seems to be caused by multiple rows being returned. I did see an earlier posting with the same error message. The response suggested a template error, but this is clearly not the case here. The additional evidence I've gathered so far: - I'm running the test directly from the ZSQL method, so there's no template involved. - If I use the same query with an additional "where" clause to ensure that only one row is returned, it works - If I use a value in the 'where' clause with no rows returned, it works - The same ZSQL query is being used on a Windows machine running Zope and the free ZODBC module without a problem - The query has been verified directly in mysql-client-browser Other info: - The database is MySQL 4.1.10A-0 - iODBC is the DB driver RJ Juneau -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050505/68d278bf/attachment-0103.htm From mal at egenix.com Thu May 5 12:37:43 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Feb 7 16:01:28 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c5512e$f72798c0$6505a8c0@rjlaptop> References: <000301c5512e$f72798c0$6505a8c0@rjlaptop> Message-ID: <4279E967.6010904@egenix.com> RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 > with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 09:37:42 2005 From: rj at maxxian.com (RJ Juneau) Date: Tue Feb 7 16:01:28 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000101c5516f$3b96de90$6505a8c0@rjlaptop> More interesting info on the problem: If I execute the query directly in the "test" window of the base eGenix mxODBC Database Connection window, it works fine and returns the 20 lines expected. That could point to a problem in the rendering, which seems to be where the traceback ends. Note that within the same Zope system I also have an ODBC connection to a Sybase database, and I have successfully tested multi-line ZSQL queries there. This is the traceback: Time 2005/05/05 07:55:15.294 GMT-4 Exception Type KeyError Exception Value 'query' Traceback (innermost last): Module ZPublisher.Publish, line 101, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 39, in call_object Module Shared.DC.ZRDB.DA, line 337, in manage_test Module DocumentTemplate.DT_String, line 474, in __call__ Module DocumentTemplate.DT_In, line 602, in renderwb Module DocumentTemplate.DT_Var, line 219, in render KeyError: 'query' I don't think the following is an issue, but I'll include it for completeness.I am also getting the following iODBC warnings and errors in the Zope console log, which are related to the ODBC parameters being passed by iODBC. Note that these errors also appear for all of the successful queries. [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (Setup). [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (UsageCount). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Timeout). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Reuse). As for the ZSQL snippet from the template... Since there's no template involved yet (I'm still testing directly from the ZSQL method), I assume you mean the SQL code? select h.host_name, s.system_name, s.system_handle, count(*) from terminal t, system_map s, host h where t.system_index = s.system_index and s.host_index = h.host_index group by s.system_name order by h.host_name Nothing complicated here. There are no parameters passed to the query. RJ -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: May 5, 2005 5:38 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: Re: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is > 2.3.4 with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ---------------------------------------------------------------------- > -- > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 16:00:32 2005 From: charlie at egenix.com (Charlie Clark) Date: Tue Feb 7 16:01:28 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000101c5516f$3b96de90$6505a8c0@rjlaptop> References: <000101c5516f$3b96de90$6505a8c0@rjlaptop> Message-ID: <20050505150032.644.1@bepc.1115296715.fake> On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base eGenix > mxODBC Database Connection window, it works fine and returns the 20 > lines expected. That could point to a problem in the rendering, which > seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection to > a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 10:22:17 2005 From: rj at maxxian.com (RJ Juneau) Date: Tue Feb 7 16:01:28 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505150032.644.1@bepc.1115296715.fake> Message-ID: <000201c55175$75bcad10$6505a8c0@rjlaptop> At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 11:47:14 2005 From: rj at maxxian.com (RJ Juneau) Date: Tue Feb 7 16:01:28 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c55181$549be0e0$6505a8c0@rjlaptop> Charlie, I found a fix. Here it is in case anyone else runs into this. You were correct - the problem is in another part of Zope. Based on your feedback, I did a bit more searching and found something here: http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. html The problem appears to be in Zope versions after 2.7.0. I'm running 2.7.6, and the post indicates that it also happens in 2.7.4. The solution: Edit file /lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. There are two lines in the file that start with . Edit them as follows: Change first line to: Change second line to: Just to be after, I shut down Zope before I made the changes and restarted it after. Thanks for the help! RJ -----Original Message----- From: RJ Juneau [mailto:rj@maxxian.com] Sent: May 5, 2005 9:22 AM To: 'Charlie Clark' Cc: 'egenix-users@lists.egenix.com' Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 17:57:25 2005 From: charlie at egenix.com (Charlie Clark) Date: Tue Feb 7 16:01:28 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <20050505165725.3380.2@bepc.1115296715.fake> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Thu May 5 09:15:21 2005 From: charlie at egenix.com (Charlie Clark) Date: Tue Feb 7 16:01:28 2006 Subject: [Zope-DB] RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <000001c55185$41477730$6b00a8c0@fonacier.local> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________ Zope-DB mailing list Zope-DB@zope.org http://mail.zope.org/mailman/listinfo/zope-db From rj at maxxian.com Thu May 5 12:38:00 2005 From: rj at maxxian.com (RJ Juneau) Date: Tue Feb 7 16:01:28 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000001c55188$6b841eb0$6505a8c0@rjlaptop> I just double-checked. Zope-2.7.6-final. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 12:49:16 2005 From: rj at maxxian.com (RJ Juneau) Date: Tue Feb 7 16:01:28 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000501c55189$fe149ba0$6505a8c0@rjlaptop> Charlie, The fix has only been applied for 2.7.7, 2.8b2. The info is in the original bug report which is closed and can be found here: http://www.zope.org/Collectors/Zope/1745 RJ -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Fri May 6 11:50:09 2005 From: rj at maxxian.com (RJ Juneau) Date: Tue Feb 7 16:01:28 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC Message-ID: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Still on eval for the product. I cannot get a stable connection to Sybase via the iODBC drivers. - The Sybase ODBC connection - including a query - have been verified at the iODBC level. - The setup is already working well for ODBC connection to MySQL. Symptoms include: - If I click on "Open Connection", it still comes back with "Connection Closed" when I go to a ZSQL method - Using 'Connect on Demand' is not working either. - Clicking "Open Connection" gives me the following error: Connection string: DSN=lixbox_sybase; UID=sa; PWD=XXXXXXX Connection pool entry: 0 Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection rejected by data source', 7952) The odbc.ini definition for DSN "lixbox_sybase" is as follows: [lixbox_sybase] JetFix = No NoRowSetSizeLimit = No Description = Test connection to listbox Options = LIXBOX DSQUERY = SQLSERVER TDSHOST = lixbox TDSPORT = 5000 TDSVER = 5.0 SQLSERVER_CATALOG = N CURSOR_SENSITIVITY = LOW UserName = sa Password = XXXXXXXX ServerType = Sybase 10/11/12 Driver = /opt/openlink/lib/sql_mt_lt.so Database = pubs2 ReadOnly = no NoAutoCommit = No NoLoginBox = No FetchBufferSize = 60 Other relevant data: - Connecting via OpenLink's iODBC - Zope 2.7.6-final - Python 2.3.4 - Connection to Sybase has been successfully tested with iODBC, including issuing a query - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC connection RJ Juneau Chief Technology Officer Maxxian Integration Inc. 155 Westhampton Drive Thornhill, Ontario Canada L4J 7X2 E-mail: rj@maxxian.com Phone: +1 905 482 9429 Cell: +1 416 897 6682 Toll free: +1 866 758 9161 Fax: +1 647 722 2038 -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050506/aef33361/attachment-0103.htm From mal at egenix.com Fri May 6 18:27:37 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Feb 7 16:01:28 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC In-Reply-To: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> References: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Message-ID: <427B8CE9.1010601@egenix.com> RJ Juneau wrote: > Still on eval for the product. > > I cannot get a stable connection to Sybase via the iODBC drivers. > > - The Sybase ODBC connection - including a query - have been verified at > the iODBC level. > - The setup is already working well for ODBC connection to MySQL. > > Symptoms include: > > - If I click on "Open Connection", it still comes back with "Connection > Closed" when I go to a ZSQL method > - Using 'Connect on Demand' is not working either. > - Clicking "Open Connection" gives me the following error: > > Connection string: DSN=lixbox_sybase; > UID=sa; > PWD=XXXXXXX Try writing the connection string on one line and without whitespace. ODBC drivers sometimes have problems with this. > Connection pool entry: 0 > Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection > rejected by data source', 7952) This is a generic error that relates to authentication or firewall problems. It is possible that turning on ODBC tracing the ODBC manager will give more clues as to the real cause of the problem. > The odbc.ini definition for DSN "lixbox_sybase" is as follows: > > [lixbox_sybase] > JetFix = No > NoRowSetSizeLimit = No > Description = Test connection to listbox > Options = LIXBOX > DSQUERY = SQLSERVER > TDSHOST = lixbox > TDSPORT = 5000 > TDSVER = 5.0 > SQLSERVER_CATALOG = N > CURSOR_SENSITIVITY = LOW > UserName = sa > Password = XXXXXXXX > ServerType = Sybase 10/11/12 > Driver = /opt/openlink/lib/sql_mt_lt.so > Database = pubs2 > ReadOnly = no > NoAutoCommit = No > NoLoginBox = No > FetchBufferSize = 60 > > > Other relevant data: > - Connecting via OpenLink's iODBC > - Zope 2.7.6-final > - Python 2.3.4 > - Connection to Sybase has been successfully tested with iODBC, > including issuing a query > - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC > connection > > > > RJ Juneau > Chief Technology Officer > Maxxian Integration Inc. > 155 Westhampton Drive > Thornhill, Ontario > Canada L4J 7X2 > E-mail: rj@maxxian.com > Phone: +1 905 482 9429 > Cell: +1 416 897 6682 > Toll free: +1 866 758 9161 > Fax: +1 647 722 2038 > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 06 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From calisp at gmail.com Sun May 15 23:49:03 2005 From: calisp at gmail.com (calisp@gmail.com) Date: Tue Feb 7 16:01:28 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK Message-ID: Hi, I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the following error... 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the last phase of a two-phase commit. This shouldn't happen. Traceback (most recent call last): File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one jar.tpc_finish(self) File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish try: self._finish() File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could not perform COMMIT or ROLLBACK', 1023) What could be causing this? Can I get the mxODBCZopeDA source from somewhere? It would make debugging this much easier. Thanks, Calisp. From mal at egenix.com Mon May 16 13:52:12 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Feb 7 16:01:28 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK In-Reply-To: References: Message-ID: <42887B5C.4010109@egenix.com> calisp@gmail.com wrote: > Hi, > > I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with > unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the > following error... > > 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the > last phase of a two-phase commit. This shouldn't happen. > Traceback (most recent call last): > File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one > jar.tpc_finish(self) > File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish > try: self._finish() > File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish > File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler > ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could > not perform COMMIT or ROLLBACK', 1023) You should have a look at the database logs to see what prevented the commit from being completed. > What could be causing this? Hard to say: mxODBCZopeDA is trying to commit the transaction, but the driver or database failed to complete the request. The above error was generated by the ODBC driver. This could be network or DNS problems, or be related to a bug in FreeTDS (which is getting more stable with every new release, but should still be considered beta quality software at the moment). > Can I get the mxODBCZopeDA source from > somewhere? It would make debugging this much easier. Getting the source is not an option and won't help much either since the source of the problem is not mxODBCZopeDA. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 16 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Sun May 1 21:29:25 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Feb 7 20:01:21 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <427259F3.4090806@egenix.com> References: <20050427130906.52878.qmail@web30008.mail.mud.yahoo.com> <427259F3.4090806@egenix.com> Message-ID: <42752005.7080904@egenix.com> M.-A. Lemburg wrote: > David Rushby wrote: > >> --- "M.-A. Lemburg" wrote: >> >>> Are you using the standard mxDateTime build or one >>> with WANT_SUBCLASSABLE_TYPES defined... >> >> >> >> Presumably "the standard", since I just built with 'py24d setup.py >> build', making no attempt to enable special directives. >> >> >>> ... (mxDateTime_Deallocate is only used by the latter)? >> >> >> >> That's true in 2.1.0-2005-04-15, but not in 2.1.0b5. >> >> >>> In any case, please try our latest snapshot: >>> >>> >> >> http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-04-15.zip >> >>> to see if that makes any difference. >> >> >> >> I can't build it out of the box: > > > Hmm, looks like distutils' sdist command doesn't like our new > repository layout which uses symlinks (after we've switched to > subversion). > > We'll have to debug distutils first, I guess :-( Ok, we've found the problem and fixed it. Here's the new release (which does build out of the box at least on our boxes ;-): http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 01 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From davidrushby at yahoo.com Mon May 2 15:49:53 2005 From: davidrushby at yahoo.com (David Rushby) Date: Tue Feb 7 20:01:21 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Ok, we've found the problem and fixed it. Here's the new > release (which does build out of the box at least on our > boxes ;-): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip It does build now, but: py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" still behaves as it did when I submitted my original message: Fatal Python error: UNREF invalid object Aborted This is the same debug build of Python 2.4.1 that I was previously using, running the same configuration (CentOS Linux 4.0/i386, everything compiled with GCC 3.4.3). Have you examined my original claim as to the cause of the bug? __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 10:21:55 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Feb 7 20:01:21 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> References: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> Message-ID: <42772693.8050306@egenix.com> David Rushby wrote: > --- "M.-A. Lemburg" wrote: > >>Ok, we've found the problem and fixed it. Here's the new >>release (which does build out of the box at least on our >>boxes ;-): >> >> > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip > > It does build now, but: > py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" > still behaves as it did when I submitted my original message: > Fatal Python error: UNREF invalid object > Aborted > > This is the same debug build of Python 2.4.1 that I was previously > using, running the same configuration (CentOS Linux 4.0/i386, > everything compiled with GCC 3.4.3). > > Have you examined my original claim as to the cause of the bug? No. We haven't had time for looking into it. I'm not sure whether your analysis of the problem is correct: if you don't define WANT_SUBCLASSABLE_TYPES, the API mxDateTime_Deallocate() is neither defined nor used. Furthermore, PyObject_Del() is only called by mxDateTime_Free() if you have explicitely edited mxDateTime.c to disabled the free list #defines. In a standard build, PyObject_Del() is only called at module finalization time. Note that the reason we call mxDateTime_Free() in the constructor is that we don't want the destructor of the object to be called. Py_DECREF() would call the destructor (mxDateTime_Deallocate). It is possible that the debug code in Python complains about the refcount in the object not being 0 at the time the object is finalized (module finalization time), but I don't see any such checks in PyObject_Free() (which is what PyObject_Del() maps to). Again, all of this does not happen in regular non-debug Python builds. Please be aware that we don't support debug builds, so fixing the problem (if there is one - gcc has some serious optimization problems on some combinations of platform and version) will take a while. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 09:27:37 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Tue Feb 7 20:01:21 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 Message-ID: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Hi all- I am trying to build the mx-base package, v.2.0.6. This will be used with postgresql 7.3.9, psycopg 1.1.18, and Roundup 0.8.2. RHEL 3.0 Python 2.3 egenix-mx-base-2.0.6.tar.gz I performed a: /usr/local/bin/python2.3 setup.py install Everything looks proper with the exeception of this series of warning statements: ----------------- gcc -pthread -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fno-strict-aliasing -fPIC -Imx/BeeBase/mxBeeBase -I/usr/local/incl ude/python2.3 -I/usr/local/include -c mx/BeeBase/mxBeeBase/btr.c -o build/temp.linux-i686-2.3/mx/BeeBase/mxBeeBase/mxBeeBa se/mx/BeeBase/mxBeeBase/btr.o mx/BeeBase/mxBeeBase/btr.c: In function `dumpBuf': mx/BeeBase/mxBeeBase/btr.c:249: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:250: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:255: warning: unsigned int format, long unsigned int arg (arg 4) mx/BeeBase/mxBeeBase/btr.c:256: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c: In function `_validateTree': mx/BeeBase/mxBeeBase/btr.c:330: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:337: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:339: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:349: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:351: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 3) creating build/lib.linux-i686-2.3/mx/BeeBase creating build/lib.linux-i686-2.3/mx/BeeBase/mxBeeBase -------------- Would someone be kind enough to let me know whether these messages were expected, and if not, how I might resolve these? Thanks! DC __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 22:06:33 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Feb 7 20:01:21 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> References: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Message-ID: <4277CBB9.8020302@egenix.com> Dianne Chen wrote: > Hi all- > > I am trying to build the mx-base package, v.2.0.6. > This will be used with postgresql 7.3.9, psycopg > 1.1.18, and Roundup 0.8.2. > > RHEL 3.0 > Python 2.3 > egenix-mx-base-2.0.6.tar.gz > > I performed a: > > /usr/local/bin/python2.3 setup.py install > > Everything looks proper with the exeception of this > series of warning statements: > > ----------------- > ... > -------------- > > Would someone be kind enough to let me know whether > these messages were expected, and if not, how I might > resolve these? These warning can safely be ignored. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 13:41:14 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Tue Feb 7 20:01:21 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: 6667 Message-ID: <20050503194114.72091.qmail@web31414.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Dianne Chen wrote: > > Hi all- > > > > I am trying to build the mx-base package, v.2.0.6. > > This will be used with postgresql 7.3.9, psycopg > > 1.1.18, and Roundup 0.8.2. > > > > RHEL 3.0 > > Python 2.3 > > egenix-mx-base-2.0.6.tar.gz > > > > I performed a: > > > > /usr/local/bin/python2.3 setup.py install > > > > Everything looks proper with the exeception of > this > > series of warning statements: > > > > ----------------- > > ... > > -------------- > > > > Would someone be kind enough to let me know > whether > > these messages were expected, and if not, how I > might > > resolve these? > > These warning can safely be ignored. > > -- > Marc-Andre Lemburg > eGenix.com > Marc- Thank you very much for the reply. It helps greatly. With kind regards, DC __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From davidrushby at yahoo.com Tue May 3 17:18:46 2005 From: davidrushby at yahoo.com (David Rushby) Date: Tue Feb 7 20:01:21 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050503231846.35012.qmail@web30009.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > I'm not sure whether your analysis of the problem is correct... Indeed, my original analysis wasn't correct; I think this one is. The fatal error I'm complaining about only arises if the arguments to DateTime.DateTime are invalid, so that the object is deallocated in the onError block of mxDateTime_FromDateAndTime. If the object is created successfully, and later deallocated by Python's garbage collector, the fatal error doesn't arise. Here's my analysis of the problem: --- If the debugging directive Py_TRACE_REFS is enabled, as it is in my case, the Python interpreter maintains a doubly linked list of all Python objects (named refchain) via the _ob_next and _ob_prev pointers added to PyObject via _PyObject_HEAD_EXTRA. Each object is inserted into refchain by the _Py_AddToAllObjects call in _Py_NewReference, and removed from refchain by the _Py_ForgetReference call in _Py_Dealloc. _Py_ForgetReference performs an integrity check on the object being deallocated (op) to make sure that its neighbors in refchain recognize it. Specifically, _Py_ForgetReference verifies that the _ob_next pointer of the previous object in refchain (op->_ob_prev->_ob_next) points to op, and that the _ob_prev pointer of the next object in refchain (op->_ob_next->_ob_prev) points to op. If either of those conditions is false, the interpreter raises the fatal error I'm seeing. After mxDateTime_New pulls an mxDateTimeObject out of the free list, it calls _Py_NewReference on that object to transform it from a "conceptually deallocated" object to a "conceptually allocated" one. _Py_NewReference inserts the object into refchain. Later, when the object is being "conceptually deallocated", it should be removed from refchain with _Py_ForgetReference. The version of _Py_Dealloc that's active when Py_TRACE_REFS is enabled does this (_Py_Dealloc is the element of Py_DECREF that performs the actual destruction). _Py_Dealloc first calls _Py_ForgetReference to remove the object from refchain, then calls the object's destructor (op->ob_type->tp_dealloc). If WANT_SUBCLASSABLE_TYPES is not defined (it is not in my case), the destructor for mxDateTime_Type is mxDateTime_Free. So, if a DateTime object is deallocated normally, as a result of its reference count falling to zero, _Py_Dealloc is called on the object, which first removes it from refchain, then passes it to mxDateTime_Free. If a DateTime object is destroyed prematurely, as a result of invalid arguments to its destructor, the onError handler calls mxDateTime_Free, so the object is "conceptually deallocated" (placed in the free list), *but* the object is not removed from refchain. So if a refchain-membership-integrity-check is performed on the object in question or one of its immediate neighbors in refchain, that integrity check fails, leading to the fatal error. --- The solution is to 'Py_DECREF(...)' the object in the onError handler of its constructor, instead of passing the object directly to mxDateTime_Free. That change solves two problems: 1) It causes _Py_Dealloc to execute, which in turn executes _Py_ForgetReference, so the object is removed from refchain, as it should be. 2) At present, objects that are created successfully and later deallocated by normal reference count mechanics have a reference count of 0 when they enter the free list, whereas objects whose constructors abort their creation due to invalid arguments have a reference count of 1 when they enter the free list. Although AFAIK this doesn't cause an actual execution problem (because the object's reference count is *explicitly set to 1* rather than *incremented by 1* when the object is later "conceptually allocated" by _Py_NewReference), it is likely to confuse future maintainers and thereby lead to the introduction of an actual execution problem. I assume that if you agree that this is a reasonable solution, you'll want to apply the change not only to mxDateTime_FromDateAndTime, but to all similar constructors in mxDateTime.c. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From rj at maxxian.com Thu May 5 01:57:40 2005 From: rj at maxxian.com (RJ Juneau) Date: Tue Feb 7 20:01:21 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c5512e$f72798c0$6505a8c0@rjlaptop> I'm on the 30 day evaluation for mxodbc_zope_da. I'm getting the following error when I submit some queries: Error Type: KeyError Error Value: 'query' I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 with UCS4. The error seems to be caused by multiple rows being returned. I did see an earlier posting with the same error message. The response suggested a template error, but this is clearly not the case here. The additional evidence I've gathered so far: - I'm running the test directly from the ZSQL method, so there's no template involved. - If I use the same query with an additional "where" clause to ensure that only one row is returned, it works - If I use a value in the 'where' clause with no rows returned, it works - The same ZSQL query is being used on a Windows machine running Zope and the free ZODBC module without a problem - The query has been verified directly in mysql-client-browser Other info: - The database is MySQL 4.1.10A-0 - iODBC is the DB driver RJ Juneau -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050505/68d278bf/attachment-0104.htm From mal at egenix.com Thu May 5 12:37:43 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Feb 7 20:01:21 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c5512e$f72798c0$6505a8c0@rjlaptop> References: <000301c5512e$f72798c0$6505a8c0@rjlaptop> Message-ID: <4279E967.6010904@egenix.com> RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 > with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 09:37:42 2005 From: rj at maxxian.com (RJ Juneau) Date: Tue Feb 7 20:01:21 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000101c5516f$3b96de90$6505a8c0@rjlaptop> More interesting info on the problem: If I execute the query directly in the "test" window of the base eGenix mxODBC Database Connection window, it works fine and returns the 20 lines expected. That could point to a problem in the rendering, which seems to be where the traceback ends. Note that within the same Zope system I also have an ODBC connection to a Sybase database, and I have successfully tested multi-line ZSQL queries there. This is the traceback: Time 2005/05/05 07:55:15.294 GMT-4 Exception Type KeyError Exception Value 'query' Traceback (innermost last): Module ZPublisher.Publish, line 101, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 39, in call_object Module Shared.DC.ZRDB.DA, line 337, in manage_test Module DocumentTemplate.DT_String, line 474, in __call__ Module DocumentTemplate.DT_In, line 602, in renderwb Module DocumentTemplate.DT_Var, line 219, in render KeyError: 'query' I don't think the following is an issue, but I'll include it for completeness.I am also getting the following iODBC warnings and errors in the Zope console log, which are related to the ODBC parameters being passed by iODBC. Note that these errors also appear for all of the successful queries. [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (Setup). [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (UsageCount). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Timeout). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Reuse). As for the ZSQL snippet from the template... Since there's no template involved yet (I'm still testing directly from the ZSQL method), I assume you mean the SQL code? select h.host_name, s.system_name, s.system_handle, count(*) from terminal t, system_map s, host h where t.system_index = s.system_index and s.host_index = h.host_index group by s.system_name order by h.host_name Nothing complicated here. There are no parameters passed to the query. RJ -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: May 5, 2005 5:38 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: Re: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is > 2.3.4 with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ---------------------------------------------------------------------- > -- > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 16:00:32 2005 From: charlie at egenix.com (Charlie Clark) Date: Tue Feb 7 20:01:21 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000101c5516f$3b96de90$6505a8c0@rjlaptop> References: <000101c5516f$3b96de90$6505a8c0@rjlaptop> Message-ID: <20050505150032.644.1@bepc.1115296715.fake> On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base eGenix > mxODBC Database Connection window, it works fine and returns the 20 > lines expected. That could point to a problem in the rendering, which > seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection to > a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 10:22:17 2005 From: rj at maxxian.com (RJ Juneau) Date: Tue Feb 7 20:01:21 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505150032.644.1@bepc.1115296715.fake> Message-ID: <000201c55175$75bcad10$6505a8c0@rjlaptop> At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 11:47:14 2005 From: rj at maxxian.com (RJ Juneau) Date: Tue Feb 7 20:01:21 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c55181$549be0e0$6505a8c0@rjlaptop> Charlie, I found a fix. Here it is in case anyone else runs into this. You were correct - the problem is in another part of Zope. Based on your feedback, I did a bit more searching and found something here: http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. html The problem appears to be in Zope versions after 2.7.0. I'm running 2.7.6, and the post indicates that it also happens in 2.7.4. The solution: Edit file /lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. There are two lines in the file that start with . Edit them as follows: Change first line to: Change second line to: Just to be after, I shut down Zope before I made the changes and restarted it after. Thanks for the help! RJ -----Original Message----- From: RJ Juneau [mailto:rj@maxxian.com] Sent: May 5, 2005 9:22 AM To: 'Charlie Clark' Cc: 'egenix-users@lists.egenix.com' Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 17:57:25 2005 From: charlie at egenix.com (Charlie Clark) Date: Tue Feb 7 20:01:21 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <20050505165725.3380.2@bepc.1115296715.fake> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Thu May 5 09:15:21 2005 From: charlie at egenix.com (Charlie Clark) Date: Tue Feb 7 20:01:21 2006 Subject: [Zope-DB] RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <000001c55185$41477730$6b00a8c0@fonacier.local> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________ Zope-DB mailing list Zope-DB@zope.org http://mail.zope.org/mailman/listinfo/zope-db From rj at maxxian.com Thu May 5 12:38:00 2005 From: rj at maxxian.com (RJ Juneau) Date: Tue Feb 7 20:01:21 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000001c55188$6b841eb0$6505a8c0@rjlaptop> I just double-checked. Zope-2.7.6-final. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 12:49:16 2005 From: rj at maxxian.com (RJ Juneau) Date: Tue Feb 7 20:01:21 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000501c55189$fe149ba0$6505a8c0@rjlaptop> Charlie, The fix has only been applied for 2.7.7, 2.8b2. The info is in the original bug report which is closed and can be found here: http://www.zope.org/Collectors/Zope/1745 RJ -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Fri May 6 11:50:09 2005 From: rj at maxxian.com (RJ Juneau) Date: Tue Feb 7 20:01:21 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC Message-ID: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Still on eval for the product. I cannot get a stable connection to Sybase via the iODBC drivers. - The Sybase ODBC connection - including a query - have been verified at the iODBC level. - The setup is already working well for ODBC connection to MySQL. Symptoms include: - If I click on "Open Connection", it still comes back with "Connection Closed" when I go to a ZSQL method - Using 'Connect on Demand' is not working either. - Clicking "Open Connection" gives me the following error: Connection string: DSN=lixbox_sybase; UID=sa; PWD=XXXXXXX Connection pool entry: 0 Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection rejected by data source', 7952) The odbc.ini definition for DSN "lixbox_sybase" is as follows: [lixbox_sybase] JetFix = No NoRowSetSizeLimit = No Description = Test connection to listbox Options = LIXBOX DSQUERY = SQLSERVER TDSHOST = lixbox TDSPORT = 5000 TDSVER = 5.0 SQLSERVER_CATALOG = N CURSOR_SENSITIVITY = LOW UserName = sa Password = XXXXXXXX ServerType = Sybase 10/11/12 Driver = /opt/openlink/lib/sql_mt_lt.so Database = pubs2 ReadOnly = no NoAutoCommit = No NoLoginBox = No FetchBufferSize = 60 Other relevant data: - Connecting via OpenLink's iODBC - Zope 2.7.6-final - Python 2.3.4 - Connection to Sybase has been successfully tested with iODBC, including issuing a query - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC connection RJ Juneau Chief Technology Officer Maxxian Integration Inc. 155 Westhampton Drive Thornhill, Ontario Canada L4J 7X2 E-mail: rj@maxxian.com Phone: +1 905 482 9429 Cell: +1 416 897 6682 Toll free: +1 866 758 9161 Fax: +1 647 722 2038 -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050506/aef33361/attachment-0104.htm From mal at egenix.com Fri May 6 18:27:37 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Feb 7 20:01:21 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC In-Reply-To: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> References: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Message-ID: <427B8CE9.1010601@egenix.com> RJ Juneau wrote: > Still on eval for the product. > > I cannot get a stable connection to Sybase via the iODBC drivers. > > - The Sybase ODBC connection - including a query - have been verified at > the iODBC level. > - The setup is already working well for ODBC connection to MySQL. > > Symptoms include: > > - If I click on "Open Connection", it still comes back with "Connection > Closed" when I go to a ZSQL method > - Using 'Connect on Demand' is not working either. > - Clicking "Open Connection" gives me the following error: > > Connection string: DSN=lixbox_sybase; > UID=sa; > PWD=XXXXXXX Try writing the connection string on one line and without whitespace. ODBC drivers sometimes have problems with this. > Connection pool entry: 0 > Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection > rejected by data source', 7952) This is a generic error that relates to authentication or firewall problems. It is possible that turning on ODBC tracing the ODBC manager will give more clues as to the real cause of the problem. > The odbc.ini definition for DSN "lixbox_sybase" is as follows: > > [lixbox_sybase] > JetFix = No > NoRowSetSizeLimit = No > Description = Test connection to listbox > Options = LIXBOX > DSQUERY = SQLSERVER > TDSHOST = lixbox > TDSPORT = 5000 > TDSVER = 5.0 > SQLSERVER_CATALOG = N > CURSOR_SENSITIVITY = LOW > UserName = sa > Password = XXXXXXXX > ServerType = Sybase 10/11/12 > Driver = /opt/openlink/lib/sql_mt_lt.so > Database = pubs2 > ReadOnly = no > NoAutoCommit = No > NoLoginBox = No > FetchBufferSize = 60 > > > Other relevant data: > - Connecting via OpenLink's iODBC > - Zope 2.7.6-final > - Python 2.3.4 > - Connection to Sybase has been successfully tested with iODBC, > including issuing a query > - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC > connection > > > > RJ Juneau > Chief Technology Officer > Maxxian Integration Inc. > 155 Westhampton Drive > Thornhill, Ontario > Canada L4J 7X2 > E-mail: rj@maxxian.com > Phone: +1 905 482 9429 > Cell: +1 416 897 6682 > Toll free: +1 866 758 9161 > Fax: +1 647 722 2038 > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 06 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From calisp at gmail.com Sun May 15 23:49:03 2005 From: calisp at gmail.com (calisp@gmail.com) Date: Tue Feb 7 20:01:21 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK Message-ID: Hi, I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the following error... 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the last phase of a two-phase commit. This shouldn't happen. Traceback (most recent call last): File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one jar.tpc_finish(self) File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish try: self._finish() File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could not perform COMMIT or ROLLBACK', 1023) What could be causing this? Can I get the mxODBCZopeDA source from somewhere? It would make debugging this much easier. Thanks, Calisp. From mal at egenix.com Mon May 16 13:52:12 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Feb 7 20:01:21 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK In-Reply-To: References: Message-ID: <42887B5C.4010109@egenix.com> calisp@gmail.com wrote: > Hi, > > I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with > unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the > following error... > > 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the > last phase of a two-phase commit. This shouldn't happen. > Traceback (most recent call last): > File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one > jar.tpc_finish(self) > File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish > try: self._finish() > File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish > File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler > ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could > not perform COMMIT or ROLLBACK', 1023) You should have a look at the database logs to see what prevented the commit from being completed. > What could be causing this? Hard to say: mxODBCZopeDA is trying to commit the transaction, but the driver or database failed to complete the request. The above error was generated by the ODBC driver. This could be network or DNS problems, or be related to a bug in FreeTDS (which is getting more stable with every new release, but should still be considered beta quality software at the moment). > Can I get the mxODBCZopeDA source from > somewhere? It would make debugging this much easier. Getting the source is not an option and won't help much either since the source of the problem is not mxODBCZopeDA. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 16 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Sun May 1 21:29:25 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 8 08:26:07 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <427259F3.4090806@egenix.com> References: <20050427130906.52878.qmail@web30008.mail.mud.yahoo.com> <427259F3.4090806@egenix.com> Message-ID: <42752005.7080904@egenix.com> M.-A. Lemburg wrote: > David Rushby wrote: > >> --- "M.-A. Lemburg" wrote: >> >>> Are you using the standard mxDateTime build or one >>> with WANT_SUBCLASSABLE_TYPES defined... >> >> >> >> Presumably "the standard", since I just built with 'py24d setup.py >> build', making no attempt to enable special directives. >> >> >>> ... (mxDateTime_Deallocate is only used by the latter)? >> >> >> >> That's true in 2.1.0-2005-04-15, but not in 2.1.0b5. >> >> >>> In any case, please try our latest snapshot: >>> >>> >> >> http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-04-15.zip >> >>> to see if that makes any difference. >> >> >> >> I can't build it out of the box: > > > Hmm, looks like distutils' sdist command doesn't like our new > repository layout which uses symlinks (after we've switched to > subversion). > > We'll have to debug distutils first, I guess :-( Ok, we've found the problem and fixed it. Here's the new release (which does build out of the box at least on our boxes ;-): http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 01 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From davidrushby at yahoo.com Mon May 2 15:49:53 2005 From: davidrushby at yahoo.com (David Rushby) Date: Wed Feb 8 08:26:15 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Ok, we've found the problem and fixed it. Here's the new > release (which does build out of the box at least on our > boxes ;-): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip It does build now, but: py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" still behaves as it did when I submitted my original message: Fatal Python error: UNREF invalid object Aborted This is the same debug build of Python 2.4.1 that I was previously using, running the same configuration (CentOS Linux 4.0/i386, everything compiled with GCC 3.4.3). Have you examined my original claim as to the cause of the bug? __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 10:21:55 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 8 08:26:15 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> References: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> Message-ID: <42772693.8050306@egenix.com> David Rushby wrote: > --- "M.-A. Lemburg" wrote: > >>Ok, we've found the problem and fixed it. Here's the new >>release (which does build out of the box at least on our >>boxes ;-): >> >> > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip > > It does build now, but: > py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" > still behaves as it did when I submitted my original message: > Fatal Python error: UNREF invalid object > Aborted > > This is the same debug build of Python 2.4.1 that I was previously > using, running the same configuration (CentOS Linux 4.0/i386, > everything compiled with GCC 3.4.3). > > Have you examined my original claim as to the cause of the bug? No. We haven't had time for looking into it. I'm not sure whether your analysis of the problem is correct: if you don't define WANT_SUBCLASSABLE_TYPES, the API mxDateTime_Deallocate() is neither defined nor used. Furthermore, PyObject_Del() is only called by mxDateTime_Free() if you have explicitely edited mxDateTime.c to disabled the free list #defines. In a standard build, PyObject_Del() is only called at module finalization time. Note that the reason we call mxDateTime_Free() in the constructor is that we don't want the destructor of the object to be called. Py_DECREF() would call the destructor (mxDateTime_Deallocate). It is possible that the debug code in Python complains about the refcount in the object not being 0 at the time the object is finalized (module finalization time), but I don't see any such checks in PyObject_Free() (which is what PyObject_Del() maps to). Again, all of this does not happen in regular non-debug Python builds. Please be aware that we don't support debug builds, so fixing the problem (if there is one - gcc has some serious optimization problems on some combinations of platform and version) will take a while. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 09:27:37 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Wed Feb 8 08:26:15 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 Message-ID: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Hi all- I am trying to build the mx-base package, v.2.0.6. This will be used with postgresql 7.3.9, psycopg 1.1.18, and Roundup 0.8.2. RHEL 3.0 Python 2.3 egenix-mx-base-2.0.6.tar.gz I performed a: /usr/local/bin/python2.3 setup.py install Everything looks proper with the exeception of this series of warning statements: ----------------- gcc -pthread -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fno-strict-aliasing -fPIC -Imx/BeeBase/mxBeeBase -I/usr/local/incl ude/python2.3 -I/usr/local/include -c mx/BeeBase/mxBeeBase/btr.c -o build/temp.linux-i686-2.3/mx/BeeBase/mxBeeBase/mxBeeBa se/mx/BeeBase/mxBeeBase/btr.o mx/BeeBase/mxBeeBase/btr.c: In function `dumpBuf': mx/BeeBase/mxBeeBase/btr.c:249: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:250: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:255: warning: unsigned int format, long unsigned int arg (arg 4) mx/BeeBase/mxBeeBase/btr.c:256: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c: In function `_validateTree': mx/BeeBase/mxBeeBase/btr.c:330: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:337: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:339: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:349: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:351: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 3) creating build/lib.linux-i686-2.3/mx/BeeBase creating build/lib.linux-i686-2.3/mx/BeeBase/mxBeeBase -------------- Would someone be kind enough to let me know whether these messages were expected, and if not, how I might resolve these? Thanks! DC __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 22:06:33 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 8 08:26:15 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> References: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Message-ID: <4277CBB9.8020302@egenix.com> Dianne Chen wrote: > Hi all- > > I am trying to build the mx-base package, v.2.0.6. > This will be used with postgresql 7.3.9, psycopg > 1.1.18, and Roundup 0.8.2. > > RHEL 3.0 > Python 2.3 > egenix-mx-base-2.0.6.tar.gz > > I performed a: > > /usr/local/bin/python2.3 setup.py install > > Everything looks proper with the exeception of this > series of warning statements: > > ----------------- > ... > -------------- > > Would someone be kind enough to let me know whether > these messages were expected, and if not, how I might > resolve these? These warning can safely be ignored. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 13:41:14 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Wed Feb 8 08:26:16 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: 6667 Message-ID: <20050503194114.72091.qmail@web31414.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Dianne Chen wrote: > > Hi all- > > > > I am trying to build the mx-base package, v.2.0.6. > > This will be used with postgresql 7.3.9, psycopg > > 1.1.18, and Roundup 0.8.2. > > > > RHEL 3.0 > > Python 2.3 > > egenix-mx-base-2.0.6.tar.gz > > > > I performed a: > > > > /usr/local/bin/python2.3 setup.py install > > > > Everything looks proper with the exeception of > this > > series of warning statements: > > > > ----------------- > > ... > > -------------- > > > > Would someone be kind enough to let me know > whether > > these messages were expected, and if not, how I > might > > resolve these? > > These warning can safely be ignored. > > -- > Marc-Andre Lemburg > eGenix.com > Marc- Thank you very much for the reply. It helps greatly. With kind regards, DC __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From davidrushby at yahoo.com Tue May 3 17:18:46 2005 From: davidrushby at yahoo.com (David Rushby) Date: Wed Feb 8 08:26:16 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050503231846.35012.qmail@web30009.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > I'm not sure whether your analysis of the problem is correct... Indeed, my original analysis wasn't correct; I think this one is. The fatal error I'm complaining about only arises if the arguments to DateTime.DateTime are invalid, so that the object is deallocated in the onError block of mxDateTime_FromDateAndTime. If the object is created successfully, and later deallocated by Python's garbage collector, the fatal error doesn't arise. Here's my analysis of the problem: --- If the debugging directive Py_TRACE_REFS is enabled, as it is in my case, the Python interpreter maintains a doubly linked list of all Python objects (named refchain) via the _ob_next and _ob_prev pointers added to PyObject via _PyObject_HEAD_EXTRA. Each object is inserted into refchain by the _Py_AddToAllObjects call in _Py_NewReference, and removed from refchain by the _Py_ForgetReference call in _Py_Dealloc. _Py_ForgetReference performs an integrity check on the object being deallocated (op) to make sure that its neighbors in refchain recognize it. Specifically, _Py_ForgetReference verifies that the _ob_next pointer of the previous object in refchain (op->_ob_prev->_ob_next) points to op, and that the _ob_prev pointer of the next object in refchain (op->_ob_next->_ob_prev) points to op. If either of those conditions is false, the interpreter raises the fatal error I'm seeing. After mxDateTime_New pulls an mxDateTimeObject out of the free list, it calls _Py_NewReference on that object to transform it from a "conceptually deallocated" object to a "conceptually allocated" one. _Py_NewReference inserts the object into refchain. Later, when the object is being "conceptually deallocated", it should be removed from refchain with _Py_ForgetReference. The version of _Py_Dealloc that's active when Py_TRACE_REFS is enabled does this (_Py_Dealloc is the element of Py_DECREF that performs the actual destruction). _Py_Dealloc first calls _Py_ForgetReference to remove the object from refchain, then calls the object's destructor (op->ob_type->tp_dealloc). If WANT_SUBCLASSABLE_TYPES is not defined (it is not in my case), the destructor for mxDateTime_Type is mxDateTime_Free. So, if a DateTime object is deallocated normally, as a result of its reference count falling to zero, _Py_Dealloc is called on the object, which first removes it from refchain, then passes it to mxDateTime_Free. If a DateTime object is destroyed prematurely, as a result of invalid arguments to its destructor, the onError handler calls mxDateTime_Free, so the object is "conceptually deallocated" (placed in the free list), *but* the object is not removed from refchain. So if a refchain-membership-integrity-check is performed on the object in question or one of its immediate neighbors in refchain, that integrity check fails, leading to the fatal error. --- The solution is to 'Py_DECREF(...)' the object in the onError handler of its constructor, instead of passing the object directly to mxDateTime_Free. That change solves two problems: 1) It causes _Py_Dealloc to execute, which in turn executes _Py_ForgetReference, so the object is removed from refchain, as it should be. 2) At present, objects that are created successfully and later deallocated by normal reference count mechanics have a reference count of 0 when they enter the free list, whereas objects whose constructors abort their creation due to invalid arguments have a reference count of 1 when they enter the free list. Although AFAIK this doesn't cause an actual execution problem (because the object's reference count is *explicitly set to 1* rather than *incremented by 1* when the object is later "conceptually allocated" by _Py_NewReference), it is likely to confuse future maintainers and thereby lead to the introduction of an actual execution problem. I assume that if you agree that this is a reasonable solution, you'll want to apply the change not only to mxDateTime_FromDateAndTime, but to all similar constructors in mxDateTime.c. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From rj at maxxian.com Thu May 5 01:57:40 2005 From: rj at maxxian.com (RJ Juneau) Date: Wed Feb 8 08:26:20 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c5512e$f72798c0$6505a8c0@rjlaptop> I'm on the 30 day evaluation for mxodbc_zope_da. I'm getting the following error when I submit some queries: Error Type: KeyError Error Value: 'query' I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 with UCS4. The error seems to be caused by multiple rows being returned. I did see an earlier posting with the same error message. The response suggested a template error, but this is clearly not the case here. The additional evidence I've gathered so far: - I'm running the test directly from the ZSQL method, so there's no template involved. - If I use the same query with an additional "where" clause to ensure that only one row is returned, it works - If I use a value in the 'where' clause with no rows returned, it works - The same ZSQL query is being used on a Windows machine running Zope and the free ZODBC module without a problem - The query has been verified directly in mysql-client-browser Other info: - The database is MySQL 4.1.10A-0 - iODBC is the DB driver RJ Juneau -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050505/68d278bf/attachment-0105.htm From mal at egenix.com Thu May 5 12:37:43 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 8 08:26:20 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c5512e$f72798c0$6505a8c0@rjlaptop> References: <000301c5512e$f72798c0$6505a8c0@rjlaptop> Message-ID: <4279E967.6010904@egenix.com> RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 > with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 09:37:42 2005 From: rj at maxxian.com (RJ Juneau) Date: Wed Feb 8 08:26:20 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000101c5516f$3b96de90$6505a8c0@rjlaptop> More interesting info on the problem: If I execute the query directly in the "test" window of the base eGenix mxODBC Database Connection window, it works fine and returns the 20 lines expected. That could point to a problem in the rendering, which seems to be where the traceback ends. Note that within the same Zope system I also have an ODBC connection to a Sybase database, and I have successfully tested multi-line ZSQL queries there. This is the traceback: Time 2005/05/05 07:55:15.294 GMT-4 Exception Type KeyError Exception Value 'query' Traceback (innermost last): Module ZPublisher.Publish, line 101, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 39, in call_object Module Shared.DC.ZRDB.DA, line 337, in manage_test Module DocumentTemplate.DT_String, line 474, in __call__ Module DocumentTemplate.DT_In, line 602, in renderwb Module DocumentTemplate.DT_Var, line 219, in render KeyError: 'query' I don't think the following is an issue, but I'll include it for completeness.I am also getting the following iODBC warnings and errors in the Zope console log, which are related to the ODBC parameters being passed by iODBC. Note that these errors also appear for all of the successful queries. [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (Setup). [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (UsageCount). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Timeout). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Reuse). As for the ZSQL snippet from the template... Since there's no template involved yet (I'm still testing directly from the ZSQL method), I assume you mean the SQL code? select h.host_name, s.system_name, s.system_handle, count(*) from terminal t, system_map s, host h where t.system_index = s.system_index and s.host_index = h.host_index group by s.system_name order by h.host_name Nothing complicated here. There are no parameters passed to the query. RJ -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: May 5, 2005 5:38 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: Re: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is > 2.3.4 with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ---------------------------------------------------------------------- > -- > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 16:00:32 2005 From: charlie at egenix.com (Charlie Clark) Date: Wed Feb 8 08:26:20 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000101c5516f$3b96de90$6505a8c0@rjlaptop> References: <000101c5516f$3b96de90$6505a8c0@rjlaptop> Message-ID: <20050505150032.644.1@bepc.1115296715.fake> On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base eGenix > mxODBC Database Connection window, it works fine and returns the 20 > lines expected. That could point to a problem in the rendering, which > seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection to > a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 10:22:17 2005 From: rj at maxxian.com (RJ Juneau) Date: Wed Feb 8 08:26:20 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505150032.644.1@bepc.1115296715.fake> Message-ID: <000201c55175$75bcad10$6505a8c0@rjlaptop> At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 11:47:14 2005 From: rj at maxxian.com (RJ Juneau) Date: Wed Feb 8 08:26:20 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c55181$549be0e0$6505a8c0@rjlaptop> Charlie, I found a fix. Here it is in case anyone else runs into this. You were correct - the problem is in another part of Zope. Based on your feedback, I did a bit more searching and found something here: http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. html The problem appears to be in Zope versions after 2.7.0. I'm running 2.7.6, and the post indicates that it also happens in 2.7.4. The solution: Edit file /lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. There are two lines in the file that start with . Edit them as follows: Change first line to: Change second line to: Just to be after, I shut down Zope before I made the changes and restarted it after. Thanks for the help! RJ -----Original Message----- From: RJ Juneau [mailto:rj@maxxian.com] Sent: May 5, 2005 9:22 AM To: 'Charlie Clark' Cc: 'egenix-users@lists.egenix.com' Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 17:57:25 2005 From: charlie at egenix.com (Charlie Clark) Date: Wed Feb 8 08:26:21 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <20050505165725.3380.2@bepc.1115296715.fake> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Thu May 5 09:15:21 2005 From: charlie at egenix.com (Charlie Clark) Date: Wed Feb 8 08:26:21 2006 Subject: [Zope-DB] RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <000001c55185$41477730$6b00a8c0@fonacier.local> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________ Zope-DB mailing list Zope-DB@zope.org http://mail.zope.org/mailman/listinfo/zope-db From rj at maxxian.com Thu May 5 12:38:00 2005 From: rj at maxxian.com (RJ Juneau) Date: Wed Feb 8 08:26:21 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000001c55188$6b841eb0$6505a8c0@rjlaptop> I just double-checked. Zope-2.7.6-final. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 12:49:16 2005 From: rj at maxxian.com (RJ Juneau) Date: Wed Feb 8 08:26:21 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000501c55189$fe149ba0$6505a8c0@rjlaptop> Charlie, The fix has only been applied for 2.7.7, 2.8b2. The info is in the original bug report which is closed and can be found here: http://www.zope.org/Collectors/Zope/1745 RJ -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Fri May 6 11:50:09 2005 From: rj at maxxian.com (RJ Juneau) Date: Wed Feb 8 08:26:21 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC Message-ID: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Still on eval for the product. I cannot get a stable connection to Sybase via the iODBC drivers. - The Sybase ODBC connection - including a query - have been verified at the iODBC level. - The setup is already working well for ODBC connection to MySQL. Symptoms include: - If I click on "Open Connection", it still comes back with "Connection Closed" when I go to a ZSQL method - Using 'Connect on Demand' is not working either. - Clicking "Open Connection" gives me the following error: Connection string: DSN=lixbox_sybase; UID=sa; PWD=XXXXXXX Connection pool entry: 0 Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection rejected by data source', 7952) The odbc.ini definition for DSN "lixbox_sybase" is as follows: [lixbox_sybase] JetFix = No NoRowSetSizeLimit = No Description = Test connection to listbox Options = LIXBOX DSQUERY = SQLSERVER TDSHOST = lixbox TDSPORT = 5000 TDSVER = 5.0 SQLSERVER_CATALOG = N CURSOR_SENSITIVITY = LOW UserName = sa Password = XXXXXXXX ServerType = Sybase 10/11/12 Driver = /opt/openlink/lib/sql_mt_lt.so Database = pubs2 ReadOnly = no NoAutoCommit = No NoLoginBox = No FetchBufferSize = 60 Other relevant data: - Connecting via OpenLink's iODBC - Zope 2.7.6-final - Python 2.3.4 - Connection to Sybase has been successfully tested with iODBC, including issuing a query - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC connection RJ Juneau Chief Technology Officer Maxxian Integration Inc. 155 Westhampton Drive Thornhill, Ontario Canada L4J 7X2 E-mail: rj@maxxian.com Phone: +1 905 482 9429 Cell: +1 416 897 6682 Toll free: +1 866 758 9161 Fax: +1 647 722 2038 -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050506/aef33361/attachment-0105.htm From mal at egenix.com Fri May 6 18:27:37 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 8 08:26:21 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC In-Reply-To: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> References: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Message-ID: <427B8CE9.1010601@egenix.com> RJ Juneau wrote: > Still on eval for the product. > > I cannot get a stable connection to Sybase via the iODBC drivers. > > - The Sybase ODBC connection - including a query - have been verified at > the iODBC level. > - The setup is already working well for ODBC connection to MySQL. > > Symptoms include: > > - If I click on "Open Connection", it still comes back with "Connection > Closed" when I go to a ZSQL method > - Using 'Connect on Demand' is not working either. > - Clicking "Open Connection" gives me the following error: > > Connection string: DSN=lixbox_sybase; > UID=sa; > PWD=XXXXXXX Try writing the connection string on one line and without whitespace. ODBC drivers sometimes have problems with this. > Connection pool entry: 0 > Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection > rejected by data source', 7952) This is a generic error that relates to authentication or firewall problems. It is possible that turning on ODBC tracing the ODBC manager will give more clues as to the real cause of the problem. > The odbc.ini definition for DSN "lixbox_sybase" is as follows: > > [lixbox_sybase] > JetFix = No > NoRowSetSizeLimit = No > Description = Test connection to listbox > Options = LIXBOX > DSQUERY = SQLSERVER > TDSHOST = lixbox > TDSPORT = 5000 > TDSVER = 5.0 > SQLSERVER_CATALOG = N > CURSOR_SENSITIVITY = LOW > UserName = sa > Password = XXXXXXXX > ServerType = Sybase 10/11/12 > Driver = /opt/openlink/lib/sql_mt_lt.so > Database = pubs2 > ReadOnly = no > NoAutoCommit = No > NoLoginBox = No > FetchBufferSize = 60 > > > Other relevant data: > - Connecting via OpenLink's iODBC > - Zope 2.7.6-final > - Python 2.3.4 > - Connection to Sybase has been successfully tested with iODBC, > including issuing a query > - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC > connection > > > > RJ Juneau > Chief Technology Officer > Maxxian Integration Inc. > 155 Westhampton Drive > Thornhill, Ontario > Canada L4J 7X2 > E-mail: rj@maxxian.com > Phone: +1 905 482 9429 > Cell: +1 416 897 6682 > Toll free: +1 866 758 9161 > Fax: +1 647 722 2038 > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 06 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From calisp at gmail.com Sun May 15 23:49:03 2005 From: calisp at gmail.com (calisp@gmail.com) Date: Wed Feb 8 08:26:21 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK Message-ID: Hi, I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the following error... 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the last phase of a two-phase commit. This shouldn't happen. Traceback (most recent call last): File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one jar.tpc_finish(self) File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish try: self._finish() File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could not perform COMMIT or ROLLBACK', 1023) What could be causing this? Can I get the mxODBCZopeDA source from somewhere? It would make debugging this much easier. Thanks, Calisp. From mal at egenix.com Mon May 16 13:52:12 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 8 08:26:21 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK In-Reply-To: References: Message-ID: <42887B5C.4010109@egenix.com> calisp@gmail.com wrote: > Hi, > > I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with > unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the > following error... > > 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the > last phase of a two-phase commit. This shouldn't happen. > Traceback (most recent call last): > File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one > jar.tpc_finish(self) > File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish > try: self._finish() > File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish > File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler > ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could > not perform COMMIT or ROLLBACK', 1023) You should have a look at the database logs to see what prevented the commit from being completed. > What could be causing this? Hard to say: mxODBCZopeDA is trying to commit the transaction, but the driver or database failed to complete the request. The above error was generated by the ODBC driver. This could be network or DNS problems, or be related to a bug in FreeTDS (which is getting more stable with every new release, but should still be considered beta quality software at the moment). > Can I get the mxODBCZopeDA source from > somewhere? It would make debugging this much easier. Getting the source is not an option and won't help much either since the source of the problem is not mxODBCZopeDA. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 16 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Sun May 1 21:29:25 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 8 12:04:01 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <427259F3.4090806@egenix.com> References: <20050427130906.52878.qmail@web30008.mail.mud.yahoo.com> <427259F3.4090806@egenix.com> Message-ID: <42752005.7080904@egenix.com> M.-A. Lemburg wrote: > David Rushby wrote: > >> --- "M.-A. Lemburg" wrote: >> >>> Are you using the standard mxDateTime build or one >>> with WANT_SUBCLASSABLE_TYPES defined... >> >> >> >> Presumably "the standard", since I just built with 'py24d setup.py >> build', making no attempt to enable special directives. >> >> >>> ... (mxDateTime_Deallocate is only used by the latter)? >> >> >> >> That's true in 2.1.0-2005-04-15, but not in 2.1.0b5. >> >> >>> In any case, please try our latest snapshot: >>> >>> >> >> http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-04-15.zip >> >>> to see if that makes any difference. >> >> >> >> I can't build it out of the box: > > > Hmm, looks like distutils' sdist command doesn't like our new > repository layout which uses symlinks (after we've switched to > subversion). > > We'll have to debug distutils first, I guess :-( Ok, we've found the problem and fixed it. Here's the new release (which does build out of the box at least on our boxes ;-): http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 01 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From davidrushby at yahoo.com Mon May 2 15:49:53 2005 From: davidrushby at yahoo.com (David Rushby) Date: Wed Feb 8 12:04:01 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Ok, we've found the problem and fixed it. Here's the new > release (which does build out of the box at least on our > boxes ;-): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip It does build now, but: py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" still behaves as it did when I submitted my original message: Fatal Python error: UNREF invalid object Aborted This is the same debug build of Python 2.4.1 that I was previously using, running the same configuration (CentOS Linux 4.0/i386, everything compiled with GCC 3.4.3). Have you examined my original claim as to the cause of the bug? __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 10:21:55 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 8 12:04:01 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> References: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> Message-ID: <42772693.8050306@egenix.com> David Rushby wrote: > --- "M.-A. Lemburg" wrote: > >>Ok, we've found the problem and fixed it. Here's the new >>release (which does build out of the box at least on our >>boxes ;-): >> >> > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip > > It does build now, but: > py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" > still behaves as it did when I submitted my original message: > Fatal Python error: UNREF invalid object > Aborted > > This is the same debug build of Python 2.4.1 that I was previously > using, running the same configuration (CentOS Linux 4.0/i386, > everything compiled with GCC 3.4.3). > > Have you examined my original claim as to the cause of the bug? No. We haven't had time for looking into it. I'm not sure whether your analysis of the problem is correct: if you don't define WANT_SUBCLASSABLE_TYPES, the API mxDateTime_Deallocate() is neither defined nor used. Furthermore, PyObject_Del() is only called by mxDateTime_Free() if you have explicitely edited mxDateTime.c to disabled the free list #defines. In a standard build, PyObject_Del() is only called at module finalization time. Note that the reason we call mxDateTime_Free() in the constructor is that we don't want the destructor of the object to be called. Py_DECREF() would call the destructor (mxDateTime_Deallocate). It is possible that the debug code in Python complains about the refcount in the object not being 0 at the time the object is finalized (module finalization time), but I don't see any such checks in PyObject_Free() (which is what PyObject_Del() maps to). Again, all of this does not happen in regular non-debug Python builds. Please be aware that we don't support debug builds, so fixing the problem (if there is one - gcc has some serious optimization problems on some combinations of platform and version) will take a while. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 09:27:37 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Wed Feb 8 12:04:01 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 Message-ID: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Hi all- I am trying to build the mx-base package, v.2.0.6. This will be used with postgresql 7.3.9, psycopg 1.1.18, and Roundup 0.8.2. RHEL 3.0 Python 2.3 egenix-mx-base-2.0.6.tar.gz I performed a: /usr/local/bin/python2.3 setup.py install Everything looks proper with the exeception of this series of warning statements: ----------------- gcc -pthread -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fno-strict-aliasing -fPIC -Imx/BeeBase/mxBeeBase -I/usr/local/incl ude/python2.3 -I/usr/local/include -c mx/BeeBase/mxBeeBase/btr.c -o build/temp.linux-i686-2.3/mx/BeeBase/mxBeeBase/mxBeeBa se/mx/BeeBase/mxBeeBase/btr.o mx/BeeBase/mxBeeBase/btr.c: In function `dumpBuf': mx/BeeBase/mxBeeBase/btr.c:249: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:250: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:255: warning: unsigned int format, long unsigned int arg (arg 4) mx/BeeBase/mxBeeBase/btr.c:256: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c: In function `_validateTree': mx/BeeBase/mxBeeBase/btr.c:330: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:337: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:339: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:349: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:351: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 3) creating build/lib.linux-i686-2.3/mx/BeeBase creating build/lib.linux-i686-2.3/mx/BeeBase/mxBeeBase -------------- Would someone be kind enough to let me know whether these messages were expected, and if not, how I might resolve these? Thanks! DC __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 22:06:33 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 8 12:04:01 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> References: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Message-ID: <4277CBB9.8020302@egenix.com> Dianne Chen wrote: > Hi all- > > I am trying to build the mx-base package, v.2.0.6. > This will be used with postgresql 7.3.9, psycopg > 1.1.18, and Roundup 0.8.2. > > RHEL 3.0 > Python 2.3 > egenix-mx-base-2.0.6.tar.gz > > I performed a: > > /usr/local/bin/python2.3 setup.py install > > Everything looks proper with the exeception of this > series of warning statements: > > ----------------- > ... > -------------- > > Would someone be kind enough to let me know whether > these messages were expected, and if not, how I might > resolve these? These warning can safely be ignored. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 13:41:14 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Wed Feb 8 12:04:01 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: 6667 Message-ID: <20050503194114.72091.qmail@web31414.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Dianne Chen wrote: > > Hi all- > > > > I am trying to build the mx-base package, v.2.0.6. > > This will be used with postgresql 7.3.9, psycopg > > 1.1.18, and Roundup 0.8.2. > > > > RHEL 3.0 > > Python 2.3 > > egenix-mx-base-2.0.6.tar.gz > > > > I performed a: > > > > /usr/local/bin/python2.3 setup.py install > > > > Everything looks proper with the exeception of > this > > series of warning statements: > > > > ----------------- > > ... > > -------------- > > > > Would someone be kind enough to let me know > whether > > these messages were expected, and if not, how I > might > > resolve these? > > These warning can safely be ignored. > > -- > Marc-Andre Lemburg > eGenix.com > Marc- Thank you very much for the reply. It helps greatly. With kind regards, DC __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From davidrushby at yahoo.com Tue May 3 17:18:46 2005 From: davidrushby at yahoo.com (David Rushby) Date: Wed Feb 8 12:04:01 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050503231846.35012.qmail@web30009.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > I'm not sure whether your analysis of the problem is correct... Indeed, my original analysis wasn't correct; I think this one is. The fatal error I'm complaining about only arises if the arguments to DateTime.DateTime are invalid, so that the object is deallocated in the onError block of mxDateTime_FromDateAndTime. If the object is created successfully, and later deallocated by Python's garbage collector, the fatal error doesn't arise. Here's my analysis of the problem: --- If the debugging directive Py_TRACE_REFS is enabled, as it is in my case, the Python interpreter maintains a doubly linked list of all Python objects (named refchain) via the _ob_next and _ob_prev pointers added to PyObject via _PyObject_HEAD_EXTRA. Each object is inserted into refchain by the _Py_AddToAllObjects call in _Py_NewReference, and removed from refchain by the _Py_ForgetReference call in _Py_Dealloc. _Py_ForgetReference performs an integrity check on the object being deallocated (op) to make sure that its neighbors in refchain recognize it. Specifically, _Py_ForgetReference verifies that the _ob_next pointer of the previous object in refchain (op->_ob_prev->_ob_next) points to op, and that the _ob_prev pointer of the next object in refchain (op->_ob_next->_ob_prev) points to op. If either of those conditions is false, the interpreter raises the fatal error I'm seeing. After mxDateTime_New pulls an mxDateTimeObject out of the free list, it calls _Py_NewReference on that object to transform it from a "conceptually deallocated" object to a "conceptually allocated" one. _Py_NewReference inserts the object into refchain. Later, when the object is being "conceptually deallocated", it should be removed from refchain with _Py_ForgetReference. The version of _Py_Dealloc that's active when Py_TRACE_REFS is enabled does this (_Py_Dealloc is the element of Py_DECREF that performs the actual destruction). _Py_Dealloc first calls _Py_ForgetReference to remove the object from refchain, then calls the object's destructor (op->ob_type->tp_dealloc). If WANT_SUBCLASSABLE_TYPES is not defined (it is not in my case), the destructor for mxDateTime_Type is mxDateTime_Free. So, if a DateTime object is deallocated normally, as a result of its reference count falling to zero, _Py_Dealloc is called on the object, which first removes it from refchain, then passes it to mxDateTime_Free. If a DateTime object is destroyed prematurely, as a result of invalid arguments to its destructor, the onError handler calls mxDateTime_Free, so the object is "conceptually deallocated" (placed in the free list), *but* the object is not removed from refchain. So if a refchain-membership-integrity-check is performed on the object in question or one of its immediate neighbors in refchain, that integrity check fails, leading to the fatal error. --- The solution is to 'Py_DECREF(...)' the object in the onError handler of its constructor, instead of passing the object directly to mxDateTime_Free. That change solves two problems: 1) It causes _Py_Dealloc to execute, which in turn executes _Py_ForgetReference, so the object is removed from refchain, as it should be. 2) At present, objects that are created successfully and later deallocated by normal reference count mechanics have a reference count of 0 when they enter the free list, whereas objects whose constructors abort their creation due to invalid arguments have a reference count of 1 when they enter the free list. Although AFAIK this doesn't cause an actual execution problem (because the object's reference count is *explicitly set to 1* rather than *incremented by 1* when the object is later "conceptually allocated" by _Py_NewReference), it is likely to confuse future maintainers and thereby lead to the introduction of an actual execution problem. I assume that if you agree that this is a reasonable solution, you'll want to apply the change not only to mxDateTime_FromDateAndTime, but to all similar constructors in mxDateTime.c. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From rj at maxxian.com Thu May 5 01:57:40 2005 From: rj at maxxian.com (RJ Juneau) Date: Wed Feb 8 12:04:01 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c5512e$f72798c0$6505a8c0@rjlaptop> I'm on the 30 day evaluation for mxodbc_zope_da. I'm getting the following error when I submit some queries: Error Type: KeyError Error Value: 'query' I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 with UCS4. The error seems to be caused by multiple rows being returned. I did see an earlier posting with the same error message. The response suggested a template error, but this is clearly not the case here. The additional evidence I've gathered so far: - I'm running the test directly from the ZSQL method, so there's no template involved. - If I use the same query with an additional "where" clause to ensure that only one row is returned, it works - If I use a value in the 'where' clause with no rows returned, it works - The same ZSQL query is being used on a Windows machine running Zope and the free ZODBC module without a problem - The query has been verified directly in mysql-client-browser Other info: - The database is MySQL 4.1.10A-0 - iODBC is the DB driver RJ Juneau -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050505/68d278bf/attachment-0106.htm From mal at egenix.com Thu May 5 12:37:43 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 8 12:04:01 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c5512e$f72798c0$6505a8c0@rjlaptop> References: <000301c5512e$f72798c0$6505a8c0@rjlaptop> Message-ID: <4279E967.6010904@egenix.com> RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 > with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 09:37:42 2005 From: rj at maxxian.com (RJ Juneau) Date: Wed Feb 8 12:04:01 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000101c5516f$3b96de90$6505a8c0@rjlaptop> More interesting info on the problem: If I execute the query directly in the "test" window of the base eGenix mxODBC Database Connection window, it works fine and returns the 20 lines expected. That could point to a problem in the rendering, which seems to be where the traceback ends. Note that within the same Zope system I also have an ODBC connection to a Sybase database, and I have successfully tested multi-line ZSQL queries there. This is the traceback: Time 2005/05/05 07:55:15.294 GMT-4 Exception Type KeyError Exception Value 'query' Traceback (innermost last): Module ZPublisher.Publish, line 101, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 39, in call_object Module Shared.DC.ZRDB.DA, line 337, in manage_test Module DocumentTemplate.DT_String, line 474, in __call__ Module DocumentTemplate.DT_In, line 602, in renderwb Module DocumentTemplate.DT_Var, line 219, in render KeyError: 'query' I don't think the following is an issue, but I'll include it for completeness.I am also getting the following iODBC warnings and errors in the Zope console log, which are related to the ODBC parameters being passed by iODBC. Note that these errors also appear for all of the successful queries. [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (Setup). [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (UsageCount). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Timeout). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Reuse). As for the ZSQL snippet from the template... Since there's no template involved yet (I'm still testing directly from the ZSQL method), I assume you mean the SQL code? select h.host_name, s.system_name, s.system_handle, count(*) from terminal t, system_map s, host h where t.system_index = s.system_index and s.host_index = h.host_index group by s.system_name order by h.host_name Nothing complicated here. There are no parameters passed to the query. RJ -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: May 5, 2005 5:38 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: Re: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is > 2.3.4 with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ---------------------------------------------------------------------- > -- > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 16:00:32 2005 From: charlie at egenix.com (Charlie Clark) Date: Wed Feb 8 12:04:01 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000101c5516f$3b96de90$6505a8c0@rjlaptop> References: <000101c5516f$3b96de90$6505a8c0@rjlaptop> Message-ID: <20050505150032.644.1@bepc.1115296715.fake> On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base eGenix > mxODBC Database Connection window, it works fine and returns the 20 > lines expected. That could point to a problem in the rendering, which > seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection to > a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 10:22:17 2005 From: rj at maxxian.com (RJ Juneau) Date: Wed Feb 8 12:04:01 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505150032.644.1@bepc.1115296715.fake> Message-ID: <000201c55175$75bcad10$6505a8c0@rjlaptop> At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 11:47:14 2005 From: rj at maxxian.com (RJ Juneau) Date: Wed Feb 8 12:04:01 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c55181$549be0e0$6505a8c0@rjlaptop> Charlie, I found a fix. Here it is in case anyone else runs into this. You were correct - the problem is in another part of Zope. Based on your feedback, I did a bit more searching and found something here: http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. html The problem appears to be in Zope versions after 2.7.0. I'm running 2.7.6, and the post indicates that it also happens in 2.7.4. The solution: Edit file /lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. There are two lines in the file that start with . Edit them as follows: Change first line to: Change second line to: Just to be after, I shut down Zope before I made the changes and restarted it after. Thanks for the help! RJ -----Original Message----- From: RJ Juneau [mailto:rj@maxxian.com] Sent: May 5, 2005 9:22 AM To: 'Charlie Clark' Cc: 'egenix-users@lists.egenix.com' Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 17:57:25 2005 From: charlie at egenix.com (Charlie Clark) Date: Wed Feb 8 12:04:01 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <20050505165725.3380.2@bepc.1115296715.fake> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Thu May 5 09:15:21 2005 From: charlie at egenix.com (Charlie Clark) Date: Wed Feb 8 12:04:01 2006 Subject: [Zope-DB] RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <000001c55185$41477730$6b00a8c0@fonacier.local> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________ Zope-DB mailing list Zope-DB@zope.org http://mail.zope.org/mailman/listinfo/zope-db From rj at maxxian.com Thu May 5 12:38:00 2005 From: rj at maxxian.com (RJ Juneau) Date: Wed Feb 8 12:04:01 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000001c55188$6b841eb0$6505a8c0@rjlaptop> I just double-checked. Zope-2.7.6-final. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 12:49:16 2005 From: rj at maxxian.com (RJ Juneau) Date: Wed Feb 8 12:04:02 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000501c55189$fe149ba0$6505a8c0@rjlaptop> Charlie, The fix has only been applied for 2.7.7, 2.8b2. The info is in the original bug report which is closed and can be found here: http://www.zope.org/Collectors/Zope/1745 RJ -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Fri May 6 11:50:09 2005 From: rj at maxxian.com (RJ Juneau) Date: Wed Feb 8 12:04:02 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC Message-ID: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Still on eval for the product. I cannot get a stable connection to Sybase via the iODBC drivers. - The Sybase ODBC connection - including a query - have been verified at the iODBC level. - The setup is already working well for ODBC connection to MySQL. Symptoms include: - If I click on "Open Connection", it still comes back with "Connection Closed" when I go to a ZSQL method - Using 'Connect on Demand' is not working either. - Clicking "Open Connection" gives me the following error: Connection string: DSN=lixbox_sybase; UID=sa; PWD=XXXXXXX Connection pool entry: 0 Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection rejected by data source', 7952) The odbc.ini definition for DSN "lixbox_sybase" is as follows: [lixbox_sybase] JetFix = No NoRowSetSizeLimit = No Description = Test connection to listbox Options = LIXBOX DSQUERY = SQLSERVER TDSHOST = lixbox TDSPORT = 5000 TDSVER = 5.0 SQLSERVER_CATALOG = N CURSOR_SENSITIVITY = LOW UserName = sa Password = XXXXXXXX ServerType = Sybase 10/11/12 Driver = /opt/openlink/lib/sql_mt_lt.so Database = pubs2 ReadOnly = no NoAutoCommit = No NoLoginBox = No FetchBufferSize = 60 Other relevant data: - Connecting via OpenLink's iODBC - Zope 2.7.6-final - Python 2.3.4 - Connection to Sybase has been successfully tested with iODBC, including issuing a query - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC connection RJ Juneau Chief Technology Officer Maxxian Integration Inc. 155 Westhampton Drive Thornhill, Ontario Canada L4J 7X2 E-mail: rj@maxxian.com Phone: +1 905 482 9429 Cell: +1 416 897 6682 Toll free: +1 866 758 9161 Fax: +1 647 722 2038 -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050506/aef33361/attachment-0106.htm From mal at egenix.com Fri May 6 18:27:37 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 8 12:04:02 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC In-Reply-To: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> References: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Message-ID: <427B8CE9.1010601@egenix.com> RJ Juneau wrote: > Still on eval for the product. > > I cannot get a stable connection to Sybase via the iODBC drivers. > > - The Sybase ODBC connection - including a query - have been verified at > the iODBC level. > - The setup is already working well for ODBC connection to MySQL. > > Symptoms include: > > - If I click on "Open Connection", it still comes back with "Connection > Closed" when I go to a ZSQL method > - Using 'Connect on Demand' is not working either. > - Clicking "Open Connection" gives me the following error: > > Connection string: DSN=lixbox_sybase; > UID=sa; > PWD=XXXXXXX Try writing the connection string on one line and without whitespace. ODBC drivers sometimes have problems with this. > Connection pool entry: 0 > Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection > rejected by data source', 7952) This is a generic error that relates to authentication or firewall problems. It is possible that turning on ODBC tracing the ODBC manager will give more clues as to the real cause of the problem. > The odbc.ini definition for DSN "lixbox_sybase" is as follows: > > [lixbox_sybase] > JetFix = No > NoRowSetSizeLimit = No > Description = Test connection to listbox > Options = LIXBOX > DSQUERY = SQLSERVER > TDSHOST = lixbox > TDSPORT = 5000 > TDSVER = 5.0 > SQLSERVER_CATALOG = N > CURSOR_SENSITIVITY = LOW > UserName = sa > Password = XXXXXXXX > ServerType = Sybase 10/11/12 > Driver = /opt/openlink/lib/sql_mt_lt.so > Database = pubs2 > ReadOnly = no > NoAutoCommit = No > NoLoginBox = No > FetchBufferSize = 60 > > > Other relevant data: > - Connecting via OpenLink's iODBC > - Zope 2.7.6-final > - Python 2.3.4 > - Connection to Sybase has been successfully tested with iODBC, > including issuing a query > - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC > connection > > > > RJ Juneau > Chief Technology Officer > Maxxian Integration Inc. > 155 Westhampton Drive > Thornhill, Ontario > Canada L4J 7X2 > E-mail: rj@maxxian.com > Phone: +1 905 482 9429 > Cell: +1 416 897 6682 > Toll free: +1 866 758 9161 > Fax: +1 647 722 2038 > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 06 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From calisp at gmail.com Sun May 15 23:49:03 2005 From: calisp at gmail.com (calisp@gmail.com) Date: Wed Feb 8 12:04:02 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK Message-ID: Hi, I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the following error... 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the last phase of a two-phase commit. This shouldn't happen. Traceback (most recent call last): File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one jar.tpc_finish(self) File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish try: self._finish() File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could not perform COMMIT or ROLLBACK', 1023) What could be causing this? Can I get the mxODBCZopeDA source from somewhere? It would make debugging this much easier. Thanks, Calisp. From mal at egenix.com Mon May 16 13:52:12 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 8 12:04:02 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK In-Reply-To: References: Message-ID: <42887B5C.4010109@egenix.com> calisp@gmail.com wrote: > Hi, > > I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with > unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the > following error... > > 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the > last phase of a two-phase commit. This shouldn't happen. > Traceback (most recent call last): > File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one > jar.tpc_finish(self) > File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish > try: self._finish() > File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish > File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler > ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could > not perform COMMIT or ROLLBACK', 1023) You should have a look at the database logs to see what prevented the commit from being completed. > What could be causing this? Hard to say: mxODBCZopeDA is trying to commit the transaction, but the driver or database failed to complete the request. The above error was generated by the ODBC driver. This could be network or DNS problems, or be related to a bug in FreeTDS (which is getting more stable with every new release, but should still be considered beta quality software at the moment). > Can I get the mxODBCZopeDA source from > somewhere? It would make debugging this much easier. Getting the source is not an option and won't help much either since the source of the problem is not mxODBCZopeDA. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 16 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Sun May 1 21:29:25 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 8 16:01:32 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <427259F3.4090806@egenix.com> References: <20050427130906.52878.qmail@web30008.mail.mud.yahoo.com> <427259F3.4090806@egenix.com> Message-ID: <42752005.7080904@egenix.com> M.-A. Lemburg wrote: > David Rushby wrote: > >> --- "M.-A. Lemburg" wrote: >> >>> Are you using the standard mxDateTime build or one >>> with WANT_SUBCLASSABLE_TYPES defined... >> >> >> >> Presumably "the standard", since I just built with 'py24d setup.py >> build', making no attempt to enable special directives. >> >> >>> ... (mxDateTime_Deallocate is only used by the latter)? >> >> >> >> That's true in 2.1.0-2005-04-15, but not in 2.1.0b5. >> >> >>> In any case, please try our latest snapshot: >>> >>> >> >> http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-04-15.zip >> >>> to see if that makes any difference. >> >> >> >> I can't build it out of the box: > > > Hmm, looks like distutils' sdist command doesn't like our new > repository layout which uses symlinks (after we've switched to > subversion). > > We'll have to debug distutils first, I guess :-( Ok, we've found the problem and fixed it. Here's the new release (which does build out of the box at least on our boxes ;-): http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 01 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From davidrushby at yahoo.com Mon May 2 15:49:53 2005 From: davidrushby at yahoo.com (David Rushby) Date: Wed Feb 8 16:01:32 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Ok, we've found the problem and fixed it. Here's the new > release (which does build out of the box at least on our > boxes ;-): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip It does build now, but: py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" still behaves as it did when I submitted my original message: Fatal Python error: UNREF invalid object Aborted This is the same debug build of Python 2.4.1 that I was previously using, running the same configuration (CentOS Linux 4.0/i386, everything compiled with GCC 3.4.3). Have you examined my original claim as to the cause of the bug? __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 10:21:55 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 8 16:01:32 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> References: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> Message-ID: <42772693.8050306@egenix.com> David Rushby wrote: > --- "M.-A. Lemburg" wrote: > >>Ok, we've found the problem and fixed it. Here's the new >>release (which does build out of the box at least on our >>boxes ;-): >> >> > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip > > It does build now, but: > py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" > still behaves as it did when I submitted my original message: > Fatal Python error: UNREF invalid object > Aborted > > This is the same debug build of Python 2.4.1 that I was previously > using, running the same configuration (CentOS Linux 4.0/i386, > everything compiled with GCC 3.4.3). > > Have you examined my original claim as to the cause of the bug? No. We haven't had time for looking into it. I'm not sure whether your analysis of the problem is correct: if you don't define WANT_SUBCLASSABLE_TYPES, the API mxDateTime_Deallocate() is neither defined nor used. Furthermore, PyObject_Del() is only called by mxDateTime_Free() if you have explicitely edited mxDateTime.c to disabled the free list #defines. In a standard build, PyObject_Del() is only called at module finalization time. Note that the reason we call mxDateTime_Free() in the constructor is that we don't want the destructor of the object to be called. Py_DECREF() would call the destructor (mxDateTime_Deallocate). It is possible that the debug code in Python complains about the refcount in the object not being 0 at the time the object is finalized (module finalization time), but I don't see any such checks in PyObject_Free() (which is what PyObject_Del() maps to). Again, all of this does not happen in regular non-debug Python builds. Please be aware that we don't support debug builds, so fixing the problem (if there is one - gcc has some serious optimization problems on some combinations of platform and version) will take a while. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 09:27:37 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Wed Feb 8 16:01:32 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 Message-ID: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Hi all- I am trying to build the mx-base package, v.2.0.6. This will be used with postgresql 7.3.9, psycopg 1.1.18, and Roundup 0.8.2. RHEL 3.0 Python 2.3 egenix-mx-base-2.0.6.tar.gz I performed a: /usr/local/bin/python2.3 setup.py install Everything looks proper with the exeception of this series of warning statements: ----------------- gcc -pthread -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fno-strict-aliasing -fPIC -Imx/BeeBase/mxBeeBase -I/usr/local/incl ude/python2.3 -I/usr/local/include -c mx/BeeBase/mxBeeBase/btr.c -o build/temp.linux-i686-2.3/mx/BeeBase/mxBeeBase/mxBeeBa se/mx/BeeBase/mxBeeBase/btr.o mx/BeeBase/mxBeeBase/btr.c: In function `dumpBuf': mx/BeeBase/mxBeeBase/btr.c:249: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:250: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:255: warning: unsigned int format, long unsigned int arg (arg 4) mx/BeeBase/mxBeeBase/btr.c:256: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c: In function `_validateTree': mx/BeeBase/mxBeeBase/btr.c:330: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:337: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:339: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:349: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:351: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 3) creating build/lib.linux-i686-2.3/mx/BeeBase creating build/lib.linux-i686-2.3/mx/BeeBase/mxBeeBase -------------- Would someone be kind enough to let me know whether these messages were expected, and if not, how I might resolve these? Thanks! DC __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 22:06:33 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 8 16:01:32 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> References: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Message-ID: <4277CBB9.8020302@egenix.com> Dianne Chen wrote: > Hi all- > > I am trying to build the mx-base package, v.2.0.6. > This will be used with postgresql 7.3.9, psycopg > 1.1.18, and Roundup 0.8.2. > > RHEL 3.0 > Python 2.3 > egenix-mx-base-2.0.6.tar.gz > > I performed a: > > /usr/local/bin/python2.3 setup.py install > > Everything looks proper with the exeception of this > series of warning statements: > > ----------------- > ... > -------------- > > Would someone be kind enough to let me know whether > these messages were expected, and if not, how I might > resolve these? These warning can safely be ignored. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 13:41:14 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Wed Feb 8 16:01:32 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: 6667 Message-ID: <20050503194114.72091.qmail@web31414.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Dianne Chen wrote: > > Hi all- > > > > I am trying to build the mx-base package, v.2.0.6. > > This will be used with postgresql 7.3.9, psycopg > > 1.1.18, and Roundup 0.8.2. > > > > RHEL 3.0 > > Python 2.3 > > egenix-mx-base-2.0.6.tar.gz > > > > I performed a: > > > > /usr/local/bin/python2.3 setup.py install > > > > Everything looks proper with the exeception of > this > > series of warning statements: > > > > ----------------- > > ... > > -------------- > > > > Would someone be kind enough to let me know > whether > > these messages were expected, and if not, how I > might > > resolve these? > > These warning can safely be ignored. > > -- > Marc-Andre Lemburg > eGenix.com > Marc- Thank you very much for the reply. It helps greatly. With kind regards, DC __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From davidrushby at yahoo.com Tue May 3 17:18:46 2005 From: davidrushby at yahoo.com (David Rushby) Date: Wed Feb 8 16:01:32 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050503231846.35012.qmail@web30009.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > I'm not sure whether your analysis of the problem is correct... Indeed, my original analysis wasn't correct; I think this one is. The fatal error I'm complaining about only arises if the arguments to DateTime.DateTime are invalid, so that the object is deallocated in the onError block of mxDateTime_FromDateAndTime. If the object is created successfully, and later deallocated by Python's garbage collector, the fatal error doesn't arise. Here's my analysis of the problem: --- If the debugging directive Py_TRACE_REFS is enabled, as it is in my case, the Python interpreter maintains a doubly linked list of all Python objects (named refchain) via the _ob_next and _ob_prev pointers added to PyObject via _PyObject_HEAD_EXTRA. Each object is inserted into refchain by the _Py_AddToAllObjects call in _Py_NewReference, and removed from refchain by the _Py_ForgetReference call in _Py_Dealloc. _Py_ForgetReference performs an integrity check on the object being deallocated (op) to make sure that its neighbors in refchain recognize it. Specifically, _Py_ForgetReference verifies that the _ob_next pointer of the previous object in refchain (op->_ob_prev->_ob_next) points to op, and that the _ob_prev pointer of the next object in refchain (op->_ob_next->_ob_prev) points to op. If either of those conditions is false, the interpreter raises the fatal error I'm seeing. After mxDateTime_New pulls an mxDateTimeObject out of the free list, it calls _Py_NewReference on that object to transform it from a "conceptually deallocated" object to a "conceptually allocated" one. _Py_NewReference inserts the object into refchain. Later, when the object is being "conceptually deallocated", it should be removed from refchain with _Py_ForgetReference. The version of _Py_Dealloc that's active when Py_TRACE_REFS is enabled does this (_Py_Dealloc is the element of Py_DECREF that performs the actual destruction). _Py_Dealloc first calls _Py_ForgetReference to remove the object from refchain, then calls the object's destructor (op->ob_type->tp_dealloc). If WANT_SUBCLASSABLE_TYPES is not defined (it is not in my case), the destructor for mxDateTime_Type is mxDateTime_Free. So, if a DateTime object is deallocated normally, as a result of its reference count falling to zero, _Py_Dealloc is called on the object, which first removes it from refchain, then passes it to mxDateTime_Free. If a DateTime object is destroyed prematurely, as a result of invalid arguments to its destructor, the onError handler calls mxDateTime_Free, so the object is "conceptually deallocated" (placed in the free list), *but* the object is not removed from refchain. So if a refchain-membership-integrity-check is performed on the object in question or one of its immediate neighbors in refchain, that integrity check fails, leading to the fatal error. --- The solution is to 'Py_DECREF(...)' the object in the onError handler of its constructor, instead of passing the object directly to mxDateTime_Free. That change solves two problems: 1) It causes _Py_Dealloc to execute, which in turn executes _Py_ForgetReference, so the object is removed from refchain, as it should be. 2) At present, objects that are created successfully and later deallocated by normal reference count mechanics have a reference count of 0 when they enter the free list, whereas objects whose constructors abort their creation due to invalid arguments have a reference count of 1 when they enter the free list. Although AFAIK this doesn't cause an actual execution problem (because the object's reference count is *explicitly set to 1* rather than *incremented by 1* when the object is later "conceptually allocated" by _Py_NewReference), it is likely to confuse future maintainers and thereby lead to the introduction of an actual execution problem. I assume that if you agree that this is a reasonable solution, you'll want to apply the change not only to mxDateTime_FromDateAndTime, but to all similar constructors in mxDateTime.c. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From rj at maxxian.com Thu May 5 01:57:40 2005 From: rj at maxxian.com (RJ Juneau) Date: Wed Feb 8 16:01:33 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c5512e$f72798c0$6505a8c0@rjlaptop> I'm on the 30 day evaluation for mxodbc_zope_da. I'm getting the following error when I submit some queries: Error Type: KeyError Error Value: 'query' I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 with UCS4. The error seems to be caused by multiple rows being returned. I did see an earlier posting with the same error message. The response suggested a template error, but this is clearly not the case here. The additional evidence I've gathered so far: - I'm running the test directly from the ZSQL method, so there's no template involved. - If I use the same query with an additional "where" clause to ensure that only one row is returned, it works - If I use a value in the 'where' clause with no rows returned, it works - The same ZSQL query is being used on a Windows machine running Zope and the free ZODBC module without a problem - The query has been verified directly in mysql-client-browser Other info: - The database is MySQL 4.1.10A-0 - iODBC is the DB driver RJ Juneau -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050505/68d278bf/attachment-0107.htm From mal at egenix.com Thu May 5 12:37:43 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 8 16:01:33 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c5512e$f72798c0$6505a8c0@rjlaptop> References: <000301c5512e$f72798c0$6505a8c0@rjlaptop> Message-ID: <4279E967.6010904@egenix.com> RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 > with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 09:37:42 2005 From: rj at maxxian.com (RJ Juneau) Date: Wed Feb 8 16:01:33 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000101c5516f$3b96de90$6505a8c0@rjlaptop> More interesting info on the problem: If I execute the query directly in the "test" window of the base eGenix mxODBC Database Connection window, it works fine and returns the 20 lines expected. That could point to a problem in the rendering, which seems to be where the traceback ends. Note that within the same Zope system I also have an ODBC connection to a Sybase database, and I have successfully tested multi-line ZSQL queries there. This is the traceback: Time 2005/05/05 07:55:15.294 GMT-4 Exception Type KeyError Exception Value 'query' Traceback (innermost last): Module ZPublisher.Publish, line 101, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 39, in call_object Module Shared.DC.ZRDB.DA, line 337, in manage_test Module DocumentTemplate.DT_String, line 474, in __call__ Module DocumentTemplate.DT_In, line 602, in renderwb Module DocumentTemplate.DT_Var, line 219, in render KeyError: 'query' I don't think the following is an issue, but I'll include it for completeness.I am also getting the following iODBC warnings and errors in the Zope console log, which are related to the ODBC parameters being passed by iODBC. Note that these errors also appear for all of the successful queries. [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (Setup). [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (UsageCount). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Timeout). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Reuse). As for the ZSQL snippet from the template... Since there's no template involved yet (I'm still testing directly from the ZSQL method), I assume you mean the SQL code? select h.host_name, s.system_name, s.system_handle, count(*) from terminal t, system_map s, host h where t.system_index = s.system_index and s.host_index = h.host_index group by s.system_name order by h.host_name Nothing complicated here. There are no parameters passed to the query. RJ -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: May 5, 2005 5:38 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: Re: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is > 2.3.4 with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ---------------------------------------------------------------------- > -- > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 16:00:32 2005 From: charlie at egenix.com (Charlie Clark) Date: Wed Feb 8 16:01:33 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000101c5516f$3b96de90$6505a8c0@rjlaptop> References: <000101c5516f$3b96de90$6505a8c0@rjlaptop> Message-ID: <20050505150032.644.1@bepc.1115296715.fake> On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base eGenix > mxODBC Database Connection window, it works fine and returns the 20 > lines expected. That could point to a problem in the rendering, which > seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection to > a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 10:22:17 2005 From: rj at maxxian.com (RJ Juneau) Date: Wed Feb 8 16:01:33 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505150032.644.1@bepc.1115296715.fake> Message-ID: <000201c55175$75bcad10$6505a8c0@rjlaptop> At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 11:47:14 2005 From: rj at maxxian.com (RJ Juneau) Date: Wed Feb 8 16:01:33 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c55181$549be0e0$6505a8c0@rjlaptop> Charlie, I found a fix. Here it is in case anyone else runs into this. You were correct - the problem is in another part of Zope. Based on your feedback, I did a bit more searching and found something here: http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. html The problem appears to be in Zope versions after 2.7.0. I'm running 2.7.6, and the post indicates that it also happens in 2.7.4. The solution: Edit file /lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. There are two lines in the file that start with . Edit them as follows: Change first line to: Change second line to: Just to be after, I shut down Zope before I made the changes and restarted it after. Thanks for the help! RJ -----Original Message----- From: RJ Juneau [mailto:rj@maxxian.com] Sent: May 5, 2005 9:22 AM To: 'Charlie Clark' Cc: 'egenix-users@lists.egenix.com' Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 17:57:25 2005 From: charlie at egenix.com (Charlie Clark) Date: Wed Feb 8 16:01:33 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <20050505165725.3380.2@bepc.1115296715.fake> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Thu May 5 09:15:21 2005 From: charlie at egenix.com (Charlie Clark) Date: Wed Feb 8 16:01:33 2006 Subject: [Zope-DB] RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <000001c55185$41477730$6b00a8c0@fonacier.local> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________ Zope-DB mailing list Zope-DB@zope.org http://mail.zope.org/mailman/listinfo/zope-db From rj at maxxian.com Thu May 5 12:38:00 2005 From: rj at maxxian.com (RJ Juneau) Date: Wed Feb 8 16:01:33 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000001c55188$6b841eb0$6505a8c0@rjlaptop> I just double-checked. Zope-2.7.6-final. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 12:49:16 2005 From: rj at maxxian.com (RJ Juneau) Date: Wed Feb 8 16:01:33 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000501c55189$fe149ba0$6505a8c0@rjlaptop> Charlie, The fix has only been applied for 2.7.7, 2.8b2. The info is in the original bug report which is closed and can be found here: http://www.zope.org/Collectors/Zope/1745 RJ -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Fri May 6 11:50:09 2005 From: rj at maxxian.com (RJ Juneau) Date: Wed Feb 8 16:01:33 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC Message-ID: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Still on eval for the product. I cannot get a stable connection to Sybase via the iODBC drivers. - The Sybase ODBC connection - including a query - have been verified at the iODBC level. - The setup is already working well for ODBC connection to MySQL. Symptoms include: - If I click on "Open Connection", it still comes back with "Connection Closed" when I go to a ZSQL method - Using 'Connect on Demand' is not working either. - Clicking "Open Connection" gives me the following error: Connection string: DSN=lixbox_sybase; UID=sa; PWD=XXXXXXX Connection pool entry: 0 Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection rejected by data source', 7952) The odbc.ini definition for DSN "lixbox_sybase" is as follows: [lixbox_sybase] JetFix = No NoRowSetSizeLimit = No Description = Test connection to listbox Options = LIXBOX DSQUERY = SQLSERVER TDSHOST = lixbox TDSPORT = 5000 TDSVER = 5.0 SQLSERVER_CATALOG = N CURSOR_SENSITIVITY = LOW UserName = sa Password = XXXXXXXX ServerType = Sybase 10/11/12 Driver = /opt/openlink/lib/sql_mt_lt.so Database = pubs2 ReadOnly = no NoAutoCommit = No NoLoginBox = No FetchBufferSize = 60 Other relevant data: - Connecting via OpenLink's iODBC - Zope 2.7.6-final - Python 2.3.4 - Connection to Sybase has been successfully tested with iODBC, including issuing a query - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC connection RJ Juneau Chief Technology Officer Maxxian Integration Inc. 155 Westhampton Drive Thornhill, Ontario Canada L4J 7X2 E-mail: rj@maxxian.com Phone: +1 905 482 9429 Cell: +1 416 897 6682 Toll free: +1 866 758 9161 Fax: +1 647 722 2038 -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050506/aef33361/attachment-0107.htm From mal at egenix.com Fri May 6 18:27:37 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 8 16:01:33 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC In-Reply-To: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> References: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Message-ID: <427B8CE9.1010601@egenix.com> RJ Juneau wrote: > Still on eval for the product. > > I cannot get a stable connection to Sybase via the iODBC drivers. > > - The Sybase ODBC connection - including a query - have been verified at > the iODBC level. > - The setup is already working well for ODBC connection to MySQL. > > Symptoms include: > > - If I click on "Open Connection", it still comes back with "Connection > Closed" when I go to a ZSQL method > - Using 'Connect on Demand' is not working either. > - Clicking "Open Connection" gives me the following error: > > Connection string: DSN=lixbox_sybase; > UID=sa; > PWD=XXXXXXX Try writing the connection string on one line and without whitespace. ODBC drivers sometimes have problems with this. > Connection pool entry: 0 > Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection > rejected by data source', 7952) This is a generic error that relates to authentication or firewall problems. It is possible that turning on ODBC tracing the ODBC manager will give more clues as to the real cause of the problem. > The odbc.ini definition for DSN "lixbox_sybase" is as follows: > > [lixbox_sybase] > JetFix = No > NoRowSetSizeLimit = No > Description = Test connection to listbox > Options = LIXBOX > DSQUERY = SQLSERVER > TDSHOST = lixbox > TDSPORT = 5000 > TDSVER = 5.0 > SQLSERVER_CATALOG = N > CURSOR_SENSITIVITY = LOW > UserName = sa > Password = XXXXXXXX > ServerType = Sybase 10/11/12 > Driver = /opt/openlink/lib/sql_mt_lt.so > Database = pubs2 > ReadOnly = no > NoAutoCommit = No > NoLoginBox = No > FetchBufferSize = 60 > > > Other relevant data: > - Connecting via OpenLink's iODBC > - Zope 2.7.6-final > - Python 2.3.4 > - Connection to Sybase has been successfully tested with iODBC, > including issuing a query > - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC > connection > > > > RJ Juneau > Chief Technology Officer > Maxxian Integration Inc. > 155 Westhampton Drive > Thornhill, Ontario > Canada L4J 7X2 > E-mail: rj@maxxian.com > Phone: +1 905 482 9429 > Cell: +1 416 897 6682 > Toll free: +1 866 758 9161 > Fax: +1 647 722 2038 > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 06 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From calisp at gmail.com Sun May 15 23:49:03 2005 From: calisp at gmail.com (calisp@gmail.com) Date: Wed Feb 8 16:01:33 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK Message-ID: Hi, I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the following error... 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the last phase of a two-phase commit. This shouldn't happen. Traceback (most recent call last): File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one jar.tpc_finish(self) File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish try: self._finish() File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could not perform COMMIT or ROLLBACK', 1023) What could be causing this? Can I get the mxODBCZopeDA source from somewhere? It would make debugging this much easier. Thanks, Calisp. From mal at egenix.com Mon May 16 13:52:12 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 8 16:01:33 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK In-Reply-To: References: Message-ID: <42887B5C.4010109@egenix.com> calisp@gmail.com wrote: > Hi, > > I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with > unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the > following error... > > 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the > last phase of a two-phase commit. This shouldn't happen. > Traceback (most recent call last): > File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one > jar.tpc_finish(self) > File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish > try: self._finish() > File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish > File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler > ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could > not perform COMMIT or ROLLBACK', 1023) You should have a look at the database logs to see what prevented the commit from being completed. > What could be causing this? Hard to say: mxODBCZopeDA is trying to commit the transaction, but the driver or database failed to complete the request. The above error was generated by the ODBC driver. This could be network or DNS problems, or be related to a bug in FreeTDS (which is getting more stable with every new release, but should still be considered beta quality software at the moment). > Can I get the mxODBCZopeDA source from > somewhere? It would make debugging this much easier. Getting the source is not an option and won't help much either since the source of the problem is not mxODBCZopeDA. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 16 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Sun May 1 21:29:25 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 8 20:01:19 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <427259F3.4090806@egenix.com> References: <20050427130906.52878.qmail@web30008.mail.mud.yahoo.com> <427259F3.4090806@egenix.com> Message-ID: <42752005.7080904@egenix.com> M.-A. Lemburg wrote: > David Rushby wrote: > >> --- "M.-A. Lemburg" wrote: >> >>> Are you using the standard mxDateTime build or one >>> with WANT_SUBCLASSABLE_TYPES defined... >> >> >> >> Presumably "the standard", since I just built with 'py24d setup.py >> build', making no attempt to enable special directives. >> >> >>> ... (mxDateTime_Deallocate is only used by the latter)? >> >> >> >> That's true in 2.1.0-2005-04-15, but not in 2.1.0b5. >> >> >>> In any case, please try our latest snapshot: >>> >>> >> >> http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-04-15.zip >> >>> to see if that makes any difference. >> >> >> >> I can't build it out of the box: > > > Hmm, looks like distutils' sdist command doesn't like our new > repository layout which uses symlinks (after we've switched to > subversion). > > We'll have to debug distutils first, I guess :-( Ok, we've found the problem and fixed it. Here's the new release (which does build out of the box at least on our boxes ;-): http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 01 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From davidrushby at yahoo.com Mon May 2 15:49:53 2005 From: davidrushby at yahoo.com (David Rushby) Date: Wed Feb 8 20:01:19 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Ok, we've found the problem and fixed it. Here's the new > release (which does build out of the box at least on our > boxes ;-): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip It does build now, but: py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" still behaves as it did when I submitted my original message: Fatal Python error: UNREF invalid object Aborted This is the same debug build of Python 2.4.1 that I was previously using, running the same configuration (CentOS Linux 4.0/i386, everything compiled with GCC 3.4.3). Have you examined my original claim as to the cause of the bug? __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 10:21:55 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 8 20:01:19 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> References: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> Message-ID: <42772693.8050306@egenix.com> David Rushby wrote: > --- "M.-A. Lemburg" wrote: > >>Ok, we've found the problem and fixed it. Here's the new >>release (which does build out of the box at least on our >>boxes ;-): >> >> > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip > > It does build now, but: > py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" > still behaves as it did when I submitted my original message: > Fatal Python error: UNREF invalid object > Aborted > > This is the same debug build of Python 2.4.1 that I was previously > using, running the same configuration (CentOS Linux 4.0/i386, > everything compiled with GCC 3.4.3). > > Have you examined my original claim as to the cause of the bug? No. We haven't had time for looking into it. I'm not sure whether your analysis of the problem is correct: if you don't define WANT_SUBCLASSABLE_TYPES, the API mxDateTime_Deallocate() is neither defined nor used. Furthermore, PyObject_Del() is only called by mxDateTime_Free() if you have explicitely edited mxDateTime.c to disabled the free list #defines. In a standard build, PyObject_Del() is only called at module finalization time. Note that the reason we call mxDateTime_Free() in the constructor is that we don't want the destructor of the object to be called. Py_DECREF() would call the destructor (mxDateTime_Deallocate). It is possible that the debug code in Python complains about the refcount in the object not being 0 at the time the object is finalized (module finalization time), but I don't see any such checks in PyObject_Free() (which is what PyObject_Del() maps to). Again, all of this does not happen in regular non-debug Python builds. Please be aware that we don't support debug builds, so fixing the problem (if there is one - gcc has some serious optimization problems on some combinations of platform and version) will take a while. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 09:27:37 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Wed Feb 8 20:01:19 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 Message-ID: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Hi all- I am trying to build the mx-base package, v.2.0.6. This will be used with postgresql 7.3.9, psycopg 1.1.18, and Roundup 0.8.2. RHEL 3.0 Python 2.3 egenix-mx-base-2.0.6.tar.gz I performed a: /usr/local/bin/python2.3 setup.py install Everything looks proper with the exeception of this series of warning statements: ----------------- gcc -pthread -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fno-strict-aliasing -fPIC -Imx/BeeBase/mxBeeBase -I/usr/local/incl ude/python2.3 -I/usr/local/include -c mx/BeeBase/mxBeeBase/btr.c -o build/temp.linux-i686-2.3/mx/BeeBase/mxBeeBase/mxBeeBa se/mx/BeeBase/mxBeeBase/btr.o mx/BeeBase/mxBeeBase/btr.c: In function `dumpBuf': mx/BeeBase/mxBeeBase/btr.c:249: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:250: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:255: warning: unsigned int format, long unsigned int arg (arg 4) mx/BeeBase/mxBeeBase/btr.c:256: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c: In function `_validateTree': mx/BeeBase/mxBeeBase/btr.c:330: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:337: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:339: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:349: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:351: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 3) creating build/lib.linux-i686-2.3/mx/BeeBase creating build/lib.linux-i686-2.3/mx/BeeBase/mxBeeBase -------------- Would someone be kind enough to let me know whether these messages were expected, and if not, how I might resolve these? Thanks! DC __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 22:06:33 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 8 20:01:19 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> References: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Message-ID: <4277CBB9.8020302@egenix.com> Dianne Chen wrote: > Hi all- > > I am trying to build the mx-base package, v.2.0.6. > This will be used with postgresql 7.3.9, psycopg > 1.1.18, and Roundup 0.8.2. > > RHEL 3.0 > Python 2.3 > egenix-mx-base-2.0.6.tar.gz > > I performed a: > > /usr/local/bin/python2.3 setup.py install > > Everything looks proper with the exeception of this > series of warning statements: > > ----------------- > ... > -------------- > > Would someone be kind enough to let me know whether > these messages were expected, and if not, how I might > resolve these? These warning can safely be ignored. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 13:41:14 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Wed Feb 8 20:01:19 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: 6667 Message-ID: <20050503194114.72091.qmail@web31414.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Dianne Chen wrote: > > Hi all- > > > > I am trying to build the mx-base package, v.2.0.6. > > This will be used with postgresql 7.3.9, psycopg > > 1.1.18, and Roundup 0.8.2. > > > > RHEL 3.0 > > Python 2.3 > > egenix-mx-base-2.0.6.tar.gz > > > > I performed a: > > > > /usr/local/bin/python2.3 setup.py install > > > > Everything looks proper with the exeception of > this > > series of warning statements: > > > > ----------------- > > ... > > -------------- > > > > Would someone be kind enough to let me know > whether > > these messages were expected, and if not, how I > might > > resolve these? > > These warning can safely be ignored. > > -- > Marc-Andre Lemburg > eGenix.com > Marc- Thank you very much for the reply. It helps greatly. With kind regards, DC __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From davidrushby at yahoo.com Tue May 3 17:18:46 2005 From: davidrushby at yahoo.com (David Rushby) Date: Wed Feb 8 20:01:19 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050503231846.35012.qmail@web30009.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > I'm not sure whether your analysis of the problem is correct... Indeed, my original analysis wasn't correct; I think this one is. The fatal error I'm complaining about only arises if the arguments to DateTime.DateTime are invalid, so that the object is deallocated in the onError block of mxDateTime_FromDateAndTime. If the object is created successfully, and later deallocated by Python's garbage collector, the fatal error doesn't arise. Here's my analysis of the problem: --- If the debugging directive Py_TRACE_REFS is enabled, as it is in my case, the Python interpreter maintains a doubly linked list of all Python objects (named refchain) via the _ob_next and _ob_prev pointers added to PyObject via _PyObject_HEAD_EXTRA. Each object is inserted into refchain by the _Py_AddToAllObjects call in _Py_NewReference, and removed from refchain by the _Py_ForgetReference call in _Py_Dealloc. _Py_ForgetReference performs an integrity check on the object being deallocated (op) to make sure that its neighbors in refchain recognize it. Specifically, _Py_ForgetReference verifies that the _ob_next pointer of the previous object in refchain (op->_ob_prev->_ob_next) points to op, and that the _ob_prev pointer of the next object in refchain (op->_ob_next->_ob_prev) points to op. If either of those conditions is false, the interpreter raises the fatal error I'm seeing. After mxDateTime_New pulls an mxDateTimeObject out of the free list, it calls _Py_NewReference on that object to transform it from a "conceptually deallocated" object to a "conceptually allocated" one. _Py_NewReference inserts the object into refchain. Later, when the object is being "conceptually deallocated", it should be removed from refchain with _Py_ForgetReference. The version of _Py_Dealloc that's active when Py_TRACE_REFS is enabled does this (_Py_Dealloc is the element of Py_DECREF that performs the actual destruction). _Py_Dealloc first calls _Py_ForgetReference to remove the object from refchain, then calls the object's destructor (op->ob_type->tp_dealloc). If WANT_SUBCLASSABLE_TYPES is not defined (it is not in my case), the destructor for mxDateTime_Type is mxDateTime_Free. So, if a DateTime object is deallocated normally, as a result of its reference count falling to zero, _Py_Dealloc is called on the object, which first removes it from refchain, then passes it to mxDateTime_Free. If a DateTime object is destroyed prematurely, as a result of invalid arguments to its destructor, the onError handler calls mxDateTime_Free, so the object is "conceptually deallocated" (placed in the free list), *but* the object is not removed from refchain. So if a refchain-membership-integrity-check is performed on the object in question or one of its immediate neighbors in refchain, that integrity check fails, leading to the fatal error. --- The solution is to 'Py_DECREF(...)' the object in the onError handler of its constructor, instead of passing the object directly to mxDateTime_Free. That change solves two problems: 1) It causes _Py_Dealloc to execute, which in turn executes _Py_ForgetReference, so the object is removed from refchain, as it should be. 2) At present, objects that are created successfully and later deallocated by normal reference count mechanics have a reference count of 0 when they enter the free list, whereas objects whose constructors abort their creation due to invalid arguments have a reference count of 1 when they enter the free list. Although AFAIK this doesn't cause an actual execution problem (because the object's reference count is *explicitly set to 1* rather than *incremented by 1* when the object is later "conceptually allocated" by _Py_NewReference), it is likely to confuse future maintainers and thereby lead to the introduction of an actual execution problem. I assume that if you agree that this is a reasonable solution, you'll want to apply the change not only to mxDateTime_FromDateAndTime, but to all similar constructors in mxDateTime.c. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From rj at maxxian.com Thu May 5 01:57:40 2005 From: rj at maxxian.com (RJ Juneau) Date: Wed Feb 8 20:01:19 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c5512e$f72798c0$6505a8c0@rjlaptop> I'm on the 30 day evaluation for mxodbc_zope_da. I'm getting the following error when I submit some queries: Error Type: KeyError Error Value: 'query' I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 with UCS4. The error seems to be caused by multiple rows being returned. I did see an earlier posting with the same error message. The response suggested a template error, but this is clearly not the case here. The additional evidence I've gathered so far: - I'm running the test directly from the ZSQL method, so there's no template involved. - If I use the same query with an additional "where" clause to ensure that only one row is returned, it works - If I use a value in the 'where' clause with no rows returned, it works - The same ZSQL query is being used on a Windows machine running Zope and the free ZODBC module without a problem - The query has been verified directly in mysql-client-browser Other info: - The database is MySQL 4.1.10A-0 - iODBC is the DB driver RJ Juneau -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050505/68d278bf/attachment-0108.htm From mal at egenix.com Thu May 5 12:37:43 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 8 20:01:19 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c5512e$f72798c0$6505a8c0@rjlaptop> References: <000301c5512e$f72798c0$6505a8c0@rjlaptop> Message-ID: <4279E967.6010904@egenix.com> RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 > with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 09:37:42 2005 From: rj at maxxian.com (RJ Juneau) Date: Wed Feb 8 20:01:19 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000101c5516f$3b96de90$6505a8c0@rjlaptop> More interesting info on the problem: If I execute the query directly in the "test" window of the base eGenix mxODBC Database Connection window, it works fine and returns the 20 lines expected. That could point to a problem in the rendering, which seems to be where the traceback ends. Note that within the same Zope system I also have an ODBC connection to a Sybase database, and I have successfully tested multi-line ZSQL queries there. This is the traceback: Time 2005/05/05 07:55:15.294 GMT-4 Exception Type KeyError Exception Value 'query' Traceback (innermost last): Module ZPublisher.Publish, line 101, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 39, in call_object Module Shared.DC.ZRDB.DA, line 337, in manage_test Module DocumentTemplate.DT_String, line 474, in __call__ Module DocumentTemplate.DT_In, line 602, in renderwb Module DocumentTemplate.DT_Var, line 219, in render KeyError: 'query' I don't think the following is an issue, but I'll include it for completeness.I am also getting the following iODBC warnings and errors in the Zope console log, which are related to the ODBC parameters being passed by iODBC. Note that these errors also appear for all of the successful queries. [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (Setup). [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (UsageCount). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Timeout). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Reuse). As for the ZSQL snippet from the template... Since there's no template involved yet (I'm still testing directly from the ZSQL method), I assume you mean the SQL code? select h.host_name, s.system_name, s.system_handle, count(*) from terminal t, system_map s, host h where t.system_index = s.system_index and s.host_index = h.host_index group by s.system_name order by h.host_name Nothing complicated here. There are no parameters passed to the query. RJ -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: May 5, 2005 5:38 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: Re: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is > 2.3.4 with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ---------------------------------------------------------------------- > -- > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 16:00:32 2005 From: charlie at egenix.com (Charlie Clark) Date: Wed Feb 8 20:01:19 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000101c5516f$3b96de90$6505a8c0@rjlaptop> References: <000101c5516f$3b96de90$6505a8c0@rjlaptop> Message-ID: <20050505150032.644.1@bepc.1115296715.fake> On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base eGenix > mxODBC Database Connection window, it works fine and returns the 20 > lines expected. That could point to a problem in the rendering, which > seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection to > a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 10:22:17 2005 From: rj at maxxian.com (RJ Juneau) Date: Wed Feb 8 20:01:19 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505150032.644.1@bepc.1115296715.fake> Message-ID: <000201c55175$75bcad10$6505a8c0@rjlaptop> At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 11:47:14 2005 From: rj at maxxian.com (RJ Juneau) Date: Wed Feb 8 20:01:19 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c55181$549be0e0$6505a8c0@rjlaptop> Charlie, I found a fix. Here it is in case anyone else runs into this. You were correct - the problem is in another part of Zope. Based on your feedback, I did a bit more searching and found something here: http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. html The problem appears to be in Zope versions after 2.7.0. I'm running 2.7.6, and the post indicates that it also happens in 2.7.4. The solution: Edit file /lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. There are two lines in the file that start with . Edit them as follows: Change first line to: Change second line to: Just to be after, I shut down Zope before I made the changes and restarted it after. Thanks for the help! RJ -----Original Message----- From: RJ Juneau [mailto:rj@maxxian.com] Sent: May 5, 2005 9:22 AM To: 'Charlie Clark' Cc: 'egenix-users@lists.egenix.com' Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 17:57:25 2005 From: charlie at egenix.com (Charlie Clark) Date: Wed Feb 8 20:01:20 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <20050505165725.3380.2@bepc.1115296715.fake> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Thu May 5 09:15:21 2005 From: charlie at egenix.com (Charlie Clark) Date: Wed Feb 8 20:01:20 2006 Subject: [Zope-DB] RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <000001c55185$41477730$6b00a8c0@fonacier.local> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________ Zope-DB mailing list Zope-DB@zope.org http://mail.zope.org/mailman/listinfo/zope-db From rj at maxxian.com Thu May 5 12:38:00 2005 From: rj at maxxian.com (RJ Juneau) Date: Wed Feb 8 20:01:20 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000001c55188$6b841eb0$6505a8c0@rjlaptop> I just double-checked. Zope-2.7.6-final. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 12:49:16 2005 From: rj at maxxian.com (RJ Juneau) Date: Wed Feb 8 20:01:20 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000501c55189$fe149ba0$6505a8c0@rjlaptop> Charlie, The fix has only been applied for 2.7.7, 2.8b2. The info is in the original bug report which is closed and can be found here: http://www.zope.org/Collectors/Zope/1745 RJ -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Fri May 6 11:50:09 2005 From: rj at maxxian.com (RJ Juneau) Date: Wed Feb 8 20:01:20 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC Message-ID: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Still on eval for the product. I cannot get a stable connection to Sybase via the iODBC drivers. - The Sybase ODBC connection - including a query - have been verified at the iODBC level. - The setup is already working well for ODBC connection to MySQL. Symptoms include: - If I click on "Open Connection", it still comes back with "Connection Closed" when I go to a ZSQL method - Using 'Connect on Demand' is not working either. - Clicking "Open Connection" gives me the following error: Connection string: DSN=lixbox_sybase; UID=sa; PWD=XXXXXXX Connection pool entry: 0 Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection rejected by data source', 7952) The odbc.ini definition for DSN "lixbox_sybase" is as follows: [lixbox_sybase] JetFix = No NoRowSetSizeLimit = No Description = Test connection to listbox Options = LIXBOX DSQUERY = SQLSERVER TDSHOST = lixbox TDSPORT = 5000 TDSVER = 5.0 SQLSERVER_CATALOG = N CURSOR_SENSITIVITY = LOW UserName = sa Password = XXXXXXXX ServerType = Sybase 10/11/12 Driver = /opt/openlink/lib/sql_mt_lt.so Database = pubs2 ReadOnly = no NoAutoCommit = No NoLoginBox = No FetchBufferSize = 60 Other relevant data: - Connecting via OpenLink's iODBC - Zope 2.7.6-final - Python 2.3.4 - Connection to Sybase has been successfully tested with iODBC, including issuing a query - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC connection RJ Juneau Chief Technology Officer Maxxian Integration Inc. 155 Westhampton Drive Thornhill, Ontario Canada L4J 7X2 E-mail: rj@maxxian.com Phone: +1 905 482 9429 Cell: +1 416 897 6682 Toll free: +1 866 758 9161 Fax: +1 647 722 2038 -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050506/aef33361/attachment-0108.htm From mal at egenix.com Fri May 6 18:27:37 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 8 20:01:20 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC In-Reply-To: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> References: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Message-ID: <427B8CE9.1010601@egenix.com> RJ Juneau wrote: > Still on eval for the product. > > I cannot get a stable connection to Sybase via the iODBC drivers. > > - The Sybase ODBC connection - including a query - have been verified at > the iODBC level. > - The setup is already working well for ODBC connection to MySQL. > > Symptoms include: > > - If I click on "Open Connection", it still comes back with "Connection > Closed" when I go to a ZSQL method > - Using 'Connect on Demand' is not working either. > - Clicking "Open Connection" gives me the following error: > > Connection string: DSN=lixbox_sybase; > UID=sa; > PWD=XXXXXXX Try writing the connection string on one line and without whitespace. ODBC drivers sometimes have problems with this. > Connection pool entry: 0 > Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection > rejected by data source', 7952) This is a generic error that relates to authentication or firewall problems. It is possible that turning on ODBC tracing the ODBC manager will give more clues as to the real cause of the problem. > The odbc.ini definition for DSN "lixbox_sybase" is as follows: > > [lixbox_sybase] > JetFix = No > NoRowSetSizeLimit = No > Description = Test connection to listbox > Options = LIXBOX > DSQUERY = SQLSERVER > TDSHOST = lixbox > TDSPORT = 5000 > TDSVER = 5.0 > SQLSERVER_CATALOG = N > CURSOR_SENSITIVITY = LOW > UserName = sa > Password = XXXXXXXX > ServerType = Sybase 10/11/12 > Driver = /opt/openlink/lib/sql_mt_lt.so > Database = pubs2 > ReadOnly = no > NoAutoCommit = No > NoLoginBox = No > FetchBufferSize = 60 > > > Other relevant data: > - Connecting via OpenLink's iODBC > - Zope 2.7.6-final > - Python 2.3.4 > - Connection to Sybase has been successfully tested with iODBC, > including issuing a query > - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC > connection > > > > RJ Juneau > Chief Technology Officer > Maxxian Integration Inc. > 155 Westhampton Drive > Thornhill, Ontario > Canada L4J 7X2 > E-mail: rj@maxxian.com > Phone: +1 905 482 9429 > Cell: +1 416 897 6682 > Toll free: +1 866 758 9161 > Fax: +1 647 722 2038 > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 06 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From calisp at gmail.com Sun May 15 23:49:03 2005 From: calisp at gmail.com (calisp@gmail.com) Date: Wed Feb 8 20:01:20 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK Message-ID: Hi, I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the following error... 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the last phase of a two-phase commit. This shouldn't happen. Traceback (most recent call last): File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one jar.tpc_finish(self) File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish try: self._finish() File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could not perform COMMIT or ROLLBACK', 1023) What could be causing this? Can I get the mxODBCZopeDA source from somewhere? It would make debugging this much easier. Thanks, Calisp. From mal at egenix.com Mon May 16 13:52:12 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 8 20:01:20 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK In-Reply-To: References: Message-ID: <42887B5C.4010109@egenix.com> calisp@gmail.com wrote: > Hi, > > I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with > unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the > following error... > > 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the > last phase of a two-phase commit. This shouldn't happen. > Traceback (most recent call last): > File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one > jar.tpc_finish(self) > File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish > try: self._finish() > File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish > File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler > ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could > not perform COMMIT or ROLLBACK', 1023) You should have a look at the database logs to see what prevented the commit from being completed. > What could be causing this? Hard to say: mxODBCZopeDA is trying to commit the transaction, but the driver or database failed to complete the request. The above error was generated by the ODBC driver. This could be network or DNS problems, or be related to a bug in FreeTDS (which is getting more stable with every new release, but should still be considered beta quality software at the moment). > Can I get the mxODBCZopeDA source from > somewhere? It would make debugging this much easier. Getting the source is not an option and won't help much either since the source of the problem is not mxODBCZopeDA. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 16 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Sun May 1 21:29:25 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Feb 9 08:10:25 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <427259F3.4090806@egenix.com> References: <20050427130906.52878.qmail@web30008.mail.mud.yahoo.com> <427259F3.4090806@egenix.com> Message-ID: <42752005.7080904@egenix.com> M.-A. Lemburg wrote: > David Rushby wrote: > >> --- "M.-A. Lemburg" wrote: >> >>> Are you using the standard mxDateTime build or one >>> with WANT_SUBCLASSABLE_TYPES defined... >> >> >> >> Presumably "the standard", since I just built with 'py24d setup.py >> build', making no attempt to enable special directives. >> >> >>> ... (mxDateTime_Deallocate is only used by the latter)? >> >> >> >> That's true in 2.1.0-2005-04-15, but not in 2.1.0b5. >> >> >>> In any case, please try our latest snapshot: >>> >>> >> >> http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-04-15.zip >> >>> to see if that makes any difference. >> >> >> >> I can't build it out of the box: > > > Hmm, looks like distutils' sdist command doesn't like our new > repository layout which uses symlinks (after we've switched to > subversion). > > We'll have to debug distutils first, I guess :-( Ok, we've found the problem and fixed it. Here's the new release (which does build out of the box at least on our boxes ;-): http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 01 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From davidrushby at yahoo.com Mon May 2 15:49:53 2005 From: davidrushby at yahoo.com (David Rushby) Date: Thu Feb 9 08:10:25 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Ok, we've found the problem and fixed it. Here's the new > release (which does build out of the box at least on our > boxes ;-): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip It does build now, but: py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" still behaves as it did when I submitted my original message: Fatal Python error: UNREF invalid object Aborted This is the same debug build of Python 2.4.1 that I was previously using, running the same configuration (CentOS Linux 4.0/i386, everything compiled with GCC 3.4.3). Have you examined my original claim as to the cause of the bug? __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 10:21:55 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Feb 9 08:10:25 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> References: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> Message-ID: <42772693.8050306@egenix.com> David Rushby wrote: > --- "M.-A. Lemburg" wrote: > >>Ok, we've found the problem and fixed it. Here's the new >>release (which does build out of the box at least on our >>boxes ;-): >> >> > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip > > It does build now, but: > py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" > still behaves as it did when I submitted my original message: > Fatal Python error: UNREF invalid object > Aborted > > This is the same debug build of Python 2.4.1 that I was previously > using, running the same configuration (CentOS Linux 4.0/i386, > everything compiled with GCC 3.4.3). > > Have you examined my original claim as to the cause of the bug? No. We haven't had time for looking into it. I'm not sure whether your analysis of the problem is correct: if you don't define WANT_SUBCLASSABLE_TYPES, the API mxDateTime_Deallocate() is neither defined nor used. Furthermore, PyObject_Del() is only called by mxDateTime_Free() if you have explicitely edited mxDateTime.c to disabled the free list #defines. In a standard build, PyObject_Del() is only called at module finalization time. Note that the reason we call mxDateTime_Free() in the constructor is that we don't want the destructor of the object to be called. Py_DECREF() would call the destructor (mxDateTime_Deallocate). It is possible that the debug code in Python complains about the refcount in the object not being 0 at the time the object is finalized (module finalization time), but I don't see any such checks in PyObject_Free() (which is what PyObject_Del() maps to). Again, all of this does not happen in regular non-debug Python builds. Please be aware that we don't support debug builds, so fixing the problem (if there is one - gcc has some serious optimization problems on some combinations of platform and version) will take a while. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 09:27:37 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Thu Feb 9 08:10:25 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 Message-ID: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Hi all- I am trying to build the mx-base package, v.2.0.6. This will be used with postgresql 7.3.9, psycopg 1.1.18, and Roundup 0.8.2. RHEL 3.0 Python 2.3 egenix-mx-base-2.0.6.tar.gz I performed a: /usr/local/bin/python2.3 setup.py install Everything looks proper with the exeception of this series of warning statements: ----------------- gcc -pthread -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fno-strict-aliasing -fPIC -Imx/BeeBase/mxBeeBase -I/usr/local/incl ude/python2.3 -I/usr/local/include -c mx/BeeBase/mxBeeBase/btr.c -o build/temp.linux-i686-2.3/mx/BeeBase/mxBeeBase/mxBeeBa se/mx/BeeBase/mxBeeBase/btr.o mx/BeeBase/mxBeeBase/btr.c: In function `dumpBuf': mx/BeeBase/mxBeeBase/btr.c:249: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:250: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:255: warning: unsigned int format, long unsigned int arg (arg 4) mx/BeeBase/mxBeeBase/btr.c:256: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c: In function `_validateTree': mx/BeeBase/mxBeeBase/btr.c:330: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:337: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:339: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:349: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:351: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 3) creating build/lib.linux-i686-2.3/mx/BeeBase creating build/lib.linux-i686-2.3/mx/BeeBase/mxBeeBase -------------- Would someone be kind enough to let me know whether these messages were expected, and if not, how I might resolve these? Thanks! DC __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 22:06:33 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Feb 9 08:10:25 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> References: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Message-ID: <4277CBB9.8020302@egenix.com> Dianne Chen wrote: > Hi all- > > I am trying to build the mx-base package, v.2.0.6. > This will be used with postgresql 7.3.9, psycopg > 1.1.18, and Roundup 0.8.2. > > RHEL 3.0 > Python 2.3 > egenix-mx-base-2.0.6.tar.gz > > I performed a: > > /usr/local/bin/python2.3 setup.py install > > Everything looks proper with the exeception of this > series of warning statements: > > ----------------- > ... > -------------- > > Would someone be kind enough to let me know whether > these messages were expected, and if not, how I might > resolve these? These warning can safely be ignored. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 13:41:14 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Thu Feb 9 08:10:25 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: 6667 Message-ID: <20050503194114.72091.qmail@web31414.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Dianne Chen wrote: > > Hi all- > > > > I am trying to build the mx-base package, v.2.0.6. > > This will be used with postgresql 7.3.9, psycopg > > 1.1.18, and Roundup 0.8.2. > > > > RHEL 3.0 > > Python 2.3 > > egenix-mx-base-2.0.6.tar.gz > > > > I performed a: > > > > /usr/local/bin/python2.3 setup.py install > > > > Everything looks proper with the exeception of > this > > series of warning statements: > > > > ----------------- > > ... > > -------------- > > > > Would someone be kind enough to let me know > whether > > these messages were expected, and if not, how I > might > > resolve these? > > These warning can safely be ignored. > > -- > Marc-Andre Lemburg > eGenix.com > Marc- Thank you very much for the reply. It helps greatly. With kind regards, DC __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From davidrushby at yahoo.com Tue May 3 17:18:46 2005 From: davidrushby at yahoo.com (David Rushby) Date: Thu Feb 9 08:10:25 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050503231846.35012.qmail@web30009.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > I'm not sure whether your analysis of the problem is correct... Indeed, my original analysis wasn't correct; I think this one is. The fatal error I'm complaining about only arises if the arguments to DateTime.DateTime are invalid, so that the object is deallocated in the onError block of mxDateTime_FromDateAndTime. If the object is created successfully, and later deallocated by Python's garbage collector, the fatal error doesn't arise. Here's my analysis of the problem: --- If the debugging directive Py_TRACE_REFS is enabled, as it is in my case, the Python interpreter maintains a doubly linked list of all Python objects (named refchain) via the _ob_next and _ob_prev pointers added to PyObject via _PyObject_HEAD_EXTRA. Each object is inserted into refchain by the _Py_AddToAllObjects call in _Py_NewReference, and removed from refchain by the _Py_ForgetReference call in _Py_Dealloc. _Py_ForgetReference performs an integrity check on the object being deallocated (op) to make sure that its neighbors in refchain recognize it. Specifically, _Py_ForgetReference verifies that the _ob_next pointer of the previous object in refchain (op->_ob_prev->_ob_next) points to op, and that the _ob_prev pointer of the next object in refchain (op->_ob_next->_ob_prev) points to op. If either of those conditions is false, the interpreter raises the fatal error I'm seeing. After mxDateTime_New pulls an mxDateTimeObject out of the free list, it calls _Py_NewReference on that object to transform it from a "conceptually deallocated" object to a "conceptually allocated" one. _Py_NewReference inserts the object into refchain. Later, when the object is being "conceptually deallocated", it should be removed from refchain with _Py_ForgetReference. The version of _Py_Dealloc that's active when Py_TRACE_REFS is enabled does this (_Py_Dealloc is the element of Py_DECREF that performs the actual destruction). _Py_Dealloc first calls _Py_ForgetReference to remove the object from refchain, then calls the object's destructor (op->ob_type->tp_dealloc). If WANT_SUBCLASSABLE_TYPES is not defined (it is not in my case), the destructor for mxDateTime_Type is mxDateTime_Free. So, if a DateTime object is deallocated normally, as a result of its reference count falling to zero, _Py_Dealloc is called on the object, which first removes it from refchain, then passes it to mxDateTime_Free. If a DateTime object is destroyed prematurely, as a result of invalid arguments to its destructor, the onError handler calls mxDateTime_Free, so the object is "conceptually deallocated" (placed in the free list), *but* the object is not removed from refchain. So if a refchain-membership-integrity-check is performed on the object in question or one of its immediate neighbors in refchain, that integrity check fails, leading to the fatal error. --- The solution is to 'Py_DECREF(...)' the object in the onError handler of its constructor, instead of passing the object directly to mxDateTime_Free. That change solves two problems: 1) It causes _Py_Dealloc to execute, which in turn executes _Py_ForgetReference, so the object is removed from refchain, as it should be. 2) At present, objects that are created successfully and later deallocated by normal reference count mechanics have a reference count of 0 when they enter the free list, whereas objects whose constructors abort their creation due to invalid arguments have a reference count of 1 when they enter the free list. Although AFAIK this doesn't cause an actual execution problem (because the object's reference count is *explicitly set to 1* rather than *incremented by 1* when the object is later "conceptually allocated" by _Py_NewReference), it is likely to confuse future maintainers and thereby lead to the introduction of an actual execution problem. I assume that if you agree that this is a reasonable solution, you'll want to apply the change not only to mxDateTime_FromDateAndTime, but to all similar constructors in mxDateTime.c. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From rj at maxxian.com Thu May 5 01:57:40 2005 From: rj at maxxian.com (RJ Juneau) Date: Thu Feb 9 08:10:25 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c5512e$f72798c0$6505a8c0@rjlaptop> I'm on the 30 day evaluation for mxodbc_zope_da. I'm getting the following error when I submit some queries: Error Type: KeyError Error Value: 'query' I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 with UCS4. The error seems to be caused by multiple rows being returned. I did see an earlier posting with the same error message. The response suggested a template error, but this is clearly not the case here. The additional evidence I've gathered so far: - I'm running the test directly from the ZSQL method, so there's no template involved. - If I use the same query with an additional "where" clause to ensure that only one row is returned, it works - If I use a value in the 'where' clause with no rows returned, it works - The same ZSQL query is being used on a Windows machine running Zope and the free ZODBC module without a problem - The query has been verified directly in mysql-client-browser Other info: - The database is MySQL 4.1.10A-0 - iODBC is the DB driver RJ Juneau -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050505/68d278bf/attachment-0109.htm From mal at egenix.com Thu May 5 12:37:43 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Feb 9 08:10:25 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c5512e$f72798c0$6505a8c0@rjlaptop> References: <000301c5512e$f72798c0$6505a8c0@rjlaptop> Message-ID: <4279E967.6010904@egenix.com> RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 > with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 09:37:42 2005 From: rj at maxxian.com (RJ Juneau) Date: Thu Feb 9 08:10:25 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000101c5516f$3b96de90$6505a8c0@rjlaptop> More interesting info on the problem: If I execute the query directly in the "test" window of the base eGenix mxODBC Database Connection window, it works fine and returns the 20 lines expected. That could point to a problem in the rendering, which seems to be where the traceback ends. Note that within the same Zope system I also have an ODBC connection to a Sybase database, and I have successfully tested multi-line ZSQL queries there. This is the traceback: Time 2005/05/05 07:55:15.294 GMT-4 Exception Type KeyError Exception Value 'query' Traceback (innermost last): Module ZPublisher.Publish, line 101, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 39, in call_object Module Shared.DC.ZRDB.DA, line 337, in manage_test Module DocumentTemplate.DT_String, line 474, in __call__ Module DocumentTemplate.DT_In, line 602, in renderwb Module DocumentTemplate.DT_Var, line 219, in render KeyError: 'query' I don't think the following is an issue, but I'll include it for completeness.I am also getting the following iODBC warnings and errors in the Zope console log, which are related to the ODBC parameters being passed by iODBC. Note that these errors also appear for all of the successful queries. [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (Setup). [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (UsageCount). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Timeout). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Reuse). As for the ZSQL snippet from the template... Since there's no template involved yet (I'm still testing directly from the ZSQL method), I assume you mean the SQL code? select h.host_name, s.system_name, s.system_handle, count(*) from terminal t, system_map s, host h where t.system_index = s.system_index and s.host_index = h.host_index group by s.system_name order by h.host_name Nothing complicated here. There are no parameters passed to the query. RJ -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: May 5, 2005 5:38 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: Re: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is > 2.3.4 with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ---------------------------------------------------------------------- > -- > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 16:00:32 2005 From: charlie at egenix.com (Charlie Clark) Date: Thu Feb 9 08:10:25 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000101c5516f$3b96de90$6505a8c0@rjlaptop> References: <000101c5516f$3b96de90$6505a8c0@rjlaptop> Message-ID: <20050505150032.644.1@bepc.1115296715.fake> On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base eGenix > mxODBC Database Connection window, it works fine and returns the 20 > lines expected. That could point to a problem in the rendering, which > seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection to > a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 10:22:17 2005 From: rj at maxxian.com (RJ Juneau) Date: Thu Feb 9 08:10:25 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505150032.644.1@bepc.1115296715.fake> Message-ID: <000201c55175$75bcad10$6505a8c0@rjlaptop> At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 11:47:14 2005 From: rj at maxxian.com (RJ Juneau) Date: Thu Feb 9 08:10:25 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c55181$549be0e0$6505a8c0@rjlaptop> Charlie, I found a fix. Here it is in case anyone else runs into this. You were correct - the problem is in another part of Zope. Based on your feedback, I did a bit more searching and found something here: http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. html The problem appears to be in Zope versions after 2.7.0. I'm running 2.7.6, and the post indicates that it also happens in 2.7.4. The solution: Edit file /lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. There are two lines in the file that start with . Edit them as follows: Change first line to: Change second line to: Just to be after, I shut down Zope before I made the changes and restarted it after. Thanks for the help! RJ -----Original Message----- From: RJ Juneau [mailto:rj@maxxian.com] Sent: May 5, 2005 9:22 AM To: 'Charlie Clark' Cc: 'egenix-users@lists.egenix.com' Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 17:57:25 2005 From: charlie at egenix.com (Charlie Clark) Date: Thu Feb 9 08:10:25 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <20050505165725.3380.2@bepc.1115296715.fake> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Thu May 5 09:15:21 2005 From: charlie at egenix.com (Charlie Clark) Date: Thu Feb 9 08:10:25 2006 Subject: [Zope-DB] RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <000001c55185$41477730$6b00a8c0@fonacier.local> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________ Zope-DB mailing list Zope-DB@zope.org http://mail.zope.org/mailman/listinfo/zope-db From rj at maxxian.com Thu May 5 12:38:00 2005 From: rj at maxxian.com (RJ Juneau) Date: Thu Feb 9 08:10:25 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000001c55188$6b841eb0$6505a8c0@rjlaptop> I just double-checked. Zope-2.7.6-final. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 12:49:16 2005 From: rj at maxxian.com (RJ Juneau) Date: Thu Feb 9 08:10:26 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000501c55189$fe149ba0$6505a8c0@rjlaptop> Charlie, The fix has only been applied for 2.7.7, 2.8b2. The info is in the original bug report which is closed and can be found here: http://www.zope.org/Collectors/Zope/1745 RJ -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Fri May 6 11:50:09 2005 From: rj at maxxian.com (RJ Juneau) Date: Thu Feb 9 08:10:26 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC Message-ID: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Still on eval for the product. I cannot get a stable connection to Sybase via the iODBC drivers. - The Sybase ODBC connection - including a query - have been verified at the iODBC level. - The setup is already working well for ODBC connection to MySQL. Symptoms include: - If I click on "Open Connection", it still comes back with "Connection Closed" when I go to a ZSQL method - Using 'Connect on Demand' is not working either. - Clicking "Open Connection" gives me the following error: Connection string: DSN=lixbox_sybase; UID=sa; PWD=XXXXXXX Connection pool entry: 0 Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection rejected by data source', 7952) The odbc.ini definition for DSN "lixbox_sybase" is as follows: [lixbox_sybase] JetFix = No NoRowSetSizeLimit = No Description = Test connection to listbox Options = LIXBOX DSQUERY = SQLSERVER TDSHOST = lixbox TDSPORT = 5000 TDSVER = 5.0 SQLSERVER_CATALOG = N CURSOR_SENSITIVITY = LOW UserName = sa Password = XXXXXXXX ServerType = Sybase 10/11/12 Driver = /opt/openlink/lib/sql_mt_lt.so Database = pubs2 ReadOnly = no NoAutoCommit = No NoLoginBox = No FetchBufferSize = 60 Other relevant data: - Connecting via OpenLink's iODBC - Zope 2.7.6-final - Python 2.3.4 - Connection to Sybase has been successfully tested with iODBC, including issuing a query - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC connection RJ Juneau Chief Technology Officer Maxxian Integration Inc. 155 Westhampton Drive Thornhill, Ontario Canada L4J 7X2 E-mail: rj@maxxian.com Phone: +1 905 482 9429 Cell: +1 416 897 6682 Toll free: +1 866 758 9161 Fax: +1 647 722 2038 -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050506/aef33361/attachment-0109.htm From mal at egenix.com Fri May 6 18:27:37 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Feb 9 08:10:26 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC In-Reply-To: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> References: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Message-ID: <427B8CE9.1010601@egenix.com> RJ Juneau wrote: > Still on eval for the product. > > I cannot get a stable connection to Sybase via the iODBC drivers. > > - The Sybase ODBC connection - including a query - have been verified at > the iODBC level. > - The setup is already working well for ODBC connection to MySQL. > > Symptoms include: > > - If I click on "Open Connection", it still comes back with "Connection > Closed" when I go to a ZSQL method > - Using 'Connect on Demand' is not working either. > - Clicking "Open Connection" gives me the following error: > > Connection string: DSN=lixbox_sybase; > UID=sa; > PWD=XXXXXXX Try writing the connection string on one line and without whitespace. ODBC drivers sometimes have problems with this. > Connection pool entry: 0 > Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection > rejected by data source', 7952) This is a generic error that relates to authentication or firewall problems. It is possible that turning on ODBC tracing the ODBC manager will give more clues as to the real cause of the problem. > The odbc.ini definition for DSN "lixbox_sybase" is as follows: > > [lixbox_sybase] > JetFix = No > NoRowSetSizeLimit = No > Description = Test connection to listbox > Options = LIXBOX > DSQUERY = SQLSERVER > TDSHOST = lixbox > TDSPORT = 5000 > TDSVER = 5.0 > SQLSERVER_CATALOG = N > CURSOR_SENSITIVITY = LOW > UserName = sa > Password = XXXXXXXX > ServerType = Sybase 10/11/12 > Driver = /opt/openlink/lib/sql_mt_lt.so > Database = pubs2 > ReadOnly = no > NoAutoCommit = No > NoLoginBox = No > FetchBufferSize = 60 > > > Other relevant data: > - Connecting via OpenLink's iODBC > - Zope 2.7.6-final > - Python 2.3.4 > - Connection to Sybase has been successfully tested with iODBC, > including issuing a query > - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC > connection > > > > RJ Juneau > Chief Technology Officer > Maxxian Integration Inc. > 155 Westhampton Drive > Thornhill, Ontario > Canada L4J 7X2 > E-mail: rj@maxxian.com > Phone: +1 905 482 9429 > Cell: +1 416 897 6682 > Toll free: +1 866 758 9161 > Fax: +1 647 722 2038 > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 06 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From calisp at gmail.com Sun May 15 23:49:03 2005 From: calisp at gmail.com (calisp@gmail.com) Date: Thu Feb 9 08:10:26 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK Message-ID: Hi, I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the following error... 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the last phase of a two-phase commit. This shouldn't happen. Traceback (most recent call last): File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one jar.tpc_finish(self) File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish try: self._finish() File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could not perform COMMIT or ROLLBACK', 1023) What could be causing this? Can I get the mxODBCZopeDA source from somewhere? It would make debugging this much easier. Thanks, Calisp. From mal at egenix.com Mon May 16 13:52:12 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Feb 9 08:10:26 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK In-Reply-To: References: Message-ID: <42887B5C.4010109@egenix.com> calisp@gmail.com wrote: > Hi, > > I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with > unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the > following error... > > 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the > last phase of a two-phase commit. This shouldn't happen. > Traceback (most recent call last): > File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one > jar.tpc_finish(self) > File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish > try: self._finish() > File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish > File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler > ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could > not perform COMMIT or ROLLBACK', 1023) You should have a look at the database logs to see what prevented the commit from being completed. > What could be causing this? Hard to say: mxODBCZopeDA is trying to commit the transaction, but the driver or database failed to complete the request. The above error was generated by the ODBC driver. This could be network or DNS problems, or be related to a bug in FreeTDS (which is getting more stable with every new release, but should still be considered beta quality software at the moment). > Can I get the mxODBCZopeDA source from > somewhere? It would make debugging this much easier. Getting the source is not an option and won't help much either since the source of the problem is not mxODBCZopeDA. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 16 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Sun May 1 21:29:25 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Feb 9 12:03:45 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <427259F3.4090806@egenix.com> References: <20050427130906.52878.qmail@web30008.mail.mud.yahoo.com> <427259F3.4090806@egenix.com> Message-ID: <42752005.7080904@egenix.com> M.-A. Lemburg wrote: > David Rushby wrote: > >> --- "M.-A. Lemburg" wrote: >> >>> Are you using the standard mxDateTime build or one >>> with WANT_SUBCLASSABLE_TYPES defined... >> >> >> >> Presumably "the standard", since I just built with 'py24d setup.py >> build', making no attempt to enable special directives. >> >> >>> ... (mxDateTime_Deallocate is only used by the latter)? >> >> >> >> That's true in 2.1.0-2005-04-15, but not in 2.1.0b5. >> >> >>> In any case, please try our latest snapshot: >>> >>> >> >> http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-04-15.zip >> >>> to see if that makes any difference. >> >> >> >> I can't build it out of the box: > > > Hmm, looks like distutils' sdist command doesn't like our new > repository layout which uses symlinks (after we've switched to > subversion). > > We'll have to debug distutils first, I guess :-( Ok, we've found the problem and fixed it. Here's the new release (which does build out of the box at least on our boxes ;-): http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 01 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From davidrushby at yahoo.com Mon May 2 15:49:53 2005 From: davidrushby at yahoo.com (David Rushby) Date: Thu Feb 9 12:03:45 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Ok, we've found the problem and fixed it. Here's the new > release (which does build out of the box at least on our > boxes ;-): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip It does build now, but: py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" still behaves as it did when I submitted my original message: Fatal Python error: UNREF invalid object Aborted This is the same debug build of Python 2.4.1 that I was previously using, running the same configuration (CentOS Linux 4.0/i386, everything compiled with GCC 3.4.3). Have you examined my original claim as to the cause of the bug? __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 10:21:55 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Feb 9 12:03:45 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> References: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> Message-ID: <42772693.8050306@egenix.com> David Rushby wrote: > --- "M.-A. Lemburg" wrote: > >>Ok, we've found the problem and fixed it. Here's the new >>release (which does build out of the box at least on our >>boxes ;-): >> >> > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip > > It does build now, but: > py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" > still behaves as it did when I submitted my original message: > Fatal Python error: UNREF invalid object > Aborted > > This is the same debug build of Python 2.4.1 that I was previously > using, running the same configuration (CentOS Linux 4.0/i386, > everything compiled with GCC 3.4.3). > > Have you examined my original claim as to the cause of the bug? No. We haven't had time for looking into it. I'm not sure whether your analysis of the problem is correct: if you don't define WANT_SUBCLASSABLE_TYPES, the API mxDateTime_Deallocate() is neither defined nor used. Furthermore, PyObject_Del() is only called by mxDateTime_Free() if you have explicitely edited mxDateTime.c to disabled the free list #defines. In a standard build, PyObject_Del() is only called at module finalization time. Note that the reason we call mxDateTime_Free() in the constructor is that we don't want the destructor of the object to be called. Py_DECREF() would call the destructor (mxDateTime_Deallocate). It is possible that the debug code in Python complains about the refcount in the object not being 0 at the time the object is finalized (module finalization time), but I don't see any such checks in PyObject_Free() (which is what PyObject_Del() maps to). Again, all of this does not happen in regular non-debug Python builds. Please be aware that we don't support debug builds, so fixing the problem (if there is one - gcc has some serious optimization problems on some combinations of platform and version) will take a while. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 09:27:37 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Thu Feb 9 12:03:45 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 Message-ID: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Hi all- I am trying to build the mx-base package, v.2.0.6. This will be used with postgresql 7.3.9, psycopg 1.1.18, and Roundup 0.8.2. RHEL 3.0 Python 2.3 egenix-mx-base-2.0.6.tar.gz I performed a: /usr/local/bin/python2.3 setup.py install Everything looks proper with the exeception of this series of warning statements: ----------------- gcc -pthread -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fno-strict-aliasing -fPIC -Imx/BeeBase/mxBeeBase -I/usr/local/incl ude/python2.3 -I/usr/local/include -c mx/BeeBase/mxBeeBase/btr.c -o build/temp.linux-i686-2.3/mx/BeeBase/mxBeeBase/mxBeeBa se/mx/BeeBase/mxBeeBase/btr.o mx/BeeBase/mxBeeBase/btr.c: In function `dumpBuf': mx/BeeBase/mxBeeBase/btr.c:249: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:250: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:255: warning: unsigned int format, long unsigned int arg (arg 4) mx/BeeBase/mxBeeBase/btr.c:256: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c: In function `_validateTree': mx/BeeBase/mxBeeBase/btr.c:330: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:337: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:339: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:349: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:351: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 3) creating build/lib.linux-i686-2.3/mx/BeeBase creating build/lib.linux-i686-2.3/mx/BeeBase/mxBeeBase -------------- Would someone be kind enough to let me know whether these messages were expected, and if not, how I might resolve these? Thanks! DC __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 22:06:33 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Feb 9 12:03:45 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> References: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Message-ID: <4277CBB9.8020302@egenix.com> Dianne Chen wrote: > Hi all- > > I am trying to build the mx-base package, v.2.0.6. > This will be used with postgresql 7.3.9, psycopg > 1.1.18, and Roundup 0.8.2. > > RHEL 3.0 > Python 2.3 > egenix-mx-base-2.0.6.tar.gz > > I performed a: > > /usr/local/bin/python2.3 setup.py install > > Everything looks proper with the exeception of this > series of warning statements: > > ----------------- > ... > -------------- > > Would someone be kind enough to let me know whether > these messages were expected, and if not, how I might > resolve these? These warning can safely be ignored. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 13:41:14 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Thu Feb 9 12:03:45 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: 6667 Message-ID: <20050503194114.72091.qmail@web31414.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Dianne Chen wrote: > > Hi all- > > > > I am trying to build the mx-base package, v.2.0.6. > > This will be used with postgresql 7.3.9, psycopg > > 1.1.18, and Roundup 0.8.2. > > > > RHEL 3.0 > > Python 2.3 > > egenix-mx-base-2.0.6.tar.gz > > > > I performed a: > > > > /usr/local/bin/python2.3 setup.py install > > > > Everything looks proper with the exeception of > this > > series of warning statements: > > > > ----------------- > > ... > > -------------- > > > > Would someone be kind enough to let me know > whether > > these messages were expected, and if not, how I > might > > resolve these? > > These warning can safely be ignored. > > -- > Marc-Andre Lemburg > eGenix.com > Marc- Thank you very much for the reply. It helps greatly. With kind regards, DC __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From davidrushby at yahoo.com Tue May 3 17:18:46 2005 From: davidrushby at yahoo.com (David Rushby) Date: Thu Feb 9 12:03:45 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050503231846.35012.qmail@web30009.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > I'm not sure whether your analysis of the problem is correct... Indeed, my original analysis wasn't correct; I think this one is. The fatal error I'm complaining about only arises if the arguments to DateTime.DateTime are invalid, so that the object is deallocated in the onError block of mxDateTime_FromDateAndTime. If the object is created successfully, and later deallocated by Python's garbage collector, the fatal error doesn't arise. Here's my analysis of the problem: --- If the debugging directive Py_TRACE_REFS is enabled, as it is in my case, the Python interpreter maintains a doubly linked list of all Python objects (named refchain) via the _ob_next and _ob_prev pointers added to PyObject via _PyObject_HEAD_EXTRA. Each object is inserted into refchain by the _Py_AddToAllObjects call in _Py_NewReference, and removed from refchain by the _Py_ForgetReference call in _Py_Dealloc. _Py_ForgetReference performs an integrity check on the object being deallocated (op) to make sure that its neighbors in refchain recognize it. Specifically, _Py_ForgetReference verifies that the _ob_next pointer of the previous object in refchain (op->_ob_prev->_ob_next) points to op, and that the _ob_prev pointer of the next object in refchain (op->_ob_next->_ob_prev) points to op. If either of those conditions is false, the interpreter raises the fatal error I'm seeing. After mxDateTime_New pulls an mxDateTimeObject out of the free list, it calls _Py_NewReference on that object to transform it from a "conceptually deallocated" object to a "conceptually allocated" one. _Py_NewReference inserts the object into refchain. Later, when the object is being "conceptually deallocated", it should be removed from refchain with _Py_ForgetReference. The version of _Py_Dealloc that's active when Py_TRACE_REFS is enabled does this (_Py_Dealloc is the element of Py_DECREF that performs the actual destruction). _Py_Dealloc first calls _Py_ForgetReference to remove the object from refchain, then calls the object's destructor (op->ob_type->tp_dealloc). If WANT_SUBCLASSABLE_TYPES is not defined (it is not in my case), the destructor for mxDateTime_Type is mxDateTime_Free. So, if a DateTime object is deallocated normally, as a result of its reference count falling to zero, _Py_Dealloc is called on the object, which first removes it from refchain, then passes it to mxDateTime_Free. If a DateTime object is destroyed prematurely, as a result of invalid arguments to its destructor, the onError handler calls mxDateTime_Free, so the object is "conceptually deallocated" (placed in the free list), *but* the object is not removed from refchain. So if a refchain-membership-integrity-check is performed on the object in question or one of its immediate neighbors in refchain, that integrity check fails, leading to the fatal error. --- The solution is to 'Py_DECREF(...)' the object in the onError handler of its constructor, instead of passing the object directly to mxDateTime_Free. That change solves two problems: 1) It causes _Py_Dealloc to execute, which in turn executes _Py_ForgetReference, so the object is removed from refchain, as it should be. 2) At present, objects that are created successfully and later deallocated by normal reference count mechanics have a reference count of 0 when they enter the free list, whereas objects whose constructors abort their creation due to invalid arguments have a reference count of 1 when they enter the free list. Although AFAIK this doesn't cause an actual execution problem (because the object's reference count is *explicitly set to 1* rather than *incremented by 1* when the object is later "conceptually allocated" by _Py_NewReference), it is likely to confuse future maintainers and thereby lead to the introduction of an actual execution problem. I assume that if you agree that this is a reasonable solution, you'll want to apply the change not only to mxDateTime_FromDateAndTime, but to all similar constructors in mxDateTime.c. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From rj at maxxian.com Thu May 5 01:57:40 2005 From: rj at maxxian.com (RJ Juneau) Date: Thu Feb 9 12:03:45 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c5512e$f72798c0$6505a8c0@rjlaptop> I'm on the 30 day evaluation for mxodbc_zope_da. I'm getting the following error when I submit some queries: Error Type: KeyError Error Value: 'query' I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 with UCS4. The error seems to be caused by multiple rows being returned. I did see an earlier posting with the same error message. The response suggested a template error, but this is clearly not the case here. The additional evidence I've gathered so far: - I'm running the test directly from the ZSQL method, so there's no template involved. - If I use the same query with an additional "where" clause to ensure that only one row is returned, it works - If I use a value in the 'where' clause with no rows returned, it works - The same ZSQL query is being used on a Windows machine running Zope and the free ZODBC module without a problem - The query has been verified directly in mysql-client-browser Other info: - The database is MySQL 4.1.10A-0 - iODBC is the DB driver RJ Juneau -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050505/68d278bf/attachment-0110.htm From mal at egenix.com Thu May 5 12:37:43 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Feb 9 12:03:45 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c5512e$f72798c0$6505a8c0@rjlaptop> References: <000301c5512e$f72798c0$6505a8c0@rjlaptop> Message-ID: <4279E967.6010904@egenix.com> RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 > with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 09:37:42 2005 From: rj at maxxian.com (RJ Juneau) Date: Thu Feb 9 12:03:45 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000101c5516f$3b96de90$6505a8c0@rjlaptop> More interesting info on the problem: If I execute the query directly in the "test" window of the base eGenix mxODBC Database Connection window, it works fine and returns the 20 lines expected. That could point to a problem in the rendering, which seems to be where the traceback ends. Note that within the same Zope system I also have an ODBC connection to a Sybase database, and I have successfully tested multi-line ZSQL queries there. This is the traceback: Time 2005/05/05 07:55:15.294 GMT-4 Exception Type KeyError Exception Value 'query' Traceback (innermost last): Module ZPublisher.Publish, line 101, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 39, in call_object Module Shared.DC.ZRDB.DA, line 337, in manage_test Module DocumentTemplate.DT_String, line 474, in __call__ Module DocumentTemplate.DT_In, line 602, in renderwb Module DocumentTemplate.DT_Var, line 219, in render KeyError: 'query' I don't think the following is an issue, but I'll include it for completeness.I am also getting the following iODBC warnings and errors in the Zope console log, which are related to the ODBC parameters being passed by iODBC. Note that these errors also appear for all of the successful queries. [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (Setup). [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (UsageCount). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Timeout). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Reuse). As for the ZSQL snippet from the template... Since there's no template involved yet (I'm still testing directly from the ZSQL method), I assume you mean the SQL code? select h.host_name, s.system_name, s.system_handle, count(*) from terminal t, system_map s, host h where t.system_index = s.system_index and s.host_index = h.host_index group by s.system_name order by h.host_name Nothing complicated here. There are no parameters passed to the query. RJ -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: May 5, 2005 5:38 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: Re: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is > 2.3.4 with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ---------------------------------------------------------------------- > -- > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 16:00:32 2005 From: charlie at egenix.com (Charlie Clark) Date: Thu Feb 9 12:03:46 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000101c5516f$3b96de90$6505a8c0@rjlaptop> References: <000101c5516f$3b96de90$6505a8c0@rjlaptop> Message-ID: <20050505150032.644.1@bepc.1115296715.fake> On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base eGenix > mxODBC Database Connection window, it works fine and returns the 20 > lines expected. That could point to a problem in the rendering, which > seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection to > a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 10:22:17 2005 From: rj at maxxian.com (RJ Juneau) Date: Thu Feb 9 12:03:46 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505150032.644.1@bepc.1115296715.fake> Message-ID: <000201c55175$75bcad10$6505a8c0@rjlaptop> At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 11:47:14 2005 From: rj at maxxian.com (RJ Juneau) Date: Thu Feb 9 12:03:46 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c55181$549be0e0$6505a8c0@rjlaptop> Charlie, I found a fix. Here it is in case anyone else runs into this. You were correct - the problem is in another part of Zope. Based on your feedback, I did a bit more searching and found something here: http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. html The problem appears to be in Zope versions after 2.7.0. I'm running 2.7.6, and the post indicates that it also happens in 2.7.4. The solution: Edit file /lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. There are two lines in the file that start with . Edit them as follows: Change first line to: Change second line to: Just to be after, I shut down Zope before I made the changes and restarted it after. Thanks for the help! RJ -----Original Message----- From: RJ Juneau [mailto:rj@maxxian.com] Sent: May 5, 2005 9:22 AM To: 'Charlie Clark' Cc: 'egenix-users@lists.egenix.com' Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 17:57:25 2005 From: charlie at egenix.com (Charlie Clark) Date: Thu Feb 9 12:03:46 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <20050505165725.3380.2@bepc.1115296715.fake> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Thu May 5 09:15:21 2005 From: charlie at egenix.com (Charlie Clark) Date: Thu Feb 9 12:03:46 2006 Subject: [Zope-DB] RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <000001c55185$41477730$6b00a8c0@fonacier.local> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________ Zope-DB mailing list Zope-DB@zope.org http://mail.zope.org/mailman/listinfo/zope-db From rj at maxxian.com Thu May 5 12:38:00 2005 From: rj at maxxian.com (RJ Juneau) Date: Thu Feb 9 12:03:46 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000001c55188$6b841eb0$6505a8c0@rjlaptop> I just double-checked. Zope-2.7.6-final. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 12:49:16 2005 From: rj at maxxian.com (RJ Juneau) Date: Thu Feb 9 12:03:46 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000501c55189$fe149ba0$6505a8c0@rjlaptop> Charlie, The fix has only been applied for 2.7.7, 2.8b2. The info is in the original bug report which is closed and can be found here: http://www.zope.org/Collectors/Zope/1745 RJ -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Fri May 6 11:50:09 2005 From: rj at maxxian.com (RJ Juneau) Date: Thu Feb 9 12:03:46 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC Message-ID: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Still on eval for the product. I cannot get a stable connection to Sybase via the iODBC drivers. - The Sybase ODBC connection - including a query - have been verified at the iODBC level. - The setup is already working well for ODBC connection to MySQL. Symptoms include: - If I click on "Open Connection", it still comes back with "Connection Closed" when I go to a ZSQL method - Using 'Connect on Demand' is not working either. - Clicking "Open Connection" gives me the following error: Connection string: DSN=lixbox_sybase; UID=sa; PWD=XXXXXXX Connection pool entry: 0 Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection rejected by data source', 7952) The odbc.ini definition for DSN "lixbox_sybase" is as follows: [lixbox_sybase] JetFix = No NoRowSetSizeLimit = No Description = Test connection to listbox Options = LIXBOX DSQUERY = SQLSERVER TDSHOST = lixbox TDSPORT = 5000 TDSVER = 5.0 SQLSERVER_CATALOG = N CURSOR_SENSITIVITY = LOW UserName = sa Password = XXXXXXXX ServerType = Sybase 10/11/12 Driver = /opt/openlink/lib/sql_mt_lt.so Database = pubs2 ReadOnly = no NoAutoCommit = No NoLoginBox = No FetchBufferSize = 60 Other relevant data: - Connecting via OpenLink's iODBC - Zope 2.7.6-final - Python 2.3.4 - Connection to Sybase has been successfully tested with iODBC, including issuing a query - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC connection RJ Juneau Chief Technology Officer Maxxian Integration Inc. 155 Westhampton Drive Thornhill, Ontario Canada L4J 7X2 E-mail: rj@maxxian.com Phone: +1 905 482 9429 Cell: +1 416 897 6682 Toll free: +1 866 758 9161 Fax: +1 647 722 2038 -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050506/aef33361/attachment-0110.htm From mal at egenix.com Fri May 6 18:27:37 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Feb 9 12:03:46 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC In-Reply-To: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> References: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Message-ID: <427B8CE9.1010601@egenix.com> RJ Juneau wrote: > Still on eval for the product. > > I cannot get a stable connection to Sybase via the iODBC drivers. > > - The Sybase ODBC connection - including a query - have been verified at > the iODBC level. > - The setup is already working well for ODBC connection to MySQL. > > Symptoms include: > > - If I click on "Open Connection", it still comes back with "Connection > Closed" when I go to a ZSQL method > - Using 'Connect on Demand' is not working either. > - Clicking "Open Connection" gives me the following error: > > Connection string: DSN=lixbox_sybase; > UID=sa; > PWD=XXXXXXX Try writing the connection string on one line and without whitespace. ODBC drivers sometimes have problems with this. > Connection pool entry: 0 > Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection > rejected by data source', 7952) This is a generic error that relates to authentication or firewall problems. It is possible that turning on ODBC tracing the ODBC manager will give more clues as to the real cause of the problem. > The odbc.ini definition for DSN "lixbox_sybase" is as follows: > > [lixbox_sybase] > JetFix = No > NoRowSetSizeLimit = No > Description = Test connection to listbox > Options = LIXBOX > DSQUERY = SQLSERVER > TDSHOST = lixbox > TDSPORT = 5000 > TDSVER = 5.0 > SQLSERVER_CATALOG = N > CURSOR_SENSITIVITY = LOW > UserName = sa > Password = XXXXXXXX > ServerType = Sybase 10/11/12 > Driver = /opt/openlink/lib/sql_mt_lt.so > Database = pubs2 > ReadOnly = no > NoAutoCommit = No > NoLoginBox = No > FetchBufferSize = 60 > > > Other relevant data: > - Connecting via OpenLink's iODBC > - Zope 2.7.6-final > - Python 2.3.4 > - Connection to Sybase has been successfully tested with iODBC, > including issuing a query > - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC > connection > > > > RJ Juneau > Chief Technology Officer > Maxxian Integration Inc. > 155 Westhampton Drive > Thornhill, Ontario > Canada L4J 7X2 > E-mail: rj@maxxian.com > Phone: +1 905 482 9429 > Cell: +1 416 897 6682 > Toll free: +1 866 758 9161 > Fax: +1 647 722 2038 > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 06 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From calisp at gmail.com Sun May 15 23:49:03 2005 From: calisp at gmail.com (calisp@gmail.com) Date: Thu Feb 9 12:03:46 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK Message-ID: Hi, I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the following error... 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the last phase of a two-phase commit. This shouldn't happen. Traceback (most recent call last): File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one jar.tpc_finish(self) File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish try: self._finish() File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could not perform COMMIT or ROLLBACK', 1023) What could be causing this? Can I get the mxODBCZopeDA source from somewhere? It would make debugging this much easier. Thanks, Calisp. From mal at egenix.com Mon May 16 13:52:12 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Feb 9 12:03:46 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK In-Reply-To: References: Message-ID: <42887B5C.4010109@egenix.com> calisp@gmail.com wrote: > Hi, > > I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with > unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the > following error... > > 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the > last phase of a two-phase commit. This shouldn't happen. > Traceback (most recent call last): > File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one > jar.tpc_finish(self) > File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish > try: self._finish() > File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish > File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler > ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could > not perform COMMIT or ROLLBACK', 1023) You should have a look at the database logs to see what prevented the commit from being completed. > What could be causing this? Hard to say: mxODBCZopeDA is trying to commit the transaction, but the driver or database failed to complete the request. The above error was generated by the ODBC driver. This could be network or DNS problems, or be related to a bug in FreeTDS (which is getting more stable with every new release, but should still be considered beta quality software at the moment). > Can I get the mxODBCZopeDA source from > somewhere? It would make debugging this much easier. Getting the source is not an option and won't help much either since the source of the problem is not mxODBCZopeDA. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 16 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Sun May 1 21:29:25 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Feb 9 16:01:32 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <427259F3.4090806@egenix.com> References: <20050427130906.52878.qmail@web30008.mail.mud.yahoo.com> <427259F3.4090806@egenix.com> Message-ID: <42752005.7080904@egenix.com> M.-A. Lemburg wrote: > David Rushby wrote: > >> --- "M.-A. Lemburg" wrote: >> >>> Are you using the standard mxDateTime build or one >>> with WANT_SUBCLASSABLE_TYPES defined... >> >> >> >> Presumably "the standard", since I just built with 'py24d setup.py >> build', making no attempt to enable special directives. >> >> >>> ... (mxDateTime_Deallocate is only used by the latter)? >> >> >> >> That's true in 2.1.0-2005-04-15, but not in 2.1.0b5. >> >> >>> In any case, please try our latest snapshot: >>> >>> >> >> http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-04-15.zip >> >>> to see if that makes any difference. >> >> >> >> I can't build it out of the box: > > > Hmm, looks like distutils' sdist command doesn't like our new > repository layout which uses symlinks (after we've switched to > subversion). > > We'll have to debug distutils first, I guess :-( Ok, we've found the problem and fixed it. Here's the new release (which does build out of the box at least on our boxes ;-): http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 01 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From davidrushby at yahoo.com Mon May 2 15:49:53 2005 From: davidrushby at yahoo.com (David Rushby) Date: Thu Feb 9 16:01:32 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Ok, we've found the problem and fixed it. Here's the new > release (which does build out of the box at least on our > boxes ;-): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip It does build now, but: py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" still behaves as it did when I submitted my original message: Fatal Python error: UNREF invalid object Aborted This is the same debug build of Python 2.4.1 that I was previously using, running the same configuration (CentOS Linux 4.0/i386, everything compiled with GCC 3.4.3). Have you examined my original claim as to the cause of the bug? __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 10:21:55 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Feb 9 16:01:32 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> References: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> Message-ID: <42772693.8050306@egenix.com> David Rushby wrote: > --- "M.-A. Lemburg" wrote: > >>Ok, we've found the problem and fixed it. Here's the new >>release (which does build out of the box at least on our >>boxes ;-): >> >> > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip > > It does build now, but: > py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" > still behaves as it did when I submitted my original message: > Fatal Python error: UNREF invalid object > Aborted > > This is the same debug build of Python 2.4.1 that I was previously > using, running the same configuration (CentOS Linux 4.0/i386, > everything compiled with GCC 3.4.3). > > Have you examined my original claim as to the cause of the bug? No. We haven't had time for looking into it. I'm not sure whether your analysis of the problem is correct: if you don't define WANT_SUBCLASSABLE_TYPES, the API mxDateTime_Deallocate() is neither defined nor used. Furthermore, PyObject_Del() is only called by mxDateTime_Free() if you have explicitely edited mxDateTime.c to disabled the free list #defines. In a standard build, PyObject_Del() is only called at module finalization time. Note that the reason we call mxDateTime_Free() in the constructor is that we don't want the destructor of the object to be called. Py_DECREF() would call the destructor (mxDateTime_Deallocate). It is possible that the debug code in Python complains about the refcount in the object not being 0 at the time the object is finalized (module finalization time), but I don't see any such checks in PyObject_Free() (which is what PyObject_Del() maps to). Again, all of this does not happen in regular non-debug Python builds. Please be aware that we don't support debug builds, so fixing the problem (if there is one - gcc has some serious optimization problems on some combinations of platform and version) will take a while. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 09:27:37 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Thu Feb 9 16:01:32 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 Message-ID: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Hi all- I am trying to build the mx-base package, v.2.0.6. This will be used with postgresql 7.3.9, psycopg 1.1.18, and Roundup 0.8.2. RHEL 3.0 Python 2.3 egenix-mx-base-2.0.6.tar.gz I performed a: /usr/local/bin/python2.3 setup.py install Everything looks proper with the exeception of this series of warning statements: ----------------- gcc -pthread -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fno-strict-aliasing -fPIC -Imx/BeeBase/mxBeeBase -I/usr/local/incl ude/python2.3 -I/usr/local/include -c mx/BeeBase/mxBeeBase/btr.c -o build/temp.linux-i686-2.3/mx/BeeBase/mxBeeBase/mxBeeBa se/mx/BeeBase/mxBeeBase/btr.o mx/BeeBase/mxBeeBase/btr.c: In function `dumpBuf': mx/BeeBase/mxBeeBase/btr.c:249: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:250: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:255: warning: unsigned int format, long unsigned int arg (arg 4) mx/BeeBase/mxBeeBase/btr.c:256: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c: In function `_validateTree': mx/BeeBase/mxBeeBase/btr.c:330: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:337: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:339: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:349: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:351: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 3) creating build/lib.linux-i686-2.3/mx/BeeBase creating build/lib.linux-i686-2.3/mx/BeeBase/mxBeeBase -------------- Would someone be kind enough to let me know whether these messages were expected, and if not, how I might resolve these? Thanks! DC __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 22:06:33 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Feb 9 16:01:32 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> References: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Message-ID: <4277CBB9.8020302@egenix.com> Dianne Chen wrote: > Hi all- > > I am trying to build the mx-base package, v.2.0.6. > This will be used with postgresql 7.3.9, psycopg > 1.1.18, and Roundup 0.8.2. > > RHEL 3.0 > Python 2.3 > egenix-mx-base-2.0.6.tar.gz > > I performed a: > > /usr/local/bin/python2.3 setup.py install > > Everything looks proper with the exeception of this > series of warning statements: > > ----------------- > ... > -------------- > > Would someone be kind enough to let me know whether > these messages were expected, and if not, how I might > resolve these? These warning can safely be ignored. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 13:41:14 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Thu Feb 9 16:01:32 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: 6667 Message-ID: <20050503194114.72091.qmail@web31414.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Dianne Chen wrote: > > Hi all- > > > > I am trying to build the mx-base package, v.2.0.6. > > This will be used with postgresql 7.3.9, psycopg > > 1.1.18, and Roundup 0.8.2. > > > > RHEL 3.0 > > Python 2.3 > > egenix-mx-base-2.0.6.tar.gz > > > > I performed a: > > > > /usr/local/bin/python2.3 setup.py install > > > > Everything looks proper with the exeception of > this > > series of warning statements: > > > > ----------------- > > ... > > -------------- > > > > Would someone be kind enough to let me know > whether > > these messages were expected, and if not, how I > might > > resolve these? > > These warning can safely be ignored. > > -- > Marc-Andre Lemburg > eGenix.com > Marc- Thank you very much for the reply. It helps greatly. With kind regards, DC __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From davidrushby at yahoo.com Tue May 3 17:18:46 2005 From: davidrushby at yahoo.com (David Rushby) Date: Thu Feb 9 16:01:32 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050503231846.35012.qmail@web30009.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > I'm not sure whether your analysis of the problem is correct... Indeed, my original analysis wasn't correct; I think this one is. The fatal error I'm complaining about only arises if the arguments to DateTime.DateTime are invalid, so that the object is deallocated in the onError block of mxDateTime_FromDateAndTime. If the object is created successfully, and later deallocated by Python's garbage collector, the fatal error doesn't arise. Here's my analysis of the problem: --- If the debugging directive Py_TRACE_REFS is enabled, as it is in my case, the Python interpreter maintains a doubly linked list of all Python objects (named refchain) via the _ob_next and _ob_prev pointers added to PyObject via _PyObject_HEAD_EXTRA. Each object is inserted into refchain by the _Py_AddToAllObjects call in _Py_NewReference, and removed from refchain by the _Py_ForgetReference call in _Py_Dealloc. _Py_ForgetReference performs an integrity check on the object being deallocated (op) to make sure that its neighbors in refchain recognize it. Specifically, _Py_ForgetReference verifies that the _ob_next pointer of the previous object in refchain (op->_ob_prev->_ob_next) points to op, and that the _ob_prev pointer of the next object in refchain (op->_ob_next->_ob_prev) points to op. If either of those conditions is false, the interpreter raises the fatal error I'm seeing. After mxDateTime_New pulls an mxDateTimeObject out of the free list, it calls _Py_NewReference on that object to transform it from a "conceptually deallocated" object to a "conceptually allocated" one. _Py_NewReference inserts the object into refchain. Later, when the object is being "conceptually deallocated", it should be removed from refchain with _Py_ForgetReference. The version of _Py_Dealloc that's active when Py_TRACE_REFS is enabled does this (_Py_Dealloc is the element of Py_DECREF that performs the actual destruction). _Py_Dealloc first calls _Py_ForgetReference to remove the object from refchain, then calls the object's destructor (op->ob_type->tp_dealloc). If WANT_SUBCLASSABLE_TYPES is not defined (it is not in my case), the destructor for mxDateTime_Type is mxDateTime_Free. So, if a DateTime object is deallocated normally, as a result of its reference count falling to zero, _Py_Dealloc is called on the object, which first removes it from refchain, then passes it to mxDateTime_Free. If a DateTime object is destroyed prematurely, as a result of invalid arguments to its destructor, the onError handler calls mxDateTime_Free, so the object is "conceptually deallocated" (placed in the free list), *but* the object is not removed from refchain. So if a refchain-membership-integrity-check is performed on the object in question or one of its immediate neighbors in refchain, that integrity check fails, leading to the fatal error. --- The solution is to 'Py_DECREF(...)' the object in the onError handler of its constructor, instead of passing the object directly to mxDateTime_Free. That change solves two problems: 1) It causes _Py_Dealloc to execute, which in turn executes _Py_ForgetReference, so the object is removed from refchain, as it should be. 2) At present, objects that are created successfully and later deallocated by normal reference count mechanics have a reference count of 0 when they enter the free list, whereas objects whose constructors abort their creation due to invalid arguments have a reference count of 1 when they enter the free list. Although AFAIK this doesn't cause an actual execution problem (because the object's reference count is *explicitly set to 1* rather than *incremented by 1* when the object is later "conceptually allocated" by _Py_NewReference), it is likely to confuse future maintainers and thereby lead to the introduction of an actual execution problem. I assume that if you agree that this is a reasonable solution, you'll want to apply the change not only to mxDateTime_FromDateAndTime, but to all similar constructors in mxDateTime.c. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From rj at maxxian.com Thu May 5 01:57:40 2005 From: rj at maxxian.com (RJ Juneau) Date: Thu Feb 9 16:01:32 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c5512e$f72798c0$6505a8c0@rjlaptop> I'm on the 30 day evaluation for mxodbc_zope_da. I'm getting the following error when I submit some queries: Error Type: KeyError Error Value: 'query' I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 with UCS4. The error seems to be caused by multiple rows being returned. I did see an earlier posting with the same error message. The response suggested a template error, but this is clearly not the case here. The additional evidence I've gathered so far: - I'm running the test directly from the ZSQL method, so there's no template involved. - If I use the same query with an additional "where" clause to ensure that only one row is returned, it works - If I use a value in the 'where' clause with no rows returned, it works - The same ZSQL query is being used on a Windows machine running Zope and the free ZODBC module without a problem - The query has been verified directly in mysql-client-browser Other info: - The database is MySQL 4.1.10A-0 - iODBC is the DB driver RJ Juneau -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050505/68d278bf/attachment-0111.htm From mal at egenix.com Thu May 5 12:37:43 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Feb 9 16:01:32 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c5512e$f72798c0$6505a8c0@rjlaptop> References: <000301c5512e$f72798c0$6505a8c0@rjlaptop> Message-ID: <4279E967.6010904@egenix.com> RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 > with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 09:37:42 2005 From: rj at maxxian.com (RJ Juneau) Date: Thu Feb 9 16:01:32 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000101c5516f$3b96de90$6505a8c0@rjlaptop> More interesting info on the problem: If I execute the query directly in the "test" window of the base eGenix mxODBC Database Connection window, it works fine and returns the 20 lines expected. That could point to a problem in the rendering, which seems to be where the traceback ends. Note that within the same Zope system I also have an ODBC connection to a Sybase database, and I have successfully tested multi-line ZSQL queries there. This is the traceback: Time 2005/05/05 07:55:15.294 GMT-4 Exception Type KeyError Exception Value 'query' Traceback (innermost last): Module ZPublisher.Publish, line 101, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 39, in call_object Module Shared.DC.ZRDB.DA, line 337, in manage_test Module DocumentTemplate.DT_String, line 474, in __call__ Module DocumentTemplate.DT_In, line 602, in renderwb Module DocumentTemplate.DT_Var, line 219, in render KeyError: 'query' I don't think the following is an issue, but I'll include it for completeness.I am also getting the following iODBC warnings and errors in the Zope console log, which are related to the ODBC parameters being passed by iODBC. Note that these errors also appear for all of the successful queries. [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (Setup). [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (UsageCount). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Timeout). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Reuse). As for the ZSQL snippet from the template... Since there's no template involved yet (I'm still testing directly from the ZSQL method), I assume you mean the SQL code? select h.host_name, s.system_name, s.system_handle, count(*) from terminal t, system_map s, host h where t.system_index = s.system_index and s.host_index = h.host_index group by s.system_name order by h.host_name Nothing complicated here. There are no parameters passed to the query. RJ -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: May 5, 2005 5:38 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: Re: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is > 2.3.4 with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ---------------------------------------------------------------------- > -- > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 16:00:32 2005 From: charlie at egenix.com (Charlie Clark) Date: Thu Feb 9 16:01:32 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000101c5516f$3b96de90$6505a8c0@rjlaptop> References: <000101c5516f$3b96de90$6505a8c0@rjlaptop> Message-ID: <20050505150032.644.1@bepc.1115296715.fake> On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base eGenix > mxODBC Database Connection window, it works fine and returns the 20 > lines expected. That could point to a problem in the rendering, which > seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection to > a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 10:22:17 2005 From: rj at maxxian.com (RJ Juneau) Date: Thu Feb 9 16:01:32 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505150032.644.1@bepc.1115296715.fake> Message-ID: <000201c55175$75bcad10$6505a8c0@rjlaptop> At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 11:47:14 2005 From: rj at maxxian.com (RJ Juneau) Date: Thu Feb 9 16:01:33 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c55181$549be0e0$6505a8c0@rjlaptop> Charlie, I found a fix. Here it is in case anyone else runs into this. You were correct - the problem is in another part of Zope. Based on your feedback, I did a bit more searching and found something here: http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. html The problem appears to be in Zope versions after 2.7.0. I'm running 2.7.6, and the post indicates that it also happens in 2.7.4. The solution: Edit file /lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. There are two lines in the file that start with . Edit them as follows: Change first line to: Change second line to: Just to be after, I shut down Zope before I made the changes and restarted it after. Thanks for the help! RJ -----Original Message----- From: RJ Juneau [mailto:rj@maxxian.com] Sent: May 5, 2005 9:22 AM To: 'Charlie Clark' Cc: 'egenix-users@lists.egenix.com' Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 17:57:25 2005 From: charlie at egenix.com (Charlie Clark) Date: Thu Feb 9 16:01:33 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <20050505165725.3380.2@bepc.1115296715.fake> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Thu May 5 09:15:21 2005 From: charlie at egenix.com (Charlie Clark) Date: Thu Feb 9 16:01:33 2006 Subject: [Zope-DB] RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <000001c55185$41477730$6b00a8c0@fonacier.local> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________ Zope-DB mailing list Zope-DB@zope.org http://mail.zope.org/mailman/listinfo/zope-db From rj at maxxian.com Thu May 5 12:38:00 2005 From: rj at maxxian.com (RJ Juneau) Date: Thu Feb 9 16:01:33 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000001c55188$6b841eb0$6505a8c0@rjlaptop> I just double-checked. Zope-2.7.6-final. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 12:49:16 2005 From: rj at maxxian.com (RJ Juneau) Date: Thu Feb 9 16:01:33 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000501c55189$fe149ba0$6505a8c0@rjlaptop> Charlie, The fix has only been applied for 2.7.7, 2.8b2. The info is in the original bug report which is closed and can be found here: http://www.zope.org/Collectors/Zope/1745 RJ -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Fri May 6 11:50:09 2005 From: rj at maxxian.com (RJ Juneau) Date: Thu Feb 9 16:01:33 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC Message-ID: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Still on eval for the product. I cannot get a stable connection to Sybase via the iODBC drivers. - The Sybase ODBC connection - including a query - have been verified at the iODBC level. - The setup is already working well for ODBC connection to MySQL. Symptoms include: - If I click on "Open Connection", it still comes back with "Connection Closed" when I go to a ZSQL method - Using 'Connect on Demand' is not working either. - Clicking "Open Connection" gives me the following error: Connection string: DSN=lixbox_sybase; UID=sa; PWD=XXXXXXX Connection pool entry: 0 Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection rejected by data source', 7952) The odbc.ini definition for DSN "lixbox_sybase" is as follows: [lixbox_sybase] JetFix = No NoRowSetSizeLimit = No Description = Test connection to listbox Options = LIXBOX DSQUERY = SQLSERVER TDSHOST = lixbox TDSPORT = 5000 TDSVER = 5.0 SQLSERVER_CATALOG = N CURSOR_SENSITIVITY = LOW UserName = sa Password = XXXXXXXX ServerType = Sybase 10/11/12 Driver = /opt/openlink/lib/sql_mt_lt.so Database = pubs2 ReadOnly = no NoAutoCommit = No NoLoginBox = No FetchBufferSize = 60 Other relevant data: - Connecting via OpenLink's iODBC - Zope 2.7.6-final - Python 2.3.4 - Connection to Sybase has been successfully tested with iODBC, including issuing a query - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC connection RJ Juneau Chief Technology Officer Maxxian Integration Inc. 155 Westhampton Drive Thornhill, Ontario Canada L4J 7X2 E-mail: rj@maxxian.com Phone: +1 905 482 9429 Cell: +1 416 897 6682 Toll free: +1 866 758 9161 Fax: +1 647 722 2038 -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050506/aef33361/attachment-0111.htm From mal at egenix.com Fri May 6 18:27:37 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Feb 9 16:01:33 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC In-Reply-To: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> References: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Message-ID: <427B8CE9.1010601@egenix.com> RJ Juneau wrote: > Still on eval for the product. > > I cannot get a stable connection to Sybase via the iODBC drivers. > > - The Sybase ODBC connection - including a query - have been verified at > the iODBC level. > - The setup is already working well for ODBC connection to MySQL. > > Symptoms include: > > - If I click on "Open Connection", it still comes back with "Connection > Closed" when I go to a ZSQL method > - Using 'Connect on Demand' is not working either. > - Clicking "Open Connection" gives me the following error: > > Connection string: DSN=lixbox_sybase; > UID=sa; > PWD=XXXXXXX Try writing the connection string on one line and without whitespace. ODBC drivers sometimes have problems with this. > Connection pool entry: 0 > Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection > rejected by data source', 7952) This is a generic error that relates to authentication or firewall problems. It is possible that turning on ODBC tracing the ODBC manager will give more clues as to the real cause of the problem. > The odbc.ini definition for DSN "lixbox_sybase" is as follows: > > [lixbox_sybase] > JetFix = No > NoRowSetSizeLimit = No > Description = Test connection to listbox > Options = LIXBOX > DSQUERY = SQLSERVER > TDSHOST = lixbox > TDSPORT = 5000 > TDSVER = 5.0 > SQLSERVER_CATALOG = N > CURSOR_SENSITIVITY = LOW > UserName = sa > Password = XXXXXXXX > ServerType = Sybase 10/11/12 > Driver = /opt/openlink/lib/sql_mt_lt.so > Database = pubs2 > ReadOnly = no > NoAutoCommit = No > NoLoginBox = No > FetchBufferSize = 60 > > > Other relevant data: > - Connecting via OpenLink's iODBC > - Zope 2.7.6-final > - Python 2.3.4 > - Connection to Sybase has been successfully tested with iODBC, > including issuing a query > - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC > connection > > > > RJ Juneau > Chief Technology Officer > Maxxian Integration Inc. > 155 Westhampton Drive > Thornhill, Ontario > Canada L4J 7X2 > E-mail: rj@maxxian.com > Phone: +1 905 482 9429 > Cell: +1 416 897 6682 > Toll free: +1 866 758 9161 > Fax: +1 647 722 2038 > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 06 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From calisp at gmail.com Sun May 15 23:49:03 2005 From: calisp at gmail.com (calisp@gmail.com) Date: Thu Feb 9 16:01:33 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK Message-ID: Hi, I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the following error... 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the last phase of a two-phase commit. This shouldn't happen. Traceback (most recent call last): File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one jar.tpc_finish(self) File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish try: self._finish() File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could not perform COMMIT or ROLLBACK', 1023) What could be causing this? Can I get the mxODBCZopeDA source from somewhere? It would make debugging this much easier. Thanks, Calisp. From mal at egenix.com Mon May 16 13:52:12 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Feb 9 16:01:33 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK In-Reply-To: References: Message-ID: <42887B5C.4010109@egenix.com> calisp@gmail.com wrote: > Hi, > > I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with > unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the > following error... > > 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the > last phase of a two-phase commit. This shouldn't happen. > Traceback (most recent call last): > File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one > jar.tpc_finish(self) > File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish > try: self._finish() > File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish > File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler > ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could > not perform COMMIT or ROLLBACK', 1023) You should have a look at the database logs to see what prevented the commit from being completed. > What could be causing this? Hard to say: mxODBCZopeDA is trying to commit the transaction, but the driver or database failed to complete the request. The above error was generated by the ODBC driver. This could be network or DNS problems, or be related to a bug in FreeTDS (which is getting more stable with every new release, but should still be considered beta quality software at the moment). > Can I get the mxODBCZopeDA source from > somewhere? It would make debugging this much easier. Getting the source is not an option and won't help much either since the source of the problem is not mxODBCZopeDA. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 16 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Sun May 1 21:29:25 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Feb 9 20:01:25 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <427259F3.4090806@egenix.com> References: <20050427130906.52878.qmail@web30008.mail.mud.yahoo.com> <427259F3.4090806@egenix.com> Message-ID: <42752005.7080904@egenix.com> M.-A. Lemburg wrote: > David Rushby wrote: > >> --- "M.-A. Lemburg" wrote: >> >>> Are you using the standard mxDateTime build or one >>> with WANT_SUBCLASSABLE_TYPES defined... >> >> >> >> Presumably "the standard", since I just built with 'py24d setup.py >> build', making no attempt to enable special directives. >> >> >>> ... (mxDateTime_Deallocate is only used by the latter)? >> >> >> >> That's true in 2.1.0-2005-04-15, but not in 2.1.0b5. >> >> >>> In any case, please try our latest snapshot: >>> >>> >> >> http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-04-15.zip >> >>> to see if that makes any difference. >> >> >> >> I can't build it out of the box: > > > Hmm, looks like distutils' sdist command doesn't like our new > repository layout which uses symlinks (after we've switched to > subversion). > > We'll have to debug distutils first, I guess :-( Ok, we've found the problem and fixed it. Here's the new release (which does build out of the box at least on our boxes ;-): http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 01 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From davidrushby at yahoo.com Mon May 2 15:49:53 2005 From: davidrushby at yahoo.com (David Rushby) Date: Thu Feb 9 20:01:25 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Ok, we've found the problem and fixed it. Here's the new > release (which does build out of the box at least on our > boxes ;-): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip It does build now, but: py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" still behaves as it did when I submitted my original message: Fatal Python error: UNREF invalid object Aborted This is the same debug build of Python 2.4.1 that I was previously using, running the same configuration (CentOS Linux 4.0/i386, everything compiled with GCC 3.4.3). Have you examined my original claim as to the cause of the bug? __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 10:21:55 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Feb 9 20:01:26 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> References: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> Message-ID: <42772693.8050306@egenix.com> David Rushby wrote: > --- "M.-A. Lemburg" wrote: > >>Ok, we've found the problem and fixed it. Here's the new >>release (which does build out of the box at least on our >>boxes ;-): >> >> > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip > > It does build now, but: > py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" > still behaves as it did when I submitted my original message: > Fatal Python error: UNREF invalid object > Aborted > > This is the same debug build of Python 2.4.1 that I was previously > using, running the same configuration (CentOS Linux 4.0/i386, > everything compiled with GCC 3.4.3). > > Have you examined my original claim as to the cause of the bug? No. We haven't had time for looking into it. I'm not sure whether your analysis of the problem is correct: if you don't define WANT_SUBCLASSABLE_TYPES, the API mxDateTime_Deallocate() is neither defined nor used. Furthermore, PyObject_Del() is only called by mxDateTime_Free() if you have explicitely edited mxDateTime.c to disabled the free list #defines. In a standard build, PyObject_Del() is only called at module finalization time. Note that the reason we call mxDateTime_Free() in the constructor is that we don't want the destructor of the object to be called. Py_DECREF() would call the destructor (mxDateTime_Deallocate). It is possible that the debug code in Python complains about the refcount in the object not being 0 at the time the object is finalized (module finalization time), but I don't see any such checks in PyObject_Free() (which is what PyObject_Del() maps to). Again, all of this does not happen in regular non-debug Python builds. Please be aware that we don't support debug builds, so fixing the problem (if there is one - gcc has some serious optimization problems on some combinations of platform and version) will take a while. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 09:27:37 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Thu Feb 9 20:01:26 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 Message-ID: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Hi all- I am trying to build the mx-base package, v.2.0.6. This will be used with postgresql 7.3.9, psycopg 1.1.18, and Roundup 0.8.2. RHEL 3.0 Python 2.3 egenix-mx-base-2.0.6.tar.gz I performed a: /usr/local/bin/python2.3 setup.py install Everything looks proper with the exeception of this series of warning statements: ----------------- gcc -pthread -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fno-strict-aliasing -fPIC -Imx/BeeBase/mxBeeBase -I/usr/local/incl ude/python2.3 -I/usr/local/include -c mx/BeeBase/mxBeeBase/btr.c -o build/temp.linux-i686-2.3/mx/BeeBase/mxBeeBase/mxBeeBa se/mx/BeeBase/mxBeeBase/btr.o mx/BeeBase/mxBeeBase/btr.c: In function `dumpBuf': mx/BeeBase/mxBeeBase/btr.c:249: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:250: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:255: warning: unsigned int format, long unsigned int arg (arg 4) mx/BeeBase/mxBeeBase/btr.c:256: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c: In function `_validateTree': mx/BeeBase/mxBeeBase/btr.c:330: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:337: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:339: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:349: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:351: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 3) creating build/lib.linux-i686-2.3/mx/BeeBase creating build/lib.linux-i686-2.3/mx/BeeBase/mxBeeBase -------------- Would someone be kind enough to let me know whether these messages were expected, and if not, how I might resolve these? Thanks! DC __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 22:06:33 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Feb 9 20:01:26 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> References: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Message-ID: <4277CBB9.8020302@egenix.com> Dianne Chen wrote: > Hi all- > > I am trying to build the mx-base package, v.2.0.6. > This will be used with postgresql 7.3.9, psycopg > 1.1.18, and Roundup 0.8.2. > > RHEL 3.0 > Python 2.3 > egenix-mx-base-2.0.6.tar.gz > > I performed a: > > /usr/local/bin/python2.3 setup.py install > > Everything looks proper with the exeception of this > series of warning statements: > > ----------------- > ... > -------------- > > Would someone be kind enough to let me know whether > these messages were expected, and if not, how I might > resolve these? These warning can safely be ignored. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 13:41:14 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Thu Feb 9 20:01:26 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: 6667 Message-ID: <20050503194114.72091.qmail@web31414.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Dianne Chen wrote: > > Hi all- > > > > I am trying to build the mx-base package, v.2.0.6. > > This will be used with postgresql 7.3.9, psycopg > > 1.1.18, and Roundup 0.8.2. > > > > RHEL 3.0 > > Python 2.3 > > egenix-mx-base-2.0.6.tar.gz > > > > I performed a: > > > > /usr/local/bin/python2.3 setup.py install > > > > Everything looks proper with the exeception of > this > > series of warning statements: > > > > ----------------- > > ... > > -------------- > > > > Would someone be kind enough to let me know > whether > > these messages were expected, and if not, how I > might > > resolve these? > > These warning can safely be ignored. > > -- > Marc-Andre Lemburg > eGenix.com > Marc- Thank you very much for the reply. It helps greatly. With kind regards, DC __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From davidrushby at yahoo.com Tue May 3 17:18:46 2005 From: davidrushby at yahoo.com (David Rushby) Date: Thu Feb 9 20:01:26 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050503231846.35012.qmail@web30009.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > I'm not sure whether your analysis of the problem is correct... Indeed, my original analysis wasn't correct; I think this one is. The fatal error I'm complaining about only arises if the arguments to DateTime.DateTime are invalid, so that the object is deallocated in the onError block of mxDateTime_FromDateAndTime. If the object is created successfully, and later deallocated by Python's garbage collector, the fatal error doesn't arise. Here's my analysis of the problem: --- If the debugging directive Py_TRACE_REFS is enabled, as it is in my case, the Python interpreter maintains a doubly linked list of all Python objects (named refchain) via the _ob_next and _ob_prev pointers added to PyObject via _PyObject_HEAD_EXTRA. Each object is inserted into refchain by the _Py_AddToAllObjects call in _Py_NewReference, and removed from refchain by the _Py_ForgetReference call in _Py_Dealloc. _Py_ForgetReference performs an integrity check on the object being deallocated (op) to make sure that its neighbors in refchain recognize it. Specifically, _Py_ForgetReference verifies that the _ob_next pointer of the previous object in refchain (op->_ob_prev->_ob_next) points to op, and that the _ob_prev pointer of the next object in refchain (op->_ob_next->_ob_prev) points to op. If either of those conditions is false, the interpreter raises the fatal error I'm seeing. After mxDateTime_New pulls an mxDateTimeObject out of the free list, it calls _Py_NewReference on that object to transform it from a "conceptually deallocated" object to a "conceptually allocated" one. _Py_NewReference inserts the object into refchain. Later, when the object is being "conceptually deallocated", it should be removed from refchain with _Py_ForgetReference. The version of _Py_Dealloc that's active when Py_TRACE_REFS is enabled does this (_Py_Dealloc is the element of Py_DECREF that performs the actual destruction). _Py_Dealloc first calls _Py_ForgetReference to remove the object from refchain, then calls the object's destructor (op->ob_type->tp_dealloc). If WANT_SUBCLASSABLE_TYPES is not defined (it is not in my case), the destructor for mxDateTime_Type is mxDateTime_Free. So, if a DateTime object is deallocated normally, as a result of its reference count falling to zero, _Py_Dealloc is called on the object, which first removes it from refchain, then passes it to mxDateTime_Free. If a DateTime object is destroyed prematurely, as a result of invalid arguments to its destructor, the onError handler calls mxDateTime_Free, so the object is "conceptually deallocated" (placed in the free list), *but* the object is not removed from refchain. So if a refchain-membership-integrity-check is performed on the object in question or one of its immediate neighbors in refchain, that integrity check fails, leading to the fatal error. --- The solution is to 'Py_DECREF(...)' the object in the onError handler of its constructor, instead of passing the object directly to mxDateTime_Free. That change solves two problems: 1) It causes _Py_Dealloc to execute, which in turn executes _Py_ForgetReference, so the object is removed from refchain, as it should be. 2) At present, objects that are created successfully and later deallocated by normal reference count mechanics have a reference count of 0 when they enter the free list, whereas objects whose constructors abort their creation due to invalid arguments have a reference count of 1 when they enter the free list. Although AFAIK this doesn't cause an actual execution problem (because the object's reference count is *explicitly set to 1* rather than *incremented by 1* when the object is later "conceptually allocated" by _Py_NewReference), it is likely to confuse future maintainers and thereby lead to the introduction of an actual execution problem. I assume that if you agree that this is a reasonable solution, you'll want to apply the change not only to mxDateTime_FromDateAndTime, but to all similar constructors in mxDateTime.c. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From rj at maxxian.com Thu May 5 01:57:40 2005 From: rj at maxxian.com (RJ Juneau) Date: Thu Feb 9 20:01:26 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c5512e$f72798c0$6505a8c0@rjlaptop> I'm on the 30 day evaluation for mxodbc_zope_da. I'm getting the following error when I submit some queries: Error Type: KeyError Error Value: 'query' I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 with UCS4. The error seems to be caused by multiple rows being returned. I did see an earlier posting with the same error message. The response suggested a template error, but this is clearly not the case here. The additional evidence I've gathered so far: - I'm running the test directly from the ZSQL method, so there's no template involved. - If I use the same query with an additional "where" clause to ensure that only one row is returned, it works - If I use a value in the 'where' clause with no rows returned, it works - The same ZSQL query is being used on a Windows machine running Zope and the free ZODBC module without a problem - The query has been verified directly in mysql-client-browser Other info: - The database is MySQL 4.1.10A-0 - iODBC is the DB driver RJ Juneau -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050505/68d278bf/attachment-0112.htm From mal at egenix.com Thu May 5 12:37:43 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Feb 9 20:01:26 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c5512e$f72798c0$6505a8c0@rjlaptop> References: <000301c5512e$f72798c0$6505a8c0@rjlaptop> Message-ID: <4279E967.6010904@egenix.com> RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 > with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 09:37:42 2005 From: rj at maxxian.com (RJ Juneau) Date: Thu Feb 9 20:01:26 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000101c5516f$3b96de90$6505a8c0@rjlaptop> More interesting info on the problem: If I execute the query directly in the "test" window of the base eGenix mxODBC Database Connection window, it works fine and returns the 20 lines expected. That could point to a problem in the rendering, which seems to be where the traceback ends. Note that within the same Zope system I also have an ODBC connection to a Sybase database, and I have successfully tested multi-line ZSQL queries there. This is the traceback: Time 2005/05/05 07:55:15.294 GMT-4 Exception Type KeyError Exception Value 'query' Traceback (innermost last): Module ZPublisher.Publish, line 101, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 39, in call_object Module Shared.DC.ZRDB.DA, line 337, in manage_test Module DocumentTemplate.DT_String, line 474, in __call__ Module DocumentTemplate.DT_In, line 602, in renderwb Module DocumentTemplate.DT_Var, line 219, in render KeyError: 'query' I don't think the following is an issue, but I'll include it for completeness.I am also getting the following iODBC warnings and errors in the Zope console log, which are related to the ODBC parameters being passed by iODBC. Note that these errors also appear for all of the successful queries. [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (Setup). [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (UsageCount). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Timeout). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Reuse). As for the ZSQL snippet from the template... Since there's no template involved yet (I'm still testing directly from the ZSQL method), I assume you mean the SQL code? select h.host_name, s.system_name, s.system_handle, count(*) from terminal t, system_map s, host h where t.system_index = s.system_index and s.host_index = h.host_index group by s.system_name order by h.host_name Nothing complicated here. There are no parameters passed to the query. RJ -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: May 5, 2005 5:38 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: Re: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is > 2.3.4 with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ---------------------------------------------------------------------- > -- > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 16:00:32 2005 From: charlie at egenix.com (Charlie Clark) Date: Thu Feb 9 20:01:26 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000101c5516f$3b96de90$6505a8c0@rjlaptop> References: <000101c5516f$3b96de90$6505a8c0@rjlaptop> Message-ID: <20050505150032.644.1@bepc.1115296715.fake> On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base eGenix > mxODBC Database Connection window, it works fine and returns the 20 > lines expected. That could point to a problem in the rendering, which > seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection to > a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 10:22:17 2005 From: rj at maxxian.com (RJ Juneau) Date: Thu Feb 9 20:01:26 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505150032.644.1@bepc.1115296715.fake> Message-ID: <000201c55175$75bcad10$6505a8c0@rjlaptop> At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 11:47:14 2005 From: rj at maxxian.com (RJ Juneau) Date: Thu Feb 9 20:01:27 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c55181$549be0e0$6505a8c0@rjlaptop> Charlie, I found a fix. Here it is in case anyone else runs into this. You were correct - the problem is in another part of Zope. Based on your feedback, I did a bit more searching and found something here: http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. html The problem appears to be in Zope versions after 2.7.0. I'm running 2.7.6, and the post indicates that it also happens in 2.7.4. The solution: Edit file /lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. There are two lines in the file that start with . Edit them as follows: Change first line to: Change second line to: Just to be after, I shut down Zope before I made the changes and restarted it after. Thanks for the help! RJ -----Original Message----- From: RJ Juneau [mailto:rj@maxxian.com] Sent: May 5, 2005 9:22 AM To: 'Charlie Clark' Cc: 'egenix-users@lists.egenix.com' Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 17:57:25 2005 From: charlie at egenix.com (Charlie Clark) Date: Thu Feb 9 20:01:27 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <20050505165725.3380.2@bepc.1115296715.fake> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Thu May 5 09:15:21 2005 From: charlie at egenix.com (Charlie Clark) Date: Thu Feb 9 20:01:27 2006 Subject: [Zope-DB] RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <000001c55185$41477730$6b00a8c0@fonacier.local> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________ Zope-DB mailing list Zope-DB@zope.org http://mail.zope.org/mailman/listinfo/zope-db From rj at maxxian.com Thu May 5 12:38:00 2005 From: rj at maxxian.com (RJ Juneau) Date: Thu Feb 9 20:01:27 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000001c55188$6b841eb0$6505a8c0@rjlaptop> I just double-checked. Zope-2.7.6-final. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 12:49:16 2005 From: rj at maxxian.com (RJ Juneau) Date: Thu Feb 9 20:01:27 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000501c55189$fe149ba0$6505a8c0@rjlaptop> Charlie, The fix has only been applied for 2.7.7, 2.8b2. The info is in the original bug report which is closed and can be found here: http://www.zope.org/Collectors/Zope/1745 RJ -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Fri May 6 11:50:09 2005 From: rj at maxxian.com (RJ Juneau) Date: Thu Feb 9 20:01:28 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC Message-ID: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Still on eval for the product. I cannot get a stable connection to Sybase via the iODBC drivers. - The Sybase ODBC connection - including a query - have been verified at the iODBC level. - The setup is already working well for ODBC connection to MySQL. Symptoms include: - If I click on "Open Connection", it still comes back with "Connection Closed" when I go to a ZSQL method - Using 'Connect on Demand' is not working either. - Clicking "Open Connection" gives me the following error: Connection string: DSN=lixbox_sybase; UID=sa; PWD=XXXXXXX Connection pool entry: 0 Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection rejected by data source', 7952) The odbc.ini definition for DSN "lixbox_sybase" is as follows: [lixbox_sybase] JetFix = No NoRowSetSizeLimit = No Description = Test connection to listbox Options = LIXBOX DSQUERY = SQLSERVER TDSHOST = lixbox TDSPORT = 5000 TDSVER = 5.0 SQLSERVER_CATALOG = N CURSOR_SENSITIVITY = LOW UserName = sa Password = XXXXXXXX ServerType = Sybase 10/11/12 Driver = /opt/openlink/lib/sql_mt_lt.so Database = pubs2 ReadOnly = no NoAutoCommit = No NoLoginBox = No FetchBufferSize = 60 Other relevant data: - Connecting via OpenLink's iODBC - Zope 2.7.6-final - Python 2.3.4 - Connection to Sybase has been successfully tested with iODBC, including issuing a query - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC connection RJ Juneau Chief Technology Officer Maxxian Integration Inc. 155 Westhampton Drive Thornhill, Ontario Canada L4J 7X2 E-mail: rj@maxxian.com Phone: +1 905 482 9429 Cell: +1 416 897 6682 Toll free: +1 866 758 9161 Fax: +1 647 722 2038 -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050506/aef33361/attachment-0112.htm From mal at egenix.com Fri May 6 18:27:37 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Feb 9 20:01:28 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC In-Reply-To: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> References: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Message-ID: <427B8CE9.1010601@egenix.com> RJ Juneau wrote: > Still on eval for the product. > > I cannot get a stable connection to Sybase via the iODBC drivers. > > - The Sybase ODBC connection - including a query - have been verified at > the iODBC level. > - The setup is already working well for ODBC connection to MySQL. > > Symptoms include: > > - If I click on "Open Connection", it still comes back with "Connection > Closed" when I go to a ZSQL method > - Using 'Connect on Demand' is not working either. > - Clicking "Open Connection" gives me the following error: > > Connection string: DSN=lixbox_sybase; > UID=sa; > PWD=XXXXXXX Try writing the connection string on one line and without whitespace. ODBC drivers sometimes have problems with this. > Connection pool entry: 0 > Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection > rejected by data source', 7952) This is a generic error that relates to authentication or firewall problems. It is possible that turning on ODBC tracing the ODBC manager will give more clues as to the real cause of the problem. > The odbc.ini definition for DSN "lixbox_sybase" is as follows: > > [lixbox_sybase] > JetFix = No > NoRowSetSizeLimit = No > Description = Test connection to listbox > Options = LIXBOX > DSQUERY = SQLSERVER > TDSHOST = lixbox > TDSPORT = 5000 > TDSVER = 5.0 > SQLSERVER_CATALOG = N > CURSOR_SENSITIVITY = LOW > UserName = sa > Password = XXXXXXXX > ServerType = Sybase 10/11/12 > Driver = /opt/openlink/lib/sql_mt_lt.so > Database = pubs2 > ReadOnly = no > NoAutoCommit = No > NoLoginBox = No > FetchBufferSize = 60 > > > Other relevant data: > - Connecting via OpenLink's iODBC > - Zope 2.7.6-final > - Python 2.3.4 > - Connection to Sybase has been successfully tested with iODBC, > including issuing a query > - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC > connection > > > > RJ Juneau > Chief Technology Officer > Maxxian Integration Inc. > 155 Westhampton Drive > Thornhill, Ontario > Canada L4J 7X2 > E-mail: rj@maxxian.com > Phone: +1 905 482 9429 > Cell: +1 416 897 6682 > Toll free: +1 866 758 9161 > Fax: +1 647 722 2038 > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 06 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From calisp at gmail.com Sun May 15 23:49:03 2005 From: calisp at gmail.com (calisp@gmail.com) Date: Thu Feb 9 20:01:28 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK Message-ID: Hi, I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the following error... 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the last phase of a two-phase commit. This shouldn't happen. Traceback (most recent call last): File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one jar.tpc_finish(self) File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish try: self._finish() File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could not perform COMMIT or ROLLBACK', 1023) What could be causing this? Can I get the mxODBCZopeDA source from somewhere? It would make debugging this much easier. Thanks, Calisp. From mal at egenix.com Mon May 16 13:52:12 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Feb 9 20:01:28 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK In-Reply-To: References: Message-ID: <42887B5C.4010109@egenix.com> calisp@gmail.com wrote: > Hi, > > I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with > unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the > following error... > > 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the > last phase of a two-phase commit. This shouldn't happen. > Traceback (most recent call last): > File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one > jar.tpc_finish(self) > File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish > try: self._finish() > File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish > File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler > ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could > not perform COMMIT or ROLLBACK', 1023) You should have a look at the database logs to see what prevented the commit from being completed. > What could be causing this? Hard to say: mxODBCZopeDA is trying to commit the transaction, but the driver or database failed to complete the request. The above error was generated by the ODBC driver. This could be network or DNS problems, or be related to a bug in FreeTDS (which is getting more stable with every new release, but should still be considered beta quality software at the moment). > Can I get the mxODBCZopeDA source from > somewhere? It would make debugging this much easier. Getting the source is not an option and won't help much either since the source of the problem is not mxODBCZopeDA. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 16 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Sun May 1 21:29:25 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Feb 10 08:25:24 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <427259F3.4090806@egenix.com> References: <20050427130906.52878.qmail@web30008.mail.mud.yahoo.com> <427259F3.4090806@egenix.com> Message-ID: <42752005.7080904@egenix.com> M.-A. Lemburg wrote: > David Rushby wrote: > >> --- "M.-A. Lemburg" wrote: >> >>> Are you using the standard mxDateTime build or one >>> with WANT_SUBCLASSABLE_TYPES defined... >> >> >> >> Presumably "the standard", since I just built with 'py24d setup.py >> build', making no attempt to enable special directives. >> >> >>> ... (mxDateTime_Deallocate is only used by the latter)? >> >> >> >> That's true in 2.1.0-2005-04-15, but not in 2.1.0b5. >> >> >>> In any case, please try our latest snapshot: >>> >>> >> >> http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-04-15.zip >> >>> to see if that makes any difference. >> >> >> >> I can't build it out of the box: > > > Hmm, looks like distutils' sdist command doesn't like our new > repository layout which uses symlinks (after we've switched to > subversion). > > We'll have to debug distutils first, I guess :-( Ok, we've found the problem and fixed it. Here's the new release (which does build out of the box at least on our boxes ;-): http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 01 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From davidrushby at yahoo.com Mon May 2 15:49:53 2005 From: davidrushby at yahoo.com (David Rushby) Date: Fri Feb 10 08:25:26 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Ok, we've found the problem and fixed it. Here's the new > release (which does build out of the box at least on our > boxes ;-): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip It does build now, but: py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" still behaves as it did when I submitted my original message: Fatal Python error: UNREF invalid object Aborted This is the same debug build of Python 2.4.1 that I was previously using, running the same configuration (CentOS Linux 4.0/i386, everything compiled with GCC 3.4.3). Have you examined my original claim as to the cause of the bug? __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 10:21:55 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Feb 10 08:25:26 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> References: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> Message-ID: <42772693.8050306@egenix.com> David Rushby wrote: > --- "M.-A. Lemburg" wrote: > >>Ok, we've found the problem and fixed it. Here's the new >>release (which does build out of the box at least on our >>boxes ;-): >> >> > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip > > It does build now, but: > py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" > still behaves as it did when I submitted my original message: > Fatal Python error: UNREF invalid object > Aborted > > This is the same debug build of Python 2.4.1 that I was previously > using, running the same configuration (CentOS Linux 4.0/i386, > everything compiled with GCC 3.4.3). > > Have you examined my original claim as to the cause of the bug? No. We haven't had time for looking into it. I'm not sure whether your analysis of the problem is correct: if you don't define WANT_SUBCLASSABLE_TYPES, the API mxDateTime_Deallocate() is neither defined nor used. Furthermore, PyObject_Del() is only called by mxDateTime_Free() if you have explicitely edited mxDateTime.c to disabled the free list #defines. In a standard build, PyObject_Del() is only called at module finalization time. Note that the reason we call mxDateTime_Free() in the constructor is that we don't want the destructor of the object to be called. Py_DECREF() would call the destructor (mxDateTime_Deallocate). It is possible that the debug code in Python complains about the refcount in the object not being 0 at the time the object is finalized (module finalization time), but I don't see any such checks in PyObject_Free() (which is what PyObject_Del() maps to). Again, all of this does not happen in regular non-debug Python builds. Please be aware that we don't support debug builds, so fixing the problem (if there is one - gcc has some serious optimization problems on some combinations of platform and version) will take a while. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 09:27:37 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Fri Feb 10 08:25:26 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 Message-ID: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Hi all- I am trying to build the mx-base package, v.2.0.6. This will be used with postgresql 7.3.9, psycopg 1.1.18, and Roundup 0.8.2. RHEL 3.0 Python 2.3 egenix-mx-base-2.0.6.tar.gz I performed a: /usr/local/bin/python2.3 setup.py install Everything looks proper with the exeception of this series of warning statements: ----------------- gcc -pthread -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fno-strict-aliasing -fPIC -Imx/BeeBase/mxBeeBase -I/usr/local/incl ude/python2.3 -I/usr/local/include -c mx/BeeBase/mxBeeBase/btr.c -o build/temp.linux-i686-2.3/mx/BeeBase/mxBeeBase/mxBeeBa se/mx/BeeBase/mxBeeBase/btr.o mx/BeeBase/mxBeeBase/btr.c: In function `dumpBuf': mx/BeeBase/mxBeeBase/btr.c:249: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:250: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:255: warning: unsigned int format, long unsigned int arg (arg 4) mx/BeeBase/mxBeeBase/btr.c:256: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c: In function `_validateTree': mx/BeeBase/mxBeeBase/btr.c:330: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:337: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:339: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:349: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:351: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 3) creating build/lib.linux-i686-2.3/mx/BeeBase creating build/lib.linux-i686-2.3/mx/BeeBase/mxBeeBase -------------- Would someone be kind enough to let me know whether these messages were expected, and if not, how I might resolve these? Thanks! DC __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 22:06:33 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Feb 10 08:25:26 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> References: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Message-ID: <4277CBB9.8020302@egenix.com> Dianne Chen wrote: > Hi all- > > I am trying to build the mx-base package, v.2.0.6. > This will be used with postgresql 7.3.9, psycopg > 1.1.18, and Roundup 0.8.2. > > RHEL 3.0 > Python 2.3 > egenix-mx-base-2.0.6.tar.gz > > I performed a: > > /usr/local/bin/python2.3 setup.py install > > Everything looks proper with the exeception of this > series of warning statements: > > ----------------- > ... > -------------- > > Would someone be kind enough to let me know whether > these messages were expected, and if not, how I might > resolve these? These warning can safely be ignored. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 13:41:14 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Fri Feb 10 08:25:27 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: 6667 Message-ID: <20050503194114.72091.qmail@web31414.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Dianne Chen wrote: > > Hi all- > > > > I am trying to build the mx-base package, v.2.0.6. > > This will be used with postgresql 7.3.9, psycopg > > 1.1.18, and Roundup 0.8.2. > > > > RHEL 3.0 > > Python 2.3 > > egenix-mx-base-2.0.6.tar.gz > > > > I performed a: > > > > /usr/local/bin/python2.3 setup.py install > > > > Everything looks proper with the exeception of > this > > series of warning statements: > > > > ----------------- > > ... > > -------------- > > > > Would someone be kind enough to let me know > whether > > these messages were expected, and if not, how I > might > > resolve these? > > These warning can safely be ignored. > > -- > Marc-Andre Lemburg > eGenix.com > Marc- Thank you very much for the reply. It helps greatly. With kind regards, DC __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From davidrushby at yahoo.com Tue May 3 17:18:46 2005 From: davidrushby at yahoo.com (David Rushby) Date: Fri Feb 10 08:25:27 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050503231846.35012.qmail@web30009.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > I'm not sure whether your analysis of the problem is correct... Indeed, my original analysis wasn't correct; I think this one is. The fatal error I'm complaining about only arises if the arguments to DateTime.DateTime are invalid, so that the object is deallocated in the onError block of mxDateTime_FromDateAndTime. If the object is created successfully, and later deallocated by Python's garbage collector, the fatal error doesn't arise. Here's my analysis of the problem: --- If the debugging directive Py_TRACE_REFS is enabled, as it is in my case, the Python interpreter maintains a doubly linked list of all Python objects (named refchain) via the _ob_next and _ob_prev pointers added to PyObject via _PyObject_HEAD_EXTRA. Each object is inserted into refchain by the _Py_AddToAllObjects call in _Py_NewReference, and removed from refchain by the _Py_ForgetReference call in _Py_Dealloc. _Py_ForgetReference performs an integrity check on the object being deallocated (op) to make sure that its neighbors in refchain recognize it. Specifically, _Py_ForgetReference verifies that the _ob_next pointer of the previous object in refchain (op->_ob_prev->_ob_next) points to op, and that the _ob_prev pointer of the next object in refchain (op->_ob_next->_ob_prev) points to op. If either of those conditions is false, the interpreter raises the fatal error I'm seeing. After mxDateTime_New pulls an mxDateTimeObject out of the free list, it calls _Py_NewReference on that object to transform it from a "conceptually deallocated" object to a "conceptually allocated" one. _Py_NewReference inserts the object into refchain. Later, when the object is being "conceptually deallocated", it should be removed from refchain with _Py_ForgetReference. The version of _Py_Dealloc that's active when Py_TRACE_REFS is enabled does this (_Py_Dealloc is the element of Py_DECREF that performs the actual destruction). _Py_Dealloc first calls _Py_ForgetReference to remove the object from refchain, then calls the object's destructor (op->ob_type->tp_dealloc). If WANT_SUBCLASSABLE_TYPES is not defined (it is not in my case), the destructor for mxDateTime_Type is mxDateTime_Free. So, if a DateTime object is deallocated normally, as a result of its reference count falling to zero, _Py_Dealloc is called on the object, which first removes it from refchain, then passes it to mxDateTime_Free. If a DateTime object is destroyed prematurely, as a result of invalid arguments to its destructor, the onError handler calls mxDateTime_Free, so the object is "conceptually deallocated" (placed in the free list), *but* the object is not removed from refchain. So if a refchain-membership-integrity-check is performed on the object in question or one of its immediate neighbors in refchain, that integrity check fails, leading to the fatal error. --- The solution is to 'Py_DECREF(...)' the object in the onError handler of its constructor, instead of passing the object directly to mxDateTime_Free. That change solves two problems: 1) It causes _Py_Dealloc to execute, which in turn executes _Py_ForgetReference, so the object is removed from refchain, as it should be. 2) At present, objects that are created successfully and later deallocated by normal reference count mechanics have a reference count of 0 when they enter the free list, whereas objects whose constructors abort their creation due to invalid arguments have a reference count of 1 when they enter the free list. Although AFAIK this doesn't cause an actual execution problem (because the object's reference count is *explicitly set to 1* rather than *incremented by 1* when the object is later "conceptually allocated" by _Py_NewReference), it is likely to confuse future maintainers and thereby lead to the introduction of an actual execution problem. I assume that if you agree that this is a reasonable solution, you'll want to apply the change not only to mxDateTime_FromDateAndTime, but to all similar constructors in mxDateTime.c. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From rj at maxxian.com Thu May 5 01:57:40 2005 From: rj at maxxian.com (RJ Juneau) Date: Fri Feb 10 08:25:33 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c5512e$f72798c0$6505a8c0@rjlaptop> I'm on the 30 day evaluation for mxodbc_zope_da. I'm getting the following error when I submit some queries: Error Type: KeyError Error Value: 'query' I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 with UCS4. The error seems to be caused by multiple rows being returned. I did see an earlier posting with the same error message. The response suggested a template error, but this is clearly not the case here. The additional evidence I've gathered so far: - I'm running the test directly from the ZSQL method, so there's no template involved. - If I use the same query with an additional "where" clause to ensure that only one row is returned, it works - If I use a value in the 'where' clause with no rows returned, it works - The same ZSQL query is being used on a Windows machine running Zope and the free ZODBC module without a problem - The query has been verified directly in mysql-client-browser Other info: - The database is MySQL 4.1.10A-0 - iODBC is the DB driver RJ Juneau -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050505/68d278bf/attachment-0113.htm From mal at egenix.com Thu May 5 12:37:43 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Feb 10 08:25:33 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c5512e$f72798c0$6505a8c0@rjlaptop> References: <000301c5512e$f72798c0$6505a8c0@rjlaptop> Message-ID: <4279E967.6010904@egenix.com> RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 > with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 09:37:42 2005 From: rj at maxxian.com (RJ Juneau) Date: Fri Feb 10 08:25:33 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000101c5516f$3b96de90$6505a8c0@rjlaptop> More interesting info on the problem: If I execute the query directly in the "test" window of the base eGenix mxODBC Database Connection window, it works fine and returns the 20 lines expected. That could point to a problem in the rendering, which seems to be where the traceback ends. Note that within the same Zope system I also have an ODBC connection to a Sybase database, and I have successfully tested multi-line ZSQL queries there. This is the traceback: Time 2005/05/05 07:55:15.294 GMT-4 Exception Type KeyError Exception Value 'query' Traceback (innermost last): Module ZPublisher.Publish, line 101, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 39, in call_object Module Shared.DC.ZRDB.DA, line 337, in manage_test Module DocumentTemplate.DT_String, line 474, in __call__ Module DocumentTemplate.DT_In, line 602, in renderwb Module DocumentTemplate.DT_Var, line 219, in render KeyError: 'query' I don't think the following is an issue, but I'll include it for completeness.I am also getting the following iODBC warnings and errors in the Zope console log, which are related to the ODBC parameters being passed by iODBC. Note that these errors also appear for all of the successful queries. [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (Setup). [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (UsageCount). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Timeout). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Reuse). As for the ZSQL snippet from the template... Since there's no template involved yet (I'm still testing directly from the ZSQL method), I assume you mean the SQL code? select h.host_name, s.system_name, s.system_handle, count(*) from terminal t, system_map s, host h where t.system_index = s.system_index and s.host_index = h.host_index group by s.system_name order by h.host_name Nothing complicated here. There are no parameters passed to the query. RJ -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: May 5, 2005 5:38 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: Re: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is > 2.3.4 with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ---------------------------------------------------------------------- > -- > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 16:00:32 2005 From: charlie at egenix.com (Charlie Clark) Date: Fri Feb 10 08:25:33 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000101c5516f$3b96de90$6505a8c0@rjlaptop> References: <000101c5516f$3b96de90$6505a8c0@rjlaptop> Message-ID: <20050505150032.644.1@bepc.1115296715.fake> On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base eGenix > mxODBC Database Connection window, it works fine and returns the 20 > lines expected. That could point to a problem in the rendering, which > seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection to > a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 10:22:17 2005 From: rj at maxxian.com (RJ Juneau) Date: Fri Feb 10 08:25:33 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505150032.644.1@bepc.1115296715.fake> Message-ID: <000201c55175$75bcad10$6505a8c0@rjlaptop> At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 11:47:14 2005 From: rj at maxxian.com (RJ Juneau) Date: Fri Feb 10 08:25:33 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c55181$549be0e0$6505a8c0@rjlaptop> Charlie, I found a fix. Here it is in case anyone else runs into this. You were correct - the problem is in another part of Zope. Based on your feedback, I did a bit more searching and found something here: http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. html The problem appears to be in Zope versions after 2.7.0. I'm running 2.7.6, and the post indicates that it also happens in 2.7.4. The solution: Edit file /lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. There are two lines in the file that start with . Edit them as follows: Change first line to: Change second line to: Just to be after, I shut down Zope before I made the changes and restarted it after. Thanks for the help! RJ -----Original Message----- From: RJ Juneau [mailto:rj@maxxian.com] Sent: May 5, 2005 9:22 AM To: 'Charlie Clark' Cc: 'egenix-users@lists.egenix.com' Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 17:57:25 2005 From: charlie at egenix.com (Charlie Clark) Date: Fri Feb 10 08:25:34 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <20050505165725.3380.2@bepc.1115296715.fake> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Thu May 5 09:15:21 2005 From: charlie at egenix.com (Charlie Clark) Date: Fri Feb 10 08:25:34 2006 Subject: [Zope-DB] RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <000001c55185$41477730$6b00a8c0@fonacier.local> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________ Zope-DB mailing list Zope-DB@zope.org http://mail.zope.org/mailman/listinfo/zope-db From rj at maxxian.com Thu May 5 12:38:00 2005 From: rj at maxxian.com (RJ Juneau) Date: Fri Feb 10 08:25:34 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000001c55188$6b841eb0$6505a8c0@rjlaptop> I just double-checked. Zope-2.7.6-final. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 12:49:16 2005 From: rj at maxxian.com (RJ Juneau) Date: Fri Feb 10 08:25:35 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000501c55189$fe149ba0$6505a8c0@rjlaptop> Charlie, The fix has only been applied for 2.7.7, 2.8b2. The info is in the original bug report which is closed and can be found here: http://www.zope.org/Collectors/Zope/1745 RJ -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Fri May 6 11:50:09 2005 From: rj at maxxian.com (RJ Juneau) Date: Fri Feb 10 08:25:37 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC Message-ID: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Still on eval for the product. I cannot get a stable connection to Sybase via the iODBC drivers. - The Sybase ODBC connection - including a query - have been verified at the iODBC level. - The setup is already working well for ODBC connection to MySQL. Symptoms include: - If I click on "Open Connection", it still comes back with "Connection Closed" when I go to a ZSQL method - Using 'Connect on Demand' is not working either. - Clicking "Open Connection" gives me the following error: Connection string: DSN=lixbox_sybase; UID=sa; PWD=XXXXXXX Connection pool entry: 0 Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection rejected by data source', 7952) The odbc.ini definition for DSN "lixbox_sybase" is as follows: [lixbox_sybase] JetFix = No NoRowSetSizeLimit = No Description = Test connection to listbox Options = LIXBOX DSQUERY = SQLSERVER TDSHOST = lixbox TDSPORT = 5000 TDSVER = 5.0 SQLSERVER_CATALOG = N CURSOR_SENSITIVITY = LOW UserName = sa Password = XXXXXXXX ServerType = Sybase 10/11/12 Driver = /opt/openlink/lib/sql_mt_lt.so Database = pubs2 ReadOnly = no NoAutoCommit = No NoLoginBox = No FetchBufferSize = 60 Other relevant data: - Connecting via OpenLink's iODBC - Zope 2.7.6-final - Python 2.3.4 - Connection to Sybase has been successfully tested with iODBC, including issuing a query - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC connection RJ Juneau Chief Technology Officer Maxxian Integration Inc. 155 Westhampton Drive Thornhill, Ontario Canada L4J 7X2 E-mail: rj@maxxian.com Phone: +1 905 482 9429 Cell: +1 416 897 6682 Toll free: +1 866 758 9161 Fax: +1 647 722 2038 -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050506/aef33361/attachment-0113.htm From mal at egenix.com Fri May 6 18:27:37 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Feb 10 08:25:37 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC In-Reply-To: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> References: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Message-ID: <427B8CE9.1010601@egenix.com> RJ Juneau wrote: > Still on eval for the product. > > I cannot get a stable connection to Sybase via the iODBC drivers. > > - The Sybase ODBC connection - including a query - have been verified at > the iODBC level. > - The setup is already working well for ODBC connection to MySQL. > > Symptoms include: > > - If I click on "Open Connection", it still comes back with "Connection > Closed" when I go to a ZSQL method > - Using 'Connect on Demand' is not working either. > - Clicking "Open Connection" gives me the following error: > > Connection string: DSN=lixbox_sybase; > UID=sa; > PWD=XXXXXXX Try writing the connection string on one line and without whitespace. ODBC drivers sometimes have problems with this. > Connection pool entry: 0 > Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection > rejected by data source', 7952) This is a generic error that relates to authentication or firewall problems. It is possible that turning on ODBC tracing the ODBC manager will give more clues as to the real cause of the problem. > The odbc.ini definition for DSN "lixbox_sybase" is as follows: > > [lixbox_sybase] > JetFix = No > NoRowSetSizeLimit = No > Description = Test connection to listbox > Options = LIXBOX > DSQUERY = SQLSERVER > TDSHOST = lixbox > TDSPORT = 5000 > TDSVER = 5.0 > SQLSERVER_CATALOG = N > CURSOR_SENSITIVITY = LOW > UserName = sa > Password = XXXXXXXX > ServerType = Sybase 10/11/12 > Driver = /opt/openlink/lib/sql_mt_lt.so > Database = pubs2 > ReadOnly = no > NoAutoCommit = No > NoLoginBox = No > FetchBufferSize = 60 > > > Other relevant data: > - Connecting via OpenLink's iODBC > - Zope 2.7.6-final > - Python 2.3.4 > - Connection to Sybase has been successfully tested with iODBC, > including issuing a query > - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC > connection > > > > RJ Juneau > Chief Technology Officer > Maxxian Integration Inc. > 155 Westhampton Drive > Thornhill, Ontario > Canada L4J 7X2 > E-mail: rj@maxxian.com > Phone: +1 905 482 9429 > Cell: +1 416 897 6682 > Toll free: +1 866 758 9161 > Fax: +1 647 722 2038 > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 06 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From calisp at gmail.com Sun May 15 23:49:03 2005 From: calisp at gmail.com (calisp@gmail.com) Date: Fri Feb 10 08:25:38 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK Message-ID: Hi, I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the following error... 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the last phase of a two-phase commit. This shouldn't happen. Traceback (most recent call last): File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one jar.tpc_finish(self) File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish try: self._finish() File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could not perform COMMIT or ROLLBACK', 1023) What could be causing this? Can I get the mxODBCZopeDA source from somewhere? It would make debugging this much easier. Thanks, Calisp. From mal at egenix.com Mon May 16 13:52:12 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Feb 10 08:25:38 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK In-Reply-To: References: Message-ID: <42887B5C.4010109@egenix.com> calisp@gmail.com wrote: > Hi, > > I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with > unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the > following error... > > 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the > last phase of a two-phase commit. This shouldn't happen. > Traceback (most recent call last): > File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one > jar.tpc_finish(self) > File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish > try: self._finish() > File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish > File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler > ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could > not perform COMMIT or ROLLBACK', 1023) You should have a look at the database logs to see what prevented the commit from being completed. > What could be causing this? Hard to say: mxODBCZopeDA is trying to commit the transaction, but the driver or database failed to complete the request. The above error was generated by the ODBC driver. This could be network or DNS problems, or be related to a bug in FreeTDS (which is getting more stable with every new release, but should still be considered beta quality software at the moment). > Can I get the mxODBCZopeDA source from > somewhere? It would make debugging this much easier. Getting the source is not an option and won't help much either since the source of the problem is not mxODBCZopeDA. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 16 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Sun May 1 21:29:25 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Feb 10 12:04:07 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <427259F3.4090806@egenix.com> References: <20050427130906.52878.qmail@web30008.mail.mud.yahoo.com> <427259F3.4090806@egenix.com> Message-ID: <42752005.7080904@egenix.com> M.-A. Lemburg wrote: > David Rushby wrote: > >> --- "M.-A. Lemburg" wrote: >> >>> Are you using the standard mxDateTime build or one >>> with WANT_SUBCLASSABLE_TYPES defined... >> >> >> >> Presumably "the standard", since I just built with 'py24d setup.py >> build', making no attempt to enable special directives. >> >> >>> ... (mxDateTime_Deallocate is only used by the latter)? >> >> >> >> That's true in 2.1.0-2005-04-15, but not in 2.1.0b5. >> >> >>> In any case, please try our latest snapshot: >>> >>> >> >> http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-04-15.zip >> >>> to see if that makes any difference. >> >> >> >> I can't build it out of the box: > > > Hmm, looks like distutils' sdist command doesn't like our new > repository layout which uses symlinks (after we've switched to > subversion). > > We'll have to debug distutils first, I guess :-( Ok, we've found the problem and fixed it. Here's the new release (which does build out of the box at least on our boxes ;-): http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 01 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From davidrushby at yahoo.com Mon May 2 15:49:53 2005 From: davidrushby at yahoo.com (David Rushby) Date: Fri Feb 10 12:04:07 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Ok, we've found the problem and fixed it. Here's the new > release (which does build out of the box at least on our > boxes ;-): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip It does build now, but: py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" still behaves as it did when I submitted my original message: Fatal Python error: UNREF invalid object Aborted This is the same debug build of Python 2.4.1 that I was previously using, running the same configuration (CentOS Linux 4.0/i386, everything compiled with GCC 3.4.3). Have you examined my original claim as to the cause of the bug? __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 10:21:55 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Feb 10 12:04:08 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> References: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> Message-ID: <42772693.8050306@egenix.com> David Rushby wrote: > --- "M.-A. Lemburg" wrote: > >>Ok, we've found the problem and fixed it. Here's the new >>release (which does build out of the box at least on our >>boxes ;-): >> >> > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip > > It does build now, but: > py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" > still behaves as it did when I submitted my original message: > Fatal Python error: UNREF invalid object > Aborted > > This is the same debug build of Python 2.4.1 that I was previously > using, running the same configuration (CentOS Linux 4.0/i386, > everything compiled with GCC 3.4.3). > > Have you examined my original claim as to the cause of the bug? No. We haven't had time for looking into it. I'm not sure whether your analysis of the problem is correct: if you don't define WANT_SUBCLASSABLE_TYPES, the API mxDateTime_Deallocate() is neither defined nor used. Furthermore, PyObject_Del() is only called by mxDateTime_Free() if you have explicitely edited mxDateTime.c to disabled the free list #defines. In a standard build, PyObject_Del() is only called at module finalization time. Note that the reason we call mxDateTime_Free() in the constructor is that we don't want the destructor of the object to be called. Py_DECREF() would call the destructor (mxDateTime_Deallocate). It is possible that the debug code in Python complains about the refcount in the object not being 0 at the time the object is finalized (module finalization time), but I don't see any such checks in PyObject_Free() (which is what PyObject_Del() maps to). Again, all of this does not happen in regular non-debug Python builds. Please be aware that we don't support debug builds, so fixing the problem (if there is one - gcc has some serious optimization problems on some combinations of platform and version) will take a while. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 09:27:37 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Fri Feb 10 12:04:08 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 Message-ID: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Hi all- I am trying to build the mx-base package, v.2.0.6. This will be used with postgresql 7.3.9, psycopg 1.1.18, and Roundup 0.8.2. RHEL 3.0 Python 2.3 egenix-mx-base-2.0.6.tar.gz I performed a: /usr/local/bin/python2.3 setup.py install Everything looks proper with the exeception of this series of warning statements: ----------------- gcc -pthread -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fno-strict-aliasing -fPIC -Imx/BeeBase/mxBeeBase -I/usr/local/incl ude/python2.3 -I/usr/local/include -c mx/BeeBase/mxBeeBase/btr.c -o build/temp.linux-i686-2.3/mx/BeeBase/mxBeeBase/mxBeeBa se/mx/BeeBase/mxBeeBase/btr.o mx/BeeBase/mxBeeBase/btr.c: In function `dumpBuf': mx/BeeBase/mxBeeBase/btr.c:249: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:250: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:255: warning: unsigned int format, long unsigned int arg (arg 4) mx/BeeBase/mxBeeBase/btr.c:256: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c: In function `_validateTree': mx/BeeBase/mxBeeBase/btr.c:330: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:337: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:339: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:349: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:351: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 3) creating build/lib.linux-i686-2.3/mx/BeeBase creating build/lib.linux-i686-2.3/mx/BeeBase/mxBeeBase -------------- Would someone be kind enough to let me know whether these messages were expected, and if not, how I might resolve these? Thanks! DC __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 22:06:33 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Feb 10 12:04:08 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> References: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Message-ID: <4277CBB9.8020302@egenix.com> Dianne Chen wrote: > Hi all- > > I am trying to build the mx-base package, v.2.0.6. > This will be used with postgresql 7.3.9, psycopg > 1.1.18, and Roundup 0.8.2. > > RHEL 3.0 > Python 2.3 > egenix-mx-base-2.0.6.tar.gz > > I performed a: > > /usr/local/bin/python2.3 setup.py install > > Everything looks proper with the exeception of this > series of warning statements: > > ----------------- > ... > -------------- > > Would someone be kind enough to let me know whether > these messages were expected, and if not, how I might > resolve these? These warning can safely be ignored. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 13:41:14 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Fri Feb 10 12:04:08 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: 6667 Message-ID: <20050503194114.72091.qmail@web31414.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Dianne Chen wrote: > > Hi all- > > > > I am trying to build the mx-base package, v.2.0.6. > > This will be used with postgresql 7.3.9, psycopg > > 1.1.18, and Roundup 0.8.2. > > > > RHEL 3.0 > > Python 2.3 > > egenix-mx-base-2.0.6.tar.gz > > > > I performed a: > > > > /usr/local/bin/python2.3 setup.py install > > > > Everything looks proper with the exeception of > this > > series of warning statements: > > > > ----------------- > > ... > > -------------- > > > > Would someone be kind enough to let me know > whether > > these messages were expected, and if not, how I > might > > resolve these? > > These warning can safely be ignored. > > -- > Marc-Andre Lemburg > eGenix.com > Marc- Thank you very much for the reply. It helps greatly. With kind regards, DC __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From davidrushby at yahoo.com Tue May 3 17:18:46 2005 From: davidrushby at yahoo.com (David Rushby) Date: Fri Feb 10 12:04:08 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050503231846.35012.qmail@web30009.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > I'm not sure whether your analysis of the problem is correct... Indeed, my original analysis wasn't correct; I think this one is. The fatal error I'm complaining about only arises if the arguments to DateTime.DateTime are invalid, so that the object is deallocated in the onError block of mxDateTime_FromDateAndTime. If the object is created successfully, and later deallocated by Python's garbage collector, the fatal error doesn't arise. Here's my analysis of the problem: --- If the debugging directive Py_TRACE_REFS is enabled, as it is in my case, the Python interpreter maintains a doubly linked list of all Python objects (named refchain) via the _ob_next and _ob_prev pointers added to PyObject via _PyObject_HEAD_EXTRA. Each object is inserted into refchain by the _Py_AddToAllObjects call in _Py_NewReference, and removed from refchain by the _Py_ForgetReference call in _Py_Dealloc. _Py_ForgetReference performs an integrity check on the object being deallocated (op) to make sure that its neighbors in refchain recognize it. Specifically, _Py_ForgetReference verifies that the _ob_next pointer of the previous object in refchain (op->_ob_prev->_ob_next) points to op, and that the _ob_prev pointer of the next object in refchain (op->_ob_next->_ob_prev) points to op. If either of those conditions is false, the interpreter raises the fatal error I'm seeing. After mxDateTime_New pulls an mxDateTimeObject out of the free list, it calls _Py_NewReference on that object to transform it from a "conceptually deallocated" object to a "conceptually allocated" one. _Py_NewReference inserts the object into refchain. Later, when the object is being "conceptually deallocated", it should be removed from refchain with _Py_ForgetReference. The version of _Py_Dealloc that's active when Py_TRACE_REFS is enabled does this (_Py_Dealloc is the element of Py_DECREF that performs the actual destruction). _Py_Dealloc first calls _Py_ForgetReference to remove the object from refchain, then calls the object's destructor (op->ob_type->tp_dealloc). If WANT_SUBCLASSABLE_TYPES is not defined (it is not in my case), the destructor for mxDateTime_Type is mxDateTime_Free. So, if a DateTime object is deallocated normally, as a result of its reference count falling to zero, _Py_Dealloc is called on the object, which first removes it from refchain, then passes it to mxDateTime_Free. If a DateTime object is destroyed prematurely, as a result of invalid arguments to its destructor, the onError handler calls mxDateTime_Free, so the object is "conceptually deallocated" (placed in the free list), *but* the object is not removed from refchain. So if a refchain-membership-integrity-check is performed on the object in question or one of its immediate neighbors in refchain, that integrity check fails, leading to the fatal error. --- The solution is to 'Py_DECREF(...)' the object in the onError handler of its constructor, instead of passing the object directly to mxDateTime_Free. That change solves two problems: 1) It causes _Py_Dealloc to execute, which in turn executes _Py_ForgetReference, so the object is removed from refchain, as it should be. 2) At present, objects that are created successfully and later deallocated by normal reference count mechanics have a reference count of 0 when they enter the free list, whereas objects whose constructors abort their creation due to invalid arguments have a reference count of 1 when they enter the free list. Although AFAIK this doesn't cause an actual execution problem (because the object's reference count is *explicitly set to 1* rather than *incremented by 1* when the object is later "conceptually allocated" by _Py_NewReference), it is likely to confuse future maintainers and thereby lead to the introduction of an actual execution problem. I assume that if you agree that this is a reasonable solution, you'll want to apply the change not only to mxDateTime_FromDateAndTime, but to all similar constructors in mxDateTime.c. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From rj at maxxian.com Thu May 5 01:57:40 2005 From: rj at maxxian.com (RJ Juneau) Date: Fri Feb 10 12:04:08 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c5512e$f72798c0$6505a8c0@rjlaptop> I'm on the 30 day evaluation for mxodbc_zope_da. I'm getting the following error when I submit some queries: Error Type: KeyError Error Value: 'query' I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 with UCS4. The error seems to be caused by multiple rows being returned. I did see an earlier posting with the same error message. The response suggested a template error, but this is clearly not the case here. The additional evidence I've gathered so far: - I'm running the test directly from the ZSQL method, so there's no template involved. - If I use the same query with an additional "where" clause to ensure that only one row is returned, it works - If I use a value in the 'where' clause with no rows returned, it works - The same ZSQL query is being used on a Windows machine running Zope and the free ZODBC module without a problem - The query has been verified directly in mysql-client-browser Other info: - The database is MySQL 4.1.10A-0 - iODBC is the DB driver RJ Juneau -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050505/68d278bf/attachment-0114.htm From mal at egenix.com Thu May 5 12:37:43 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Feb 10 12:04:08 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c5512e$f72798c0$6505a8c0@rjlaptop> References: <000301c5512e$f72798c0$6505a8c0@rjlaptop> Message-ID: <4279E967.6010904@egenix.com> RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 > with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 09:37:42 2005 From: rj at maxxian.com (RJ Juneau) Date: Fri Feb 10 12:04:09 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000101c5516f$3b96de90$6505a8c0@rjlaptop> More interesting info on the problem: If I execute the query directly in the "test" window of the base eGenix mxODBC Database Connection window, it works fine and returns the 20 lines expected. That could point to a problem in the rendering, which seems to be where the traceback ends. Note that within the same Zope system I also have an ODBC connection to a Sybase database, and I have successfully tested multi-line ZSQL queries there. This is the traceback: Time 2005/05/05 07:55:15.294 GMT-4 Exception Type KeyError Exception Value 'query' Traceback (innermost last): Module ZPublisher.Publish, line 101, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 39, in call_object Module Shared.DC.ZRDB.DA, line 337, in manage_test Module DocumentTemplate.DT_String, line 474, in __call__ Module DocumentTemplate.DT_In, line 602, in renderwb Module DocumentTemplate.DT_Var, line 219, in render KeyError: 'query' I don't think the following is an issue, but I'll include it for completeness.I am also getting the following iODBC warnings and errors in the Zope console log, which are related to the ODBC parameters being passed by iODBC. Note that these errors also appear for all of the successful queries. [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (Setup). [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (UsageCount). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Timeout). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Reuse). As for the ZSQL snippet from the template... Since there's no template involved yet (I'm still testing directly from the ZSQL method), I assume you mean the SQL code? select h.host_name, s.system_name, s.system_handle, count(*) from terminal t, system_map s, host h where t.system_index = s.system_index and s.host_index = h.host_index group by s.system_name order by h.host_name Nothing complicated here. There are no parameters passed to the query. RJ -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: May 5, 2005 5:38 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: Re: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is > 2.3.4 with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ---------------------------------------------------------------------- > -- > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 16:00:32 2005 From: charlie at egenix.com (Charlie Clark) Date: Fri Feb 10 12:04:09 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000101c5516f$3b96de90$6505a8c0@rjlaptop> References: <000101c5516f$3b96de90$6505a8c0@rjlaptop> Message-ID: <20050505150032.644.1@bepc.1115296715.fake> On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base eGenix > mxODBC Database Connection window, it works fine and returns the 20 > lines expected. That could point to a problem in the rendering, which > seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection to > a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 10:22:17 2005 From: rj at maxxian.com (RJ Juneau) Date: Fri Feb 10 12:04:09 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505150032.644.1@bepc.1115296715.fake> Message-ID: <000201c55175$75bcad10$6505a8c0@rjlaptop> At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 11:47:14 2005 From: rj at maxxian.com (RJ Juneau) Date: Fri Feb 10 12:04:09 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c55181$549be0e0$6505a8c0@rjlaptop> Charlie, I found a fix. Here it is in case anyone else runs into this. You were correct - the problem is in another part of Zope. Based on your feedback, I did a bit more searching and found something here: http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. html The problem appears to be in Zope versions after 2.7.0. I'm running 2.7.6, and the post indicates that it also happens in 2.7.4. The solution: Edit file /lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. There are two lines in the file that start with . Edit them as follows: Change first line to: Change second line to: Just to be after, I shut down Zope before I made the changes and restarted it after. Thanks for the help! RJ -----Original Message----- From: RJ Juneau [mailto:rj@maxxian.com] Sent: May 5, 2005 9:22 AM To: 'Charlie Clark' Cc: 'egenix-users@lists.egenix.com' Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 17:57:25 2005 From: charlie at egenix.com (Charlie Clark) Date: Fri Feb 10 12:04:09 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <20050505165725.3380.2@bepc.1115296715.fake> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Thu May 5 09:15:21 2005 From: charlie at egenix.com (Charlie Clark) Date: Fri Feb 10 12:04:09 2006 Subject: [Zope-DB] RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <000001c55185$41477730$6b00a8c0@fonacier.local> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________ Zope-DB mailing list Zope-DB@zope.org http://mail.zope.org/mailman/listinfo/zope-db From rj at maxxian.com Thu May 5 12:38:00 2005 From: rj at maxxian.com (RJ Juneau) Date: Fri Feb 10 12:04:10 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000001c55188$6b841eb0$6505a8c0@rjlaptop> I just double-checked. Zope-2.7.6-final. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 12:49:16 2005 From: rj at maxxian.com (RJ Juneau) Date: Fri Feb 10 12:04:10 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000501c55189$fe149ba0$6505a8c0@rjlaptop> Charlie, The fix has only been applied for 2.7.7, 2.8b2. The info is in the original bug report which is closed and can be found here: http://www.zope.org/Collectors/Zope/1745 RJ -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Fri May 6 11:50:09 2005 From: rj at maxxian.com (RJ Juneau) Date: Fri Feb 10 12:04:10 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC Message-ID: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Still on eval for the product. I cannot get a stable connection to Sybase via the iODBC drivers. - The Sybase ODBC connection - including a query - have been verified at the iODBC level. - The setup is already working well for ODBC connection to MySQL. Symptoms include: - If I click on "Open Connection", it still comes back with "Connection Closed" when I go to a ZSQL method - Using 'Connect on Demand' is not working either. - Clicking "Open Connection" gives me the following error: Connection string: DSN=lixbox_sybase; UID=sa; PWD=XXXXXXX Connection pool entry: 0 Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection rejected by data source', 7952) The odbc.ini definition for DSN "lixbox_sybase" is as follows: [lixbox_sybase] JetFix = No NoRowSetSizeLimit = No Description = Test connection to listbox Options = LIXBOX DSQUERY = SQLSERVER TDSHOST = lixbox TDSPORT = 5000 TDSVER = 5.0 SQLSERVER_CATALOG = N CURSOR_SENSITIVITY = LOW UserName = sa Password = XXXXXXXX ServerType = Sybase 10/11/12 Driver = /opt/openlink/lib/sql_mt_lt.so Database = pubs2 ReadOnly = no NoAutoCommit = No NoLoginBox = No FetchBufferSize = 60 Other relevant data: - Connecting via OpenLink's iODBC - Zope 2.7.6-final - Python 2.3.4 - Connection to Sybase has been successfully tested with iODBC, including issuing a query - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC connection RJ Juneau Chief Technology Officer Maxxian Integration Inc. 155 Westhampton Drive Thornhill, Ontario Canada L4J 7X2 E-mail: rj@maxxian.com Phone: +1 905 482 9429 Cell: +1 416 897 6682 Toll free: +1 866 758 9161 Fax: +1 647 722 2038 -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050506/aef33361/attachment-0114.htm From mal at egenix.com Fri May 6 18:27:37 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Feb 10 12:04:10 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC In-Reply-To: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> References: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Message-ID: <427B8CE9.1010601@egenix.com> RJ Juneau wrote: > Still on eval for the product. > > I cannot get a stable connection to Sybase via the iODBC drivers. > > - The Sybase ODBC connection - including a query - have been verified at > the iODBC level. > - The setup is already working well for ODBC connection to MySQL. > > Symptoms include: > > - If I click on "Open Connection", it still comes back with "Connection > Closed" when I go to a ZSQL method > - Using 'Connect on Demand' is not working either. > - Clicking "Open Connection" gives me the following error: > > Connection string: DSN=lixbox_sybase; > UID=sa; > PWD=XXXXXXX Try writing the connection string on one line and without whitespace. ODBC drivers sometimes have problems with this. > Connection pool entry: 0 > Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection > rejected by data source', 7952) This is a generic error that relates to authentication or firewall problems. It is possible that turning on ODBC tracing the ODBC manager will give more clues as to the real cause of the problem. > The odbc.ini definition for DSN "lixbox_sybase" is as follows: > > [lixbox_sybase] > JetFix = No > NoRowSetSizeLimit = No > Description = Test connection to listbox > Options = LIXBOX > DSQUERY = SQLSERVER > TDSHOST = lixbox > TDSPORT = 5000 > TDSVER = 5.0 > SQLSERVER_CATALOG = N > CURSOR_SENSITIVITY = LOW > UserName = sa > Password = XXXXXXXX > ServerType = Sybase 10/11/12 > Driver = /opt/openlink/lib/sql_mt_lt.so > Database = pubs2 > ReadOnly = no > NoAutoCommit = No > NoLoginBox = No > FetchBufferSize = 60 > > > Other relevant data: > - Connecting via OpenLink's iODBC > - Zope 2.7.6-final > - Python 2.3.4 > - Connection to Sybase has been successfully tested with iODBC, > including issuing a query > - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC > connection > > > > RJ Juneau > Chief Technology Officer > Maxxian Integration Inc. > 155 Westhampton Drive > Thornhill, Ontario > Canada L4J 7X2 > E-mail: rj@maxxian.com > Phone: +1 905 482 9429 > Cell: +1 416 897 6682 > Toll free: +1 866 758 9161 > Fax: +1 647 722 2038 > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 06 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From calisp at gmail.com Sun May 15 23:49:03 2005 From: calisp at gmail.com (calisp@gmail.com) Date: Fri Feb 10 12:04:10 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK Message-ID: Hi, I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the following error... 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the last phase of a two-phase commit. This shouldn't happen. Traceback (most recent call last): File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one jar.tpc_finish(self) File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish try: self._finish() File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could not perform COMMIT or ROLLBACK', 1023) What could be causing this? Can I get the mxODBCZopeDA source from somewhere? It would make debugging this much easier. Thanks, Calisp. From mal at egenix.com Mon May 16 13:52:12 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Feb 10 12:04:12 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK In-Reply-To: References: Message-ID: <42887B5C.4010109@egenix.com> calisp@gmail.com wrote: > Hi, > > I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with > unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the > following error... > > 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the > last phase of a two-phase commit. This shouldn't happen. > Traceback (most recent call last): > File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one > jar.tpc_finish(self) > File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish > try: self._finish() > File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish > File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler > ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could > not perform COMMIT or ROLLBACK', 1023) You should have a look at the database logs to see what prevented the commit from being completed. > What could be causing this? Hard to say: mxODBCZopeDA is trying to commit the transaction, but the driver or database failed to complete the request. The above error was generated by the ODBC driver. This could be network or DNS problems, or be related to a bug in FreeTDS (which is getting more stable with every new release, but should still be considered beta quality software at the moment). > Can I get the mxODBCZopeDA source from > somewhere? It would make debugging this much easier. Getting the source is not an option and won't help much either since the source of the problem is not mxODBCZopeDA. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 16 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Sun May 1 21:29:25 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Feb 10 16:01:24 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <427259F3.4090806@egenix.com> References: <20050427130906.52878.qmail@web30008.mail.mud.yahoo.com> <427259F3.4090806@egenix.com> Message-ID: <42752005.7080904@egenix.com> M.-A. Lemburg wrote: > David Rushby wrote: > >> --- "M.-A. Lemburg" wrote: >> >>> Are you using the standard mxDateTime build or one >>> with WANT_SUBCLASSABLE_TYPES defined... >> >> >> >> Presumably "the standard", since I just built with 'py24d setup.py >> build', making no attempt to enable special directives. >> >> >>> ... (mxDateTime_Deallocate is only used by the latter)? >> >> >> >> That's true in 2.1.0-2005-04-15, but not in 2.1.0b5. >> >> >>> In any case, please try our latest snapshot: >>> >>> >> >> http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-04-15.zip >> >>> to see if that makes any difference. >> >> >> >> I can't build it out of the box: > > > Hmm, looks like distutils' sdist command doesn't like our new > repository layout which uses symlinks (after we've switched to > subversion). > > We'll have to debug distutils first, I guess :-( Ok, we've found the problem and fixed it. Here's the new release (which does build out of the box at least on our boxes ;-): http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 01 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From davidrushby at yahoo.com Mon May 2 15:49:53 2005 From: davidrushby at yahoo.com (David Rushby) Date: Fri Feb 10 16:01:24 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Ok, we've found the problem and fixed it. Here's the new > release (which does build out of the box at least on our > boxes ;-): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip It does build now, but: py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" still behaves as it did when I submitted my original message: Fatal Python error: UNREF invalid object Aborted This is the same debug build of Python 2.4.1 that I was previously using, running the same configuration (CentOS Linux 4.0/i386, everything compiled with GCC 3.4.3). Have you examined my original claim as to the cause of the bug? __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 10:21:55 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Feb 10 16:01:24 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> References: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> Message-ID: <42772693.8050306@egenix.com> David Rushby wrote: > --- "M.-A. Lemburg" wrote: > >>Ok, we've found the problem and fixed it. Here's the new >>release (which does build out of the box at least on our >>boxes ;-): >> >> > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip > > It does build now, but: > py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" > still behaves as it did when I submitted my original message: > Fatal Python error: UNREF invalid object > Aborted > > This is the same debug build of Python 2.4.1 that I was previously > using, running the same configuration (CentOS Linux 4.0/i386, > everything compiled with GCC 3.4.3). > > Have you examined my original claim as to the cause of the bug? No. We haven't had time for looking into it. I'm not sure whether your analysis of the problem is correct: if you don't define WANT_SUBCLASSABLE_TYPES, the API mxDateTime_Deallocate() is neither defined nor used. Furthermore, PyObject_Del() is only called by mxDateTime_Free() if you have explicitely edited mxDateTime.c to disabled the free list #defines. In a standard build, PyObject_Del() is only called at module finalization time. Note that the reason we call mxDateTime_Free() in the constructor is that we don't want the destructor of the object to be called. Py_DECREF() would call the destructor (mxDateTime_Deallocate). It is possible that the debug code in Python complains about the refcount in the object not being 0 at the time the object is finalized (module finalization time), but I don't see any such checks in PyObject_Free() (which is what PyObject_Del() maps to). Again, all of this does not happen in regular non-debug Python builds. Please be aware that we don't support debug builds, so fixing the problem (if there is one - gcc has some serious optimization problems on some combinations of platform and version) will take a while. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 09:27:37 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Fri Feb 10 16:01:24 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 Message-ID: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Hi all- I am trying to build the mx-base package, v.2.0.6. This will be used with postgresql 7.3.9, psycopg 1.1.18, and Roundup 0.8.2. RHEL 3.0 Python 2.3 egenix-mx-base-2.0.6.tar.gz I performed a: /usr/local/bin/python2.3 setup.py install Everything looks proper with the exeception of this series of warning statements: ----------------- gcc -pthread -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fno-strict-aliasing -fPIC -Imx/BeeBase/mxBeeBase -I/usr/local/incl ude/python2.3 -I/usr/local/include -c mx/BeeBase/mxBeeBase/btr.c -o build/temp.linux-i686-2.3/mx/BeeBase/mxBeeBase/mxBeeBa se/mx/BeeBase/mxBeeBase/btr.o mx/BeeBase/mxBeeBase/btr.c: In function `dumpBuf': mx/BeeBase/mxBeeBase/btr.c:249: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:250: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:255: warning: unsigned int format, long unsigned int arg (arg 4) mx/BeeBase/mxBeeBase/btr.c:256: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c: In function `_validateTree': mx/BeeBase/mxBeeBase/btr.c:330: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:337: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:339: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:349: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:351: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 3) creating build/lib.linux-i686-2.3/mx/BeeBase creating build/lib.linux-i686-2.3/mx/BeeBase/mxBeeBase -------------- Would someone be kind enough to let me know whether these messages were expected, and if not, how I might resolve these? Thanks! DC __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 22:06:33 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Feb 10 16:01:24 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> References: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Message-ID: <4277CBB9.8020302@egenix.com> Dianne Chen wrote: > Hi all- > > I am trying to build the mx-base package, v.2.0.6. > This will be used with postgresql 7.3.9, psycopg > 1.1.18, and Roundup 0.8.2. > > RHEL 3.0 > Python 2.3 > egenix-mx-base-2.0.6.tar.gz > > I performed a: > > /usr/local/bin/python2.3 setup.py install > > Everything looks proper with the exeception of this > series of warning statements: > > ----------------- > ... > -------------- > > Would someone be kind enough to let me know whether > these messages were expected, and if not, how I might > resolve these? These warning can safely be ignored. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 13:41:14 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Fri Feb 10 16:01:24 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: 6667 Message-ID: <20050503194114.72091.qmail@web31414.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Dianne Chen wrote: > > Hi all- > > > > I am trying to build the mx-base package, v.2.0.6. > > This will be used with postgresql 7.3.9, psycopg > > 1.1.18, and Roundup 0.8.2. > > > > RHEL 3.0 > > Python 2.3 > > egenix-mx-base-2.0.6.tar.gz > > > > I performed a: > > > > /usr/local/bin/python2.3 setup.py install > > > > Everything looks proper with the exeception of > this > > series of warning statements: > > > > ----------------- > > ... > > -------------- > > > > Would someone be kind enough to let me know > whether > > these messages were expected, and if not, how I > might > > resolve these? > > These warning can safely be ignored. > > -- > Marc-Andre Lemburg > eGenix.com > Marc- Thank you very much for the reply. It helps greatly. With kind regards, DC __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From davidrushby at yahoo.com Tue May 3 17:18:46 2005 From: davidrushby at yahoo.com (David Rushby) Date: Fri Feb 10 16:01:24 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050503231846.35012.qmail@web30009.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > I'm not sure whether your analysis of the problem is correct... Indeed, my original analysis wasn't correct; I think this one is. The fatal error I'm complaining about only arises if the arguments to DateTime.DateTime are invalid, so that the object is deallocated in the onError block of mxDateTime_FromDateAndTime. If the object is created successfully, and later deallocated by Python's garbage collector, the fatal error doesn't arise. Here's my analysis of the problem: --- If the debugging directive Py_TRACE_REFS is enabled, as it is in my case, the Python interpreter maintains a doubly linked list of all Python objects (named refchain) via the _ob_next and _ob_prev pointers added to PyObject via _PyObject_HEAD_EXTRA. Each object is inserted into refchain by the _Py_AddToAllObjects call in _Py_NewReference, and removed from refchain by the _Py_ForgetReference call in _Py_Dealloc. _Py_ForgetReference performs an integrity check on the object being deallocated (op) to make sure that its neighbors in refchain recognize it. Specifically, _Py_ForgetReference verifies that the _ob_next pointer of the previous object in refchain (op->_ob_prev->_ob_next) points to op, and that the _ob_prev pointer of the next object in refchain (op->_ob_next->_ob_prev) points to op. If either of those conditions is false, the interpreter raises the fatal error I'm seeing. After mxDateTime_New pulls an mxDateTimeObject out of the free list, it calls _Py_NewReference on that object to transform it from a "conceptually deallocated" object to a "conceptually allocated" one. _Py_NewReference inserts the object into refchain. Later, when the object is being "conceptually deallocated", it should be removed from refchain with _Py_ForgetReference. The version of _Py_Dealloc that's active when Py_TRACE_REFS is enabled does this (_Py_Dealloc is the element of Py_DECREF that performs the actual destruction). _Py_Dealloc first calls _Py_ForgetReference to remove the object from refchain, then calls the object's destructor (op->ob_type->tp_dealloc). If WANT_SUBCLASSABLE_TYPES is not defined (it is not in my case), the destructor for mxDateTime_Type is mxDateTime_Free. So, if a DateTime object is deallocated normally, as a result of its reference count falling to zero, _Py_Dealloc is called on the object, which first removes it from refchain, then passes it to mxDateTime_Free. If a DateTime object is destroyed prematurely, as a result of invalid arguments to its destructor, the onError handler calls mxDateTime_Free, so the object is "conceptually deallocated" (placed in the free list), *but* the object is not removed from refchain. So if a refchain-membership-integrity-check is performed on the object in question or one of its immediate neighbors in refchain, that integrity check fails, leading to the fatal error. --- The solution is to 'Py_DECREF(...)' the object in the onError handler of its constructor, instead of passing the object directly to mxDateTime_Free. That change solves two problems: 1) It causes _Py_Dealloc to execute, which in turn executes _Py_ForgetReference, so the object is removed from refchain, as it should be. 2) At present, objects that are created successfully and later deallocated by normal reference count mechanics have a reference count of 0 when they enter the free list, whereas objects whose constructors abort their creation due to invalid arguments have a reference count of 1 when they enter the free list. Although AFAIK this doesn't cause an actual execution problem (because the object's reference count is *explicitly set to 1* rather than *incremented by 1* when the object is later "conceptually allocated" by _Py_NewReference), it is likely to confuse future maintainers and thereby lead to the introduction of an actual execution problem. I assume that if you agree that this is a reasonable solution, you'll want to apply the change not only to mxDateTime_FromDateAndTime, but to all similar constructors in mxDateTime.c. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From rj at maxxian.com Thu May 5 01:57:40 2005 From: rj at maxxian.com (RJ Juneau) Date: Fri Feb 10 16:01:24 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c5512e$f72798c0$6505a8c0@rjlaptop> I'm on the 30 day evaluation for mxodbc_zope_da. I'm getting the following error when I submit some queries: Error Type: KeyError Error Value: 'query' I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 with UCS4. The error seems to be caused by multiple rows being returned. I did see an earlier posting with the same error message. The response suggested a template error, but this is clearly not the case here. The additional evidence I've gathered so far: - I'm running the test directly from the ZSQL method, so there's no template involved. - If I use the same query with an additional "where" clause to ensure that only one row is returned, it works - If I use a value in the 'where' clause with no rows returned, it works - The same ZSQL query is being used on a Windows machine running Zope and the free ZODBC module without a problem - The query has been verified directly in mysql-client-browser Other info: - The database is MySQL 4.1.10A-0 - iODBC is the DB driver RJ Juneau -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050505/68d278bf/attachment-0115.htm From mal at egenix.com Thu May 5 12:37:43 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Feb 10 16:01:24 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c5512e$f72798c0$6505a8c0@rjlaptop> References: <000301c5512e$f72798c0$6505a8c0@rjlaptop> Message-ID: <4279E967.6010904@egenix.com> RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 > with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 09:37:42 2005 From: rj at maxxian.com (RJ Juneau) Date: Fri Feb 10 16:01:24 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000101c5516f$3b96de90$6505a8c0@rjlaptop> More interesting info on the problem: If I execute the query directly in the "test" window of the base eGenix mxODBC Database Connection window, it works fine and returns the 20 lines expected. That could point to a problem in the rendering, which seems to be where the traceback ends. Note that within the same Zope system I also have an ODBC connection to a Sybase database, and I have successfully tested multi-line ZSQL queries there. This is the traceback: Time 2005/05/05 07:55:15.294 GMT-4 Exception Type KeyError Exception Value 'query' Traceback (innermost last): Module ZPublisher.Publish, line 101, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 39, in call_object Module Shared.DC.ZRDB.DA, line 337, in manage_test Module DocumentTemplate.DT_String, line 474, in __call__ Module DocumentTemplate.DT_In, line 602, in renderwb Module DocumentTemplate.DT_Var, line 219, in render KeyError: 'query' I don't think the following is an issue, but I'll include it for completeness.I am also getting the following iODBC warnings and errors in the Zope console log, which are related to the ODBC parameters being passed by iODBC. Note that these errors also appear for all of the successful queries. [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (Setup). [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (UsageCount). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Timeout). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Reuse). As for the ZSQL snippet from the template... Since there's no template involved yet (I'm still testing directly from the ZSQL method), I assume you mean the SQL code? select h.host_name, s.system_name, s.system_handle, count(*) from terminal t, system_map s, host h where t.system_index = s.system_index and s.host_index = h.host_index group by s.system_name order by h.host_name Nothing complicated here. There are no parameters passed to the query. RJ -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: May 5, 2005 5:38 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: Re: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is > 2.3.4 with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ---------------------------------------------------------------------- > -- > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 16:00:32 2005 From: charlie at egenix.com (Charlie Clark) Date: Fri Feb 10 16:01:25 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000101c5516f$3b96de90$6505a8c0@rjlaptop> References: <000101c5516f$3b96de90$6505a8c0@rjlaptop> Message-ID: <20050505150032.644.1@bepc.1115296715.fake> On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base eGenix > mxODBC Database Connection window, it works fine and returns the 20 > lines expected. That could point to a problem in the rendering, which > seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection to > a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 10:22:17 2005 From: rj at maxxian.com (RJ Juneau) Date: Fri Feb 10 16:01:25 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505150032.644.1@bepc.1115296715.fake> Message-ID: <000201c55175$75bcad10$6505a8c0@rjlaptop> At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 11:47:14 2005 From: rj at maxxian.com (RJ Juneau) Date: Fri Feb 10 16:01:25 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c55181$549be0e0$6505a8c0@rjlaptop> Charlie, I found a fix. Here it is in case anyone else runs into this. You were correct - the problem is in another part of Zope. Based on your feedback, I did a bit more searching and found something here: http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. html The problem appears to be in Zope versions after 2.7.0. I'm running 2.7.6, and the post indicates that it also happens in 2.7.4. The solution: Edit file /lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. There are two lines in the file that start with . Edit them as follows: Change first line to: Change second line to: Just to be after, I shut down Zope before I made the changes and restarted it after. Thanks for the help! RJ -----Original Message----- From: RJ Juneau [mailto:rj@maxxian.com] Sent: May 5, 2005 9:22 AM To: 'Charlie Clark' Cc: 'egenix-users@lists.egenix.com' Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 17:57:25 2005 From: charlie at egenix.com (Charlie Clark) Date: Fri Feb 10 16:01:25 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <20050505165725.3380.2@bepc.1115296715.fake> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Thu May 5 09:15:21 2005 From: charlie at egenix.com (Charlie Clark) Date: Fri Feb 10 16:01:25 2006 Subject: [Zope-DB] RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <000001c55185$41477730$6b00a8c0@fonacier.local> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________ Zope-DB mailing list Zope-DB@zope.org http://mail.zope.org/mailman/listinfo/zope-db From rj at maxxian.com Thu May 5 12:38:00 2005 From: rj at maxxian.com (RJ Juneau) Date: Fri Feb 10 16:01:25 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000001c55188$6b841eb0$6505a8c0@rjlaptop> I just double-checked. Zope-2.7.6-final. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 12:49:16 2005 From: rj at maxxian.com (RJ Juneau) Date: Fri Feb 10 16:01:25 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000501c55189$fe149ba0$6505a8c0@rjlaptop> Charlie, The fix has only been applied for 2.7.7, 2.8b2. The info is in the original bug report which is closed and can be found here: http://www.zope.org/Collectors/Zope/1745 RJ -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Fri May 6 11:50:09 2005 From: rj at maxxian.com (RJ Juneau) Date: Fri Feb 10 16:01:25 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC Message-ID: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Still on eval for the product. I cannot get a stable connection to Sybase via the iODBC drivers. - The Sybase ODBC connection - including a query - have been verified at the iODBC level. - The setup is already working well for ODBC connection to MySQL. Symptoms include: - If I click on "Open Connection", it still comes back with "Connection Closed" when I go to a ZSQL method - Using 'Connect on Demand' is not working either. - Clicking "Open Connection" gives me the following error: Connection string: DSN=lixbox_sybase; UID=sa; PWD=XXXXXXX Connection pool entry: 0 Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection rejected by data source', 7952) The odbc.ini definition for DSN "lixbox_sybase" is as follows: [lixbox_sybase] JetFix = No NoRowSetSizeLimit = No Description = Test connection to listbox Options = LIXBOX DSQUERY = SQLSERVER TDSHOST = lixbox TDSPORT = 5000 TDSVER = 5.0 SQLSERVER_CATALOG = N CURSOR_SENSITIVITY = LOW UserName = sa Password = XXXXXXXX ServerType = Sybase 10/11/12 Driver = /opt/openlink/lib/sql_mt_lt.so Database = pubs2 ReadOnly = no NoAutoCommit = No NoLoginBox = No FetchBufferSize = 60 Other relevant data: - Connecting via OpenLink's iODBC - Zope 2.7.6-final - Python 2.3.4 - Connection to Sybase has been successfully tested with iODBC, including issuing a query - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC connection RJ Juneau Chief Technology Officer Maxxian Integration Inc. 155 Westhampton Drive Thornhill, Ontario Canada L4J 7X2 E-mail: rj@maxxian.com Phone: +1 905 482 9429 Cell: +1 416 897 6682 Toll free: +1 866 758 9161 Fax: +1 647 722 2038 -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050506/aef33361/attachment-0115.htm From mal at egenix.com Fri May 6 18:27:37 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Feb 10 16:01:25 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC In-Reply-To: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> References: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Message-ID: <427B8CE9.1010601@egenix.com> RJ Juneau wrote: > Still on eval for the product. > > I cannot get a stable connection to Sybase via the iODBC drivers. > > - The Sybase ODBC connection - including a query - have been verified at > the iODBC level. > - The setup is already working well for ODBC connection to MySQL. > > Symptoms include: > > - If I click on "Open Connection", it still comes back with "Connection > Closed" when I go to a ZSQL method > - Using 'Connect on Demand' is not working either. > - Clicking "Open Connection" gives me the following error: > > Connection string: DSN=lixbox_sybase; > UID=sa; > PWD=XXXXXXX Try writing the connection string on one line and without whitespace. ODBC drivers sometimes have problems with this. > Connection pool entry: 0 > Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection > rejected by data source', 7952) This is a generic error that relates to authentication or firewall problems. It is possible that turning on ODBC tracing the ODBC manager will give more clues as to the real cause of the problem. > The odbc.ini definition for DSN "lixbox_sybase" is as follows: > > [lixbox_sybase] > JetFix = No > NoRowSetSizeLimit = No > Description = Test connection to listbox > Options = LIXBOX > DSQUERY = SQLSERVER > TDSHOST = lixbox > TDSPORT = 5000 > TDSVER = 5.0 > SQLSERVER_CATALOG = N > CURSOR_SENSITIVITY = LOW > UserName = sa > Password = XXXXXXXX > ServerType = Sybase 10/11/12 > Driver = /opt/openlink/lib/sql_mt_lt.so > Database = pubs2 > ReadOnly = no > NoAutoCommit = No > NoLoginBox = No > FetchBufferSize = 60 > > > Other relevant data: > - Connecting via OpenLink's iODBC > - Zope 2.7.6-final > - Python 2.3.4 > - Connection to Sybase has been successfully tested with iODBC, > including issuing a query > - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC > connection > > > > RJ Juneau > Chief Technology Officer > Maxxian Integration Inc. > 155 Westhampton Drive > Thornhill, Ontario > Canada L4J 7X2 > E-mail: rj@maxxian.com > Phone: +1 905 482 9429 > Cell: +1 416 897 6682 > Toll free: +1 866 758 9161 > Fax: +1 647 722 2038 > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 06 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From calisp at gmail.com Sun May 15 23:49:03 2005 From: calisp at gmail.com (calisp@gmail.com) Date: Fri Feb 10 16:01:25 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK Message-ID: Hi, I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the following error... 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the last phase of a two-phase commit. This shouldn't happen. Traceback (most recent call last): File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one jar.tpc_finish(self) File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish try: self._finish() File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could not perform COMMIT or ROLLBACK', 1023) What could be causing this? Can I get the mxODBCZopeDA source from somewhere? It would make debugging this much easier. Thanks, Calisp. From mal at egenix.com Mon May 16 13:52:12 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Feb 10 16:01:25 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK In-Reply-To: References: Message-ID: <42887B5C.4010109@egenix.com> calisp@gmail.com wrote: > Hi, > > I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with > unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the > following error... > > 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the > last phase of a two-phase commit. This shouldn't happen. > Traceback (most recent call last): > File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one > jar.tpc_finish(self) > File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish > try: self._finish() > File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish > File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler > ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could > not perform COMMIT or ROLLBACK', 1023) You should have a look at the database logs to see what prevented the commit from being completed. > What could be causing this? Hard to say: mxODBCZopeDA is trying to commit the transaction, but the driver or database failed to complete the request. The above error was generated by the ODBC driver. This could be network or DNS problems, or be related to a bug in FreeTDS (which is getting more stable with every new release, but should still be considered beta quality software at the moment). > Can I get the mxODBCZopeDA source from > somewhere? It would make debugging this much easier. Getting the source is not an option and won't help much either since the source of the problem is not mxODBCZopeDA. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 16 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Sun May 1 21:29:25 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Feb 10 20:01:24 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <427259F3.4090806@egenix.com> References: <20050427130906.52878.qmail@web30008.mail.mud.yahoo.com> <427259F3.4090806@egenix.com> Message-ID: <42752005.7080904@egenix.com> M.-A. Lemburg wrote: > David Rushby wrote: > >> --- "M.-A. Lemburg" wrote: >> >>> Are you using the standard mxDateTime build or one >>> with WANT_SUBCLASSABLE_TYPES defined... >> >> >> >> Presumably "the standard", since I just built with 'py24d setup.py >> build', making no attempt to enable special directives. >> >> >>> ... (mxDateTime_Deallocate is only used by the latter)? >> >> >> >> That's true in 2.1.0-2005-04-15, but not in 2.1.0b5. >> >> >>> In any case, please try our latest snapshot: >>> >>> >> >> http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-04-15.zip >> >>> to see if that makes any difference. >> >> >> >> I can't build it out of the box: > > > Hmm, looks like distutils' sdist command doesn't like our new > repository layout which uses symlinks (after we've switched to > subversion). > > We'll have to debug distutils first, I guess :-( Ok, we've found the problem and fixed it. Here's the new release (which does build out of the box at least on our boxes ;-): http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 01 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From davidrushby at yahoo.com Mon May 2 15:49:53 2005 From: davidrushby at yahoo.com (David Rushby) Date: Fri Feb 10 20:01:24 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Ok, we've found the problem and fixed it. Here's the new > release (which does build out of the box at least on our > boxes ;-): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip It does build now, but: py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" still behaves as it did when I submitted my original message: Fatal Python error: UNREF invalid object Aborted This is the same debug build of Python 2.4.1 that I was previously using, running the same configuration (CentOS Linux 4.0/i386, everything compiled with GCC 3.4.3). Have you examined my original claim as to the cause of the bug? __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 10:21:55 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Feb 10 20:01:24 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> References: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> Message-ID: <42772693.8050306@egenix.com> David Rushby wrote: > --- "M.-A. Lemburg" wrote: > >>Ok, we've found the problem and fixed it. Here's the new >>release (which does build out of the box at least on our >>boxes ;-): >> >> > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip > > It does build now, but: > py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" > still behaves as it did when I submitted my original message: > Fatal Python error: UNREF invalid object > Aborted > > This is the same debug build of Python 2.4.1 that I was previously > using, running the same configuration (CentOS Linux 4.0/i386, > everything compiled with GCC 3.4.3). > > Have you examined my original claim as to the cause of the bug? No. We haven't had time for looking into it. I'm not sure whether your analysis of the problem is correct: if you don't define WANT_SUBCLASSABLE_TYPES, the API mxDateTime_Deallocate() is neither defined nor used. Furthermore, PyObject_Del() is only called by mxDateTime_Free() if you have explicitely edited mxDateTime.c to disabled the free list #defines. In a standard build, PyObject_Del() is only called at module finalization time. Note that the reason we call mxDateTime_Free() in the constructor is that we don't want the destructor of the object to be called. Py_DECREF() would call the destructor (mxDateTime_Deallocate). It is possible that the debug code in Python complains about the refcount in the object not being 0 at the time the object is finalized (module finalization time), but I don't see any such checks in PyObject_Free() (which is what PyObject_Del() maps to). Again, all of this does not happen in regular non-debug Python builds. Please be aware that we don't support debug builds, so fixing the problem (if there is one - gcc has some serious optimization problems on some combinations of platform and version) will take a while. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 09:27:37 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Fri Feb 10 20:01:24 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 Message-ID: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Hi all- I am trying to build the mx-base package, v.2.0.6. This will be used with postgresql 7.3.9, psycopg 1.1.18, and Roundup 0.8.2. RHEL 3.0 Python 2.3 egenix-mx-base-2.0.6.tar.gz I performed a: /usr/local/bin/python2.3 setup.py install Everything looks proper with the exeception of this series of warning statements: ----------------- gcc -pthread -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fno-strict-aliasing -fPIC -Imx/BeeBase/mxBeeBase -I/usr/local/incl ude/python2.3 -I/usr/local/include -c mx/BeeBase/mxBeeBase/btr.c -o build/temp.linux-i686-2.3/mx/BeeBase/mxBeeBase/mxBeeBa se/mx/BeeBase/mxBeeBase/btr.o mx/BeeBase/mxBeeBase/btr.c: In function `dumpBuf': mx/BeeBase/mxBeeBase/btr.c:249: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:250: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:255: warning: unsigned int format, long unsigned int arg (arg 4) mx/BeeBase/mxBeeBase/btr.c:256: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c: In function `_validateTree': mx/BeeBase/mxBeeBase/btr.c:330: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:337: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:339: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:349: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:351: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 3) creating build/lib.linux-i686-2.3/mx/BeeBase creating build/lib.linux-i686-2.3/mx/BeeBase/mxBeeBase -------------- Would someone be kind enough to let me know whether these messages were expected, and if not, how I might resolve these? Thanks! DC __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 22:06:33 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Feb 10 20:01:24 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> References: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Message-ID: <4277CBB9.8020302@egenix.com> Dianne Chen wrote: > Hi all- > > I am trying to build the mx-base package, v.2.0.6. > This will be used with postgresql 7.3.9, psycopg > 1.1.18, and Roundup 0.8.2. > > RHEL 3.0 > Python 2.3 > egenix-mx-base-2.0.6.tar.gz > > I performed a: > > /usr/local/bin/python2.3 setup.py install > > Everything looks proper with the exeception of this > series of warning statements: > > ----------------- > ... > -------------- > > Would someone be kind enough to let me know whether > these messages were expected, and if not, how I might > resolve these? These warning can safely be ignored. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 13:41:14 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Fri Feb 10 20:01:24 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: 6667 Message-ID: <20050503194114.72091.qmail@web31414.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Dianne Chen wrote: > > Hi all- > > > > I am trying to build the mx-base package, v.2.0.6. > > This will be used with postgresql 7.3.9, psycopg > > 1.1.18, and Roundup 0.8.2. > > > > RHEL 3.0 > > Python 2.3 > > egenix-mx-base-2.0.6.tar.gz > > > > I performed a: > > > > /usr/local/bin/python2.3 setup.py install > > > > Everything looks proper with the exeception of > this > > series of warning statements: > > > > ----------------- > > ... > > -------------- > > > > Would someone be kind enough to let me know > whether > > these messages were expected, and if not, how I > might > > resolve these? > > These warning can safely be ignored. > > -- > Marc-Andre Lemburg > eGenix.com > Marc- Thank you very much for the reply. It helps greatly. With kind regards, DC __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From davidrushby at yahoo.com Tue May 3 17:18:46 2005 From: davidrushby at yahoo.com (David Rushby) Date: Fri Feb 10 20:01:24 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050503231846.35012.qmail@web30009.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > I'm not sure whether your analysis of the problem is correct... Indeed, my original analysis wasn't correct; I think this one is. The fatal error I'm complaining about only arises if the arguments to DateTime.DateTime are invalid, so that the object is deallocated in the onError block of mxDateTime_FromDateAndTime. If the object is created successfully, and later deallocated by Python's garbage collector, the fatal error doesn't arise. Here's my analysis of the problem: --- If the debugging directive Py_TRACE_REFS is enabled, as it is in my case, the Python interpreter maintains a doubly linked list of all Python objects (named refchain) via the _ob_next and _ob_prev pointers added to PyObject via _PyObject_HEAD_EXTRA. Each object is inserted into refchain by the _Py_AddToAllObjects call in _Py_NewReference, and removed from refchain by the _Py_ForgetReference call in _Py_Dealloc. _Py_ForgetReference performs an integrity check on the object being deallocated (op) to make sure that its neighbors in refchain recognize it. Specifically, _Py_ForgetReference verifies that the _ob_next pointer of the previous object in refchain (op->_ob_prev->_ob_next) points to op, and that the _ob_prev pointer of the next object in refchain (op->_ob_next->_ob_prev) points to op. If either of those conditions is false, the interpreter raises the fatal error I'm seeing. After mxDateTime_New pulls an mxDateTimeObject out of the free list, it calls _Py_NewReference on that object to transform it from a "conceptually deallocated" object to a "conceptually allocated" one. _Py_NewReference inserts the object into refchain. Later, when the object is being "conceptually deallocated", it should be removed from refchain with _Py_ForgetReference. The version of _Py_Dealloc that's active when Py_TRACE_REFS is enabled does this (_Py_Dealloc is the element of Py_DECREF that performs the actual destruction). _Py_Dealloc first calls _Py_ForgetReference to remove the object from refchain, then calls the object's destructor (op->ob_type->tp_dealloc). If WANT_SUBCLASSABLE_TYPES is not defined (it is not in my case), the destructor for mxDateTime_Type is mxDateTime_Free. So, if a DateTime object is deallocated normally, as a result of its reference count falling to zero, _Py_Dealloc is called on the object, which first removes it from refchain, then passes it to mxDateTime_Free. If a DateTime object is destroyed prematurely, as a result of invalid arguments to its destructor, the onError handler calls mxDateTime_Free, so the object is "conceptually deallocated" (placed in the free list), *but* the object is not removed from refchain. So if a refchain-membership-integrity-check is performed on the object in question or one of its immediate neighbors in refchain, that integrity check fails, leading to the fatal error. --- The solution is to 'Py_DECREF(...)' the object in the onError handler of its constructor, instead of passing the object directly to mxDateTime_Free. That change solves two problems: 1) It causes _Py_Dealloc to execute, which in turn executes _Py_ForgetReference, so the object is removed from refchain, as it should be. 2) At present, objects that are created successfully and later deallocated by normal reference count mechanics have a reference count of 0 when they enter the free list, whereas objects whose constructors abort their creation due to invalid arguments have a reference count of 1 when they enter the free list. Although AFAIK this doesn't cause an actual execution problem (because the object's reference count is *explicitly set to 1* rather than *incremented by 1* when the object is later "conceptually allocated" by _Py_NewReference), it is likely to confuse future maintainers and thereby lead to the introduction of an actual execution problem. I assume that if you agree that this is a reasonable solution, you'll want to apply the change not only to mxDateTime_FromDateAndTime, but to all similar constructors in mxDateTime.c. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From rj at maxxian.com Thu May 5 01:57:40 2005 From: rj at maxxian.com (RJ Juneau) Date: Fri Feb 10 20:01:24 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c5512e$f72798c0$6505a8c0@rjlaptop> I'm on the 30 day evaluation for mxodbc_zope_da. I'm getting the following error when I submit some queries: Error Type: KeyError Error Value: 'query' I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 with UCS4. The error seems to be caused by multiple rows being returned. I did see an earlier posting with the same error message. The response suggested a template error, but this is clearly not the case here. The additional evidence I've gathered so far: - I'm running the test directly from the ZSQL method, so there's no template involved. - If I use the same query with an additional "where" clause to ensure that only one row is returned, it works - If I use a value in the 'where' clause with no rows returned, it works - The same ZSQL query is being used on a Windows machine running Zope and the free ZODBC module without a problem - The query has been verified directly in mysql-client-browser Other info: - The database is MySQL 4.1.10A-0 - iODBC is the DB driver RJ Juneau -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050505/68d278bf/attachment-0116.htm From mal at egenix.com Thu May 5 12:37:43 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Feb 10 20:01:24 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c5512e$f72798c0$6505a8c0@rjlaptop> References: <000301c5512e$f72798c0$6505a8c0@rjlaptop> Message-ID: <4279E967.6010904@egenix.com> RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 > with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 09:37:42 2005 From: rj at maxxian.com (RJ Juneau) Date: Fri Feb 10 20:01:24 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000101c5516f$3b96de90$6505a8c0@rjlaptop> More interesting info on the problem: If I execute the query directly in the "test" window of the base eGenix mxODBC Database Connection window, it works fine and returns the 20 lines expected. That could point to a problem in the rendering, which seems to be where the traceback ends. Note that within the same Zope system I also have an ODBC connection to a Sybase database, and I have successfully tested multi-line ZSQL queries there. This is the traceback: Time 2005/05/05 07:55:15.294 GMT-4 Exception Type KeyError Exception Value 'query' Traceback (innermost last): Module ZPublisher.Publish, line 101, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 39, in call_object Module Shared.DC.ZRDB.DA, line 337, in manage_test Module DocumentTemplate.DT_String, line 474, in __call__ Module DocumentTemplate.DT_In, line 602, in renderwb Module DocumentTemplate.DT_Var, line 219, in render KeyError: 'query' I don't think the following is an issue, but I'll include it for completeness.I am also getting the following iODBC warnings and errors in the Zope console log, which are related to the ODBC parameters being passed by iODBC. Note that these errors also appear for all of the successful queries. [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (Setup). [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (UsageCount). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Timeout). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Reuse). As for the ZSQL snippet from the template... Since there's no template involved yet (I'm still testing directly from the ZSQL method), I assume you mean the SQL code? select h.host_name, s.system_name, s.system_handle, count(*) from terminal t, system_map s, host h where t.system_index = s.system_index and s.host_index = h.host_index group by s.system_name order by h.host_name Nothing complicated here. There are no parameters passed to the query. RJ -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: May 5, 2005 5:38 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: Re: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is > 2.3.4 with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ---------------------------------------------------------------------- > -- > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 16:00:32 2005 From: charlie at egenix.com (Charlie Clark) Date: Fri Feb 10 20:01:24 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000101c5516f$3b96de90$6505a8c0@rjlaptop> References: <000101c5516f$3b96de90$6505a8c0@rjlaptop> Message-ID: <20050505150032.644.1@bepc.1115296715.fake> On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base eGenix > mxODBC Database Connection window, it works fine and returns the 20 > lines expected. That could point to a problem in the rendering, which > seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection to > a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 10:22:17 2005 From: rj at maxxian.com (RJ Juneau) Date: Fri Feb 10 20:01:24 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505150032.644.1@bepc.1115296715.fake> Message-ID: <000201c55175$75bcad10$6505a8c0@rjlaptop> At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 11:47:14 2005 From: rj at maxxian.com (RJ Juneau) Date: Fri Feb 10 20:01:24 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c55181$549be0e0$6505a8c0@rjlaptop> Charlie, I found a fix. Here it is in case anyone else runs into this. You were correct - the problem is in another part of Zope. Based on your feedback, I did a bit more searching and found something here: http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. html The problem appears to be in Zope versions after 2.7.0. I'm running 2.7.6, and the post indicates that it also happens in 2.7.4. The solution: Edit file /lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. There are two lines in the file that start with . Edit them as follows: Change first line to: Change second line to: Just to be after, I shut down Zope before I made the changes and restarted it after. Thanks for the help! RJ -----Original Message----- From: RJ Juneau [mailto:rj@maxxian.com] Sent: May 5, 2005 9:22 AM To: 'Charlie Clark' Cc: 'egenix-users@lists.egenix.com' Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 17:57:25 2005 From: charlie at egenix.com (Charlie Clark) Date: Fri Feb 10 20:01:24 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <20050505165725.3380.2@bepc.1115296715.fake> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Thu May 5 09:15:21 2005 From: charlie at egenix.com (Charlie Clark) Date: Fri Feb 10 20:01:24 2006 Subject: [Zope-DB] RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <000001c55185$41477730$6b00a8c0@fonacier.local> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________ Zope-DB mailing list Zope-DB@zope.org http://mail.zope.org/mailman/listinfo/zope-db From rj at maxxian.com Thu May 5 12:38:00 2005 From: rj at maxxian.com (RJ Juneau) Date: Fri Feb 10 20:01:24 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000001c55188$6b841eb0$6505a8c0@rjlaptop> I just double-checked. Zope-2.7.6-final. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 12:49:16 2005 From: rj at maxxian.com (RJ Juneau) Date: Fri Feb 10 20:01:24 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000501c55189$fe149ba0$6505a8c0@rjlaptop> Charlie, The fix has only been applied for 2.7.7, 2.8b2. The info is in the original bug report which is closed and can be found here: http://www.zope.org/Collectors/Zope/1745 RJ -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Fri May 6 11:50:09 2005 From: rj at maxxian.com (RJ Juneau) Date: Fri Feb 10 20:01:24 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC Message-ID: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Still on eval for the product. I cannot get a stable connection to Sybase via the iODBC drivers. - The Sybase ODBC connection - including a query - have been verified at the iODBC level. - The setup is already working well for ODBC connection to MySQL. Symptoms include: - If I click on "Open Connection", it still comes back with "Connection Closed" when I go to a ZSQL method - Using 'Connect on Demand' is not working either. - Clicking "Open Connection" gives me the following error: Connection string: DSN=lixbox_sybase; UID=sa; PWD=XXXXXXX Connection pool entry: 0 Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection rejected by data source', 7952) The odbc.ini definition for DSN "lixbox_sybase" is as follows: [lixbox_sybase] JetFix = No NoRowSetSizeLimit = No Description = Test connection to listbox Options = LIXBOX DSQUERY = SQLSERVER TDSHOST = lixbox TDSPORT = 5000 TDSVER = 5.0 SQLSERVER_CATALOG = N CURSOR_SENSITIVITY = LOW UserName = sa Password = XXXXXXXX ServerType = Sybase 10/11/12 Driver = /opt/openlink/lib/sql_mt_lt.so Database = pubs2 ReadOnly = no NoAutoCommit = No NoLoginBox = No FetchBufferSize = 60 Other relevant data: - Connecting via OpenLink's iODBC - Zope 2.7.6-final - Python 2.3.4 - Connection to Sybase has been successfully tested with iODBC, including issuing a query - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC connection RJ Juneau Chief Technology Officer Maxxian Integration Inc. 155 Westhampton Drive Thornhill, Ontario Canada L4J 7X2 E-mail: rj@maxxian.com Phone: +1 905 482 9429 Cell: +1 416 897 6682 Toll free: +1 866 758 9161 Fax: +1 647 722 2038 -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050506/aef33361/attachment-0116.htm From mal at egenix.com Fri May 6 18:27:37 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Feb 10 20:01:24 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC In-Reply-To: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> References: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Message-ID: <427B8CE9.1010601@egenix.com> RJ Juneau wrote: > Still on eval for the product. > > I cannot get a stable connection to Sybase via the iODBC drivers. > > - The Sybase ODBC connection - including a query - have been verified at > the iODBC level. > - The setup is already working well for ODBC connection to MySQL. > > Symptoms include: > > - If I click on "Open Connection", it still comes back with "Connection > Closed" when I go to a ZSQL method > - Using 'Connect on Demand' is not working either. > - Clicking "Open Connection" gives me the following error: > > Connection string: DSN=lixbox_sybase; > UID=sa; > PWD=XXXXXXX Try writing the connection string on one line and without whitespace. ODBC drivers sometimes have problems with this. > Connection pool entry: 0 > Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection > rejected by data source', 7952) This is a generic error that relates to authentication or firewall problems. It is possible that turning on ODBC tracing the ODBC manager will give more clues as to the real cause of the problem. > The odbc.ini definition for DSN "lixbox_sybase" is as follows: > > [lixbox_sybase] > JetFix = No > NoRowSetSizeLimit = No > Description = Test connection to listbox > Options = LIXBOX > DSQUERY = SQLSERVER > TDSHOST = lixbox > TDSPORT = 5000 > TDSVER = 5.0 > SQLSERVER_CATALOG = N > CURSOR_SENSITIVITY = LOW > UserName = sa > Password = XXXXXXXX > ServerType = Sybase 10/11/12 > Driver = /opt/openlink/lib/sql_mt_lt.so > Database = pubs2 > ReadOnly = no > NoAutoCommit = No > NoLoginBox = No > FetchBufferSize = 60 > > > Other relevant data: > - Connecting via OpenLink's iODBC > - Zope 2.7.6-final > - Python 2.3.4 > - Connection to Sybase has been successfully tested with iODBC, > including issuing a query > - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC > connection > > > > RJ Juneau > Chief Technology Officer > Maxxian Integration Inc. > 155 Westhampton Drive > Thornhill, Ontario > Canada L4J 7X2 > E-mail: rj@maxxian.com > Phone: +1 905 482 9429 > Cell: +1 416 897 6682 > Toll free: +1 866 758 9161 > Fax: +1 647 722 2038 > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 06 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From calisp at gmail.com Sun May 15 23:49:03 2005 From: calisp at gmail.com (calisp@gmail.com) Date: Fri Feb 10 20:01:24 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK Message-ID: Hi, I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the following error... 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the last phase of a two-phase commit. This shouldn't happen. Traceback (most recent call last): File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one jar.tpc_finish(self) File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish try: self._finish() File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could not perform COMMIT or ROLLBACK', 1023) What could be causing this? Can I get the mxODBCZopeDA source from somewhere? It would make debugging this much easier. Thanks, Calisp. From mal at egenix.com Mon May 16 13:52:12 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Feb 10 20:01:24 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK In-Reply-To: References: Message-ID: <42887B5C.4010109@egenix.com> calisp@gmail.com wrote: > Hi, > > I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with > unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the > following error... > > 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the > last phase of a two-phase commit. This shouldn't happen. > Traceback (most recent call last): > File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one > jar.tpc_finish(self) > File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish > try: self._finish() > File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish > File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler > ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could > not perform COMMIT or ROLLBACK', 1023) You should have a look at the database logs to see what prevented the commit from being completed. > What could be causing this? Hard to say: mxODBCZopeDA is trying to commit the transaction, but the driver or database failed to complete the request. The above error was generated by the ODBC driver. This could be network or DNS problems, or be related to a bug in FreeTDS (which is getting more stable with every new release, but should still be considered beta quality software at the moment). > Can I get the mxODBCZopeDA source from > somewhere? It would make debugging this much easier. Getting the source is not an option and won't help much either since the source of the problem is not mxODBCZopeDA. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 16 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Sun May 1 21:29:25 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Feb 11 08:13:56 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <427259F3.4090806@egenix.com> References: <20050427130906.52878.qmail@web30008.mail.mud.yahoo.com> <427259F3.4090806@egenix.com> Message-ID: <42752005.7080904@egenix.com> M.-A. Lemburg wrote: > David Rushby wrote: > >> --- "M.-A. Lemburg" wrote: >> >>> Are you using the standard mxDateTime build or one >>> with WANT_SUBCLASSABLE_TYPES defined... >> >> >> >> Presumably "the standard", since I just built with 'py24d setup.py >> build', making no attempt to enable special directives. >> >> >>> ... (mxDateTime_Deallocate is only used by the latter)? >> >> >> >> That's true in 2.1.0-2005-04-15, but not in 2.1.0b5. >> >> >>> In any case, please try our latest snapshot: >>> >>> >> >> http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-04-15.zip >> >>> to see if that makes any difference. >> >> >> >> I can't build it out of the box: > > > Hmm, looks like distutils' sdist command doesn't like our new > repository layout which uses symlinks (after we've switched to > subversion). > > We'll have to debug distutils first, I guess :-( Ok, we've found the problem and fixed it. Here's the new release (which does build out of the box at least on our boxes ;-): http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 01 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From davidrushby at yahoo.com Mon May 2 15:49:53 2005 From: davidrushby at yahoo.com (David Rushby) Date: Sat Feb 11 08:13:58 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Ok, we've found the problem and fixed it. Here's the new > release (which does build out of the box at least on our > boxes ;-): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip It does build now, but: py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" still behaves as it did when I submitted my original message: Fatal Python error: UNREF invalid object Aborted This is the same debug build of Python 2.4.1 that I was previously using, running the same configuration (CentOS Linux 4.0/i386, everything compiled with GCC 3.4.3). Have you examined my original claim as to the cause of the bug? __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 10:21:55 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Feb 11 08:13:58 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> References: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> Message-ID: <42772693.8050306@egenix.com> David Rushby wrote: > --- "M.-A. Lemburg" wrote: > >>Ok, we've found the problem and fixed it. Here's the new >>release (which does build out of the box at least on our >>boxes ;-): >> >> > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip > > It does build now, but: > py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" > still behaves as it did when I submitted my original message: > Fatal Python error: UNREF invalid object > Aborted > > This is the same debug build of Python 2.4.1 that I was previously > using, running the same configuration (CentOS Linux 4.0/i386, > everything compiled with GCC 3.4.3). > > Have you examined my original claim as to the cause of the bug? No. We haven't had time for looking into it. I'm not sure whether your analysis of the problem is correct: if you don't define WANT_SUBCLASSABLE_TYPES, the API mxDateTime_Deallocate() is neither defined nor used. Furthermore, PyObject_Del() is only called by mxDateTime_Free() if you have explicitely edited mxDateTime.c to disabled the free list #defines. In a standard build, PyObject_Del() is only called at module finalization time. Note that the reason we call mxDateTime_Free() in the constructor is that we don't want the destructor of the object to be called. Py_DECREF() would call the destructor (mxDateTime_Deallocate). It is possible that the debug code in Python complains about the refcount in the object not being 0 at the time the object is finalized (module finalization time), but I don't see any such checks in PyObject_Free() (which is what PyObject_Del() maps to). Again, all of this does not happen in regular non-debug Python builds. Please be aware that we don't support debug builds, so fixing the problem (if there is one - gcc has some serious optimization problems on some combinations of platform and version) will take a while. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 09:27:37 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Sat Feb 11 08:13:58 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 Message-ID: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Hi all- I am trying to build the mx-base package, v.2.0.6. This will be used with postgresql 7.3.9, psycopg 1.1.18, and Roundup 0.8.2. RHEL 3.0 Python 2.3 egenix-mx-base-2.0.6.tar.gz I performed a: /usr/local/bin/python2.3 setup.py install Everything looks proper with the exeception of this series of warning statements: ----------------- gcc -pthread -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fno-strict-aliasing -fPIC -Imx/BeeBase/mxBeeBase -I/usr/local/incl ude/python2.3 -I/usr/local/include -c mx/BeeBase/mxBeeBase/btr.c -o build/temp.linux-i686-2.3/mx/BeeBase/mxBeeBase/mxBeeBa se/mx/BeeBase/mxBeeBase/btr.o mx/BeeBase/mxBeeBase/btr.c: In function `dumpBuf': mx/BeeBase/mxBeeBase/btr.c:249: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:250: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:255: warning: unsigned int format, long unsigned int arg (arg 4) mx/BeeBase/mxBeeBase/btr.c:256: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c: In function `_validateTree': mx/BeeBase/mxBeeBase/btr.c:330: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:337: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:339: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:349: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:351: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 3) creating build/lib.linux-i686-2.3/mx/BeeBase creating build/lib.linux-i686-2.3/mx/BeeBase/mxBeeBase -------------- Would someone be kind enough to let me know whether these messages were expected, and if not, how I might resolve these? Thanks! DC __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 22:06:33 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Feb 11 08:13:58 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> References: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Message-ID: <4277CBB9.8020302@egenix.com> Dianne Chen wrote: > Hi all- > > I am trying to build the mx-base package, v.2.0.6. > This will be used with postgresql 7.3.9, psycopg > 1.1.18, and Roundup 0.8.2. > > RHEL 3.0 > Python 2.3 > egenix-mx-base-2.0.6.tar.gz > > I performed a: > > /usr/local/bin/python2.3 setup.py install > > Everything looks proper with the exeception of this > series of warning statements: > > ----------------- > ... > -------------- > > Would someone be kind enough to let me know whether > these messages were expected, and if not, how I might > resolve these? These warning can safely be ignored. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 13:41:14 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Sat Feb 11 08:13:59 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: 6667 Message-ID: <20050503194114.72091.qmail@web31414.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Dianne Chen wrote: > > Hi all- > > > > I am trying to build the mx-base package, v.2.0.6. > > This will be used with postgresql 7.3.9, psycopg > > 1.1.18, and Roundup 0.8.2. > > > > RHEL 3.0 > > Python 2.3 > > egenix-mx-base-2.0.6.tar.gz > > > > I performed a: > > > > /usr/local/bin/python2.3 setup.py install > > > > Everything looks proper with the exeception of > this > > series of warning statements: > > > > ----------------- > > ... > > -------------- > > > > Would someone be kind enough to let me know > whether > > these messages were expected, and if not, how I > might > > resolve these? > > These warning can safely be ignored. > > -- > Marc-Andre Lemburg > eGenix.com > Marc- Thank you very much for the reply. It helps greatly. With kind regards, DC __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From davidrushby at yahoo.com Tue May 3 17:18:46 2005 From: davidrushby at yahoo.com (David Rushby) Date: Sat Feb 11 08:13:59 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050503231846.35012.qmail@web30009.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > I'm not sure whether your analysis of the problem is correct... Indeed, my original analysis wasn't correct; I think this one is. The fatal error I'm complaining about only arises if the arguments to DateTime.DateTime are invalid, so that the object is deallocated in the onError block of mxDateTime_FromDateAndTime. If the object is created successfully, and later deallocated by Python's garbage collector, the fatal error doesn't arise. Here's my analysis of the problem: --- If the debugging directive Py_TRACE_REFS is enabled, as it is in my case, the Python interpreter maintains a doubly linked list of all Python objects (named refchain) via the _ob_next and _ob_prev pointers added to PyObject via _PyObject_HEAD_EXTRA. Each object is inserted into refchain by the _Py_AddToAllObjects call in _Py_NewReference, and removed from refchain by the _Py_ForgetReference call in _Py_Dealloc. _Py_ForgetReference performs an integrity check on the object being deallocated (op) to make sure that its neighbors in refchain recognize it. Specifically, _Py_ForgetReference verifies that the _ob_next pointer of the previous object in refchain (op->_ob_prev->_ob_next) points to op, and that the _ob_prev pointer of the next object in refchain (op->_ob_next->_ob_prev) points to op. If either of those conditions is false, the interpreter raises the fatal error I'm seeing. After mxDateTime_New pulls an mxDateTimeObject out of the free list, it calls _Py_NewReference on that object to transform it from a "conceptually deallocated" object to a "conceptually allocated" one. _Py_NewReference inserts the object into refchain. Later, when the object is being "conceptually deallocated", it should be removed from refchain with _Py_ForgetReference. The version of _Py_Dealloc that's active when Py_TRACE_REFS is enabled does this (_Py_Dealloc is the element of Py_DECREF that performs the actual destruction). _Py_Dealloc first calls _Py_ForgetReference to remove the object from refchain, then calls the object's destructor (op->ob_type->tp_dealloc). If WANT_SUBCLASSABLE_TYPES is not defined (it is not in my case), the destructor for mxDateTime_Type is mxDateTime_Free. So, if a DateTime object is deallocated normally, as a result of its reference count falling to zero, _Py_Dealloc is called on the object, which first removes it from refchain, then passes it to mxDateTime_Free. If a DateTime object is destroyed prematurely, as a result of invalid arguments to its destructor, the onError handler calls mxDateTime_Free, so the object is "conceptually deallocated" (placed in the free list), *but* the object is not removed from refchain. So if a refchain-membership-integrity-check is performed on the object in question or one of its immediate neighbors in refchain, that integrity check fails, leading to the fatal error. --- The solution is to 'Py_DECREF(...)' the object in the onError handler of its constructor, instead of passing the object directly to mxDateTime_Free. That change solves two problems: 1) It causes _Py_Dealloc to execute, which in turn executes _Py_ForgetReference, so the object is removed from refchain, as it should be. 2) At present, objects that are created successfully and later deallocated by normal reference count mechanics have a reference count of 0 when they enter the free list, whereas objects whose constructors abort their creation due to invalid arguments have a reference count of 1 when they enter the free list. Although AFAIK this doesn't cause an actual execution problem (because the object's reference count is *explicitly set to 1* rather than *incremented by 1* when the object is later "conceptually allocated" by _Py_NewReference), it is likely to confuse future maintainers and thereby lead to the introduction of an actual execution problem. I assume that if you agree that this is a reasonable solution, you'll want to apply the change not only to mxDateTime_FromDateAndTime, but to all similar constructors in mxDateTime.c. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From rj at maxxian.com Thu May 5 01:57:40 2005 From: rj at maxxian.com (RJ Juneau) Date: Sat Feb 11 08:13:59 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c5512e$f72798c0$6505a8c0@rjlaptop> I'm on the 30 day evaluation for mxodbc_zope_da. I'm getting the following error when I submit some queries: Error Type: KeyError Error Value: 'query' I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 with UCS4. The error seems to be caused by multiple rows being returned. I did see an earlier posting with the same error message. The response suggested a template error, but this is clearly not the case here. The additional evidence I've gathered so far: - I'm running the test directly from the ZSQL method, so there's no template involved. - If I use the same query with an additional "where" clause to ensure that only one row is returned, it works - If I use a value in the 'where' clause with no rows returned, it works - The same ZSQL query is being used on a Windows machine running Zope and the free ZODBC module without a problem - The query has been verified directly in mysql-client-browser Other info: - The database is MySQL 4.1.10A-0 - iODBC is the DB driver RJ Juneau -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050505/68d278bf/attachment-0117.htm From mal at egenix.com Thu May 5 12:37:43 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Feb 11 08:13:59 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c5512e$f72798c0$6505a8c0@rjlaptop> References: <000301c5512e$f72798c0$6505a8c0@rjlaptop> Message-ID: <4279E967.6010904@egenix.com> RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 > with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 09:37:42 2005 From: rj at maxxian.com (RJ Juneau) Date: Sat Feb 11 08:13:59 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000101c5516f$3b96de90$6505a8c0@rjlaptop> More interesting info on the problem: If I execute the query directly in the "test" window of the base eGenix mxODBC Database Connection window, it works fine and returns the 20 lines expected. That could point to a problem in the rendering, which seems to be where the traceback ends. Note that within the same Zope system I also have an ODBC connection to a Sybase database, and I have successfully tested multi-line ZSQL queries there. This is the traceback: Time 2005/05/05 07:55:15.294 GMT-4 Exception Type KeyError Exception Value 'query' Traceback (innermost last): Module ZPublisher.Publish, line 101, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 39, in call_object Module Shared.DC.ZRDB.DA, line 337, in manage_test Module DocumentTemplate.DT_String, line 474, in __call__ Module DocumentTemplate.DT_In, line 602, in renderwb Module DocumentTemplate.DT_Var, line 219, in render KeyError: 'query' I don't think the following is an issue, but I'll include it for completeness.I am also getting the following iODBC warnings and errors in the Zope console log, which are related to the ODBC parameters being passed by iODBC. Note that these errors also appear for all of the successful queries. [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (Setup). [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (UsageCount). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Timeout). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Reuse). As for the ZSQL snippet from the template... Since there's no template involved yet (I'm still testing directly from the ZSQL method), I assume you mean the SQL code? select h.host_name, s.system_name, s.system_handle, count(*) from terminal t, system_map s, host h where t.system_index = s.system_index and s.host_index = h.host_index group by s.system_name order by h.host_name Nothing complicated here. There are no parameters passed to the query. RJ -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: May 5, 2005 5:38 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: Re: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is > 2.3.4 with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ---------------------------------------------------------------------- > -- > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 16:00:32 2005 From: charlie at egenix.com (Charlie Clark) Date: Sat Feb 11 08:13:59 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000101c5516f$3b96de90$6505a8c0@rjlaptop> References: <000101c5516f$3b96de90$6505a8c0@rjlaptop> Message-ID: <20050505150032.644.1@bepc.1115296715.fake> On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base eGenix > mxODBC Database Connection window, it works fine and returns the 20 > lines expected. That could point to a problem in the rendering, which > seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection to > a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 10:22:17 2005 From: rj at maxxian.com (RJ Juneau) Date: Sat Feb 11 08:13:59 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505150032.644.1@bepc.1115296715.fake> Message-ID: <000201c55175$75bcad10$6505a8c0@rjlaptop> At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 11:47:14 2005 From: rj at maxxian.com (RJ Juneau) Date: Sat Feb 11 08:13:59 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c55181$549be0e0$6505a8c0@rjlaptop> Charlie, I found a fix. Here it is in case anyone else runs into this. You were correct - the problem is in another part of Zope. Based on your feedback, I did a bit more searching and found something here: http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. html The problem appears to be in Zope versions after 2.7.0. I'm running 2.7.6, and the post indicates that it also happens in 2.7.4. The solution: Edit file /lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. There are two lines in the file that start with . Edit them as follows: Change first line to: Change second line to: Just to be after, I shut down Zope before I made the changes and restarted it after. Thanks for the help! RJ -----Original Message----- From: RJ Juneau [mailto:rj@maxxian.com] Sent: May 5, 2005 9:22 AM To: 'Charlie Clark' Cc: 'egenix-users@lists.egenix.com' Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 17:57:25 2005 From: charlie at egenix.com (Charlie Clark) Date: Sat Feb 11 08:14:00 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <20050505165725.3380.2@bepc.1115296715.fake> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Thu May 5 09:15:21 2005 From: charlie at egenix.com (Charlie Clark) Date: Sat Feb 11 08:14:00 2006 Subject: [Zope-DB] RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <000001c55185$41477730$6b00a8c0@fonacier.local> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________ Zope-DB mailing list Zope-DB@zope.org http://mail.zope.org/mailman/listinfo/zope-db From rj at maxxian.com Thu May 5 12:38:00 2005 From: rj at maxxian.com (RJ Juneau) Date: Sat Feb 11 08:14:00 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000001c55188$6b841eb0$6505a8c0@rjlaptop> I just double-checked. Zope-2.7.6-final. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 12:49:16 2005 From: rj at maxxian.com (RJ Juneau) Date: Sat Feb 11 08:14:00 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000501c55189$fe149ba0$6505a8c0@rjlaptop> Charlie, The fix has only been applied for 2.7.7, 2.8b2. The info is in the original bug report which is closed and can be found here: http://www.zope.org/Collectors/Zope/1745 RJ -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Fri May 6 11:50:09 2005 From: rj at maxxian.com (RJ Juneau) Date: Sat Feb 11 08:14:00 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC Message-ID: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Still on eval for the product. I cannot get a stable connection to Sybase via the iODBC drivers. - The Sybase ODBC connection - including a query - have been verified at the iODBC level. - The setup is already working well for ODBC connection to MySQL. Symptoms include: - If I click on "Open Connection", it still comes back with "Connection Closed" when I go to a ZSQL method - Using 'Connect on Demand' is not working either. - Clicking "Open Connection" gives me the following error: Connection string: DSN=lixbox_sybase; UID=sa; PWD=XXXXXXX Connection pool entry: 0 Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection rejected by data source', 7952) The odbc.ini definition for DSN "lixbox_sybase" is as follows: [lixbox_sybase] JetFix = No NoRowSetSizeLimit = No Description = Test connection to listbox Options = LIXBOX DSQUERY = SQLSERVER TDSHOST = lixbox TDSPORT = 5000 TDSVER = 5.0 SQLSERVER_CATALOG = N CURSOR_SENSITIVITY = LOW UserName = sa Password = XXXXXXXX ServerType = Sybase 10/11/12 Driver = /opt/openlink/lib/sql_mt_lt.so Database = pubs2 ReadOnly = no NoAutoCommit = No NoLoginBox = No FetchBufferSize = 60 Other relevant data: - Connecting via OpenLink's iODBC - Zope 2.7.6-final - Python 2.3.4 - Connection to Sybase has been successfully tested with iODBC, including issuing a query - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC connection RJ Juneau Chief Technology Officer Maxxian Integration Inc. 155 Westhampton Drive Thornhill, Ontario Canada L4J 7X2 E-mail: rj@maxxian.com Phone: +1 905 482 9429 Cell: +1 416 897 6682 Toll free: +1 866 758 9161 Fax: +1 647 722 2038 -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050506/aef33361/attachment-0117.htm From mal at egenix.com Fri May 6 18:27:37 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Feb 11 08:14:00 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC In-Reply-To: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> References: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Message-ID: <427B8CE9.1010601@egenix.com> RJ Juneau wrote: > Still on eval for the product. > > I cannot get a stable connection to Sybase via the iODBC drivers. > > - The Sybase ODBC connection - including a query - have been verified at > the iODBC level. > - The setup is already working well for ODBC connection to MySQL. > > Symptoms include: > > - If I click on "Open Connection", it still comes back with "Connection > Closed" when I go to a ZSQL method > - Using 'Connect on Demand' is not working either. > - Clicking "Open Connection" gives me the following error: > > Connection string: DSN=lixbox_sybase; > UID=sa; > PWD=XXXXXXX Try writing the connection string on one line and without whitespace. ODBC drivers sometimes have problems with this. > Connection pool entry: 0 > Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection > rejected by data source', 7952) This is a generic error that relates to authentication or firewall problems. It is possible that turning on ODBC tracing the ODBC manager will give more clues as to the real cause of the problem. > The odbc.ini definition for DSN "lixbox_sybase" is as follows: > > [lixbox_sybase] > JetFix = No > NoRowSetSizeLimit = No > Description = Test connection to listbox > Options = LIXBOX > DSQUERY = SQLSERVER > TDSHOST = lixbox > TDSPORT = 5000 > TDSVER = 5.0 > SQLSERVER_CATALOG = N > CURSOR_SENSITIVITY = LOW > UserName = sa > Password = XXXXXXXX > ServerType = Sybase 10/11/12 > Driver = /opt/openlink/lib/sql_mt_lt.so > Database = pubs2 > ReadOnly = no > NoAutoCommit = No > NoLoginBox = No > FetchBufferSize = 60 > > > Other relevant data: > - Connecting via OpenLink's iODBC > - Zope 2.7.6-final > - Python 2.3.4 > - Connection to Sybase has been successfully tested with iODBC, > including issuing a query > - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC > connection > > > > RJ Juneau > Chief Technology Officer > Maxxian Integration Inc. > 155 Westhampton Drive > Thornhill, Ontario > Canada L4J 7X2 > E-mail: rj@maxxian.com > Phone: +1 905 482 9429 > Cell: +1 416 897 6682 > Toll free: +1 866 758 9161 > Fax: +1 647 722 2038 > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 06 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From calisp at gmail.com Sun May 15 23:49:03 2005 From: calisp at gmail.com (calisp@gmail.com) Date: Sat Feb 11 08:14:00 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK Message-ID: Hi, I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the following error... 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the last phase of a two-phase commit. This shouldn't happen. Traceback (most recent call last): File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one jar.tpc_finish(self) File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish try: self._finish() File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could not perform COMMIT or ROLLBACK', 1023) What could be causing this? Can I get the mxODBCZopeDA source from somewhere? It would make debugging this much easier. Thanks, Calisp. From mal at egenix.com Mon May 16 13:52:12 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Feb 11 08:14:00 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK In-Reply-To: References: Message-ID: <42887B5C.4010109@egenix.com> calisp@gmail.com wrote: > Hi, > > I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with > unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the > following error... > > 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the > last phase of a two-phase commit. This shouldn't happen. > Traceback (most recent call last): > File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one > jar.tpc_finish(self) > File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish > try: self._finish() > File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish > File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler > ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could > not perform COMMIT or ROLLBACK', 1023) You should have a look at the database logs to see what prevented the commit from being completed. > What could be causing this? Hard to say: mxODBCZopeDA is trying to commit the transaction, but the driver or database failed to complete the request. The above error was generated by the ODBC driver. This could be network or DNS problems, or be related to a bug in FreeTDS (which is getting more stable with every new release, but should still be considered beta quality software at the moment). > Can I get the mxODBCZopeDA source from > somewhere? It would make debugging this much easier. Getting the source is not an option and won't help much either since the source of the problem is not mxODBCZopeDA. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 16 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Sun May 1 21:29:25 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Feb 11 12:03:10 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <427259F3.4090806@egenix.com> References: <20050427130906.52878.qmail@web30008.mail.mud.yahoo.com> <427259F3.4090806@egenix.com> Message-ID: <42752005.7080904@egenix.com> M.-A. Lemburg wrote: > David Rushby wrote: > >> --- "M.-A. Lemburg" wrote: >> >>> Are you using the standard mxDateTime build or one >>> with WANT_SUBCLASSABLE_TYPES defined... >> >> >> >> Presumably "the standard", since I just built with 'py24d setup.py >> build', making no attempt to enable special directives. >> >> >>> ... (mxDateTime_Deallocate is only used by the latter)? >> >> >> >> That's true in 2.1.0-2005-04-15, but not in 2.1.0b5. >> >> >>> In any case, please try our latest snapshot: >>> >>> >> >> http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-04-15.zip >> >>> to see if that makes any difference. >> >> >> >> I can't build it out of the box: > > > Hmm, looks like distutils' sdist command doesn't like our new > repository layout which uses symlinks (after we've switched to > subversion). > > We'll have to debug distutils first, I guess :-( Ok, we've found the problem and fixed it. Here's the new release (which does build out of the box at least on our boxes ;-): http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 01 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From davidrushby at yahoo.com Mon May 2 15:49:53 2005 From: davidrushby at yahoo.com (David Rushby) Date: Sat Feb 11 12:03:10 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Ok, we've found the problem and fixed it. Here's the new > release (which does build out of the box at least on our > boxes ;-): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip It does build now, but: py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" still behaves as it did when I submitted my original message: Fatal Python error: UNREF invalid object Aborted This is the same debug build of Python 2.4.1 that I was previously using, running the same configuration (CentOS Linux 4.0/i386, everything compiled with GCC 3.4.3). Have you examined my original claim as to the cause of the bug? __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 10:21:55 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Feb 11 12:03:10 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> References: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> Message-ID: <42772693.8050306@egenix.com> David Rushby wrote: > --- "M.-A. Lemburg" wrote: > >>Ok, we've found the problem and fixed it. Here's the new >>release (which does build out of the box at least on our >>boxes ;-): >> >> > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip > > It does build now, but: > py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" > still behaves as it did when I submitted my original message: > Fatal Python error: UNREF invalid object > Aborted > > This is the same debug build of Python 2.4.1 that I was previously > using, running the same configuration (CentOS Linux 4.0/i386, > everything compiled with GCC 3.4.3). > > Have you examined my original claim as to the cause of the bug? No. We haven't had time for looking into it. I'm not sure whether your analysis of the problem is correct: if you don't define WANT_SUBCLASSABLE_TYPES, the API mxDateTime_Deallocate() is neither defined nor used. Furthermore, PyObject_Del() is only called by mxDateTime_Free() if you have explicitely edited mxDateTime.c to disabled the free list #defines. In a standard build, PyObject_Del() is only called at module finalization time. Note that the reason we call mxDateTime_Free() in the constructor is that we don't want the destructor of the object to be called. Py_DECREF() would call the destructor (mxDateTime_Deallocate). It is possible that the debug code in Python complains about the refcount in the object not being 0 at the time the object is finalized (module finalization time), but I don't see any such checks in PyObject_Free() (which is what PyObject_Del() maps to). Again, all of this does not happen in regular non-debug Python builds. Please be aware that we don't support debug builds, so fixing the problem (if there is one - gcc has some serious optimization problems on some combinations of platform and version) will take a while. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 09:27:37 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Sat Feb 11 12:03:10 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 Message-ID: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Hi all- I am trying to build the mx-base package, v.2.0.6. This will be used with postgresql 7.3.9, psycopg 1.1.18, and Roundup 0.8.2. RHEL 3.0 Python 2.3 egenix-mx-base-2.0.6.tar.gz I performed a: /usr/local/bin/python2.3 setup.py install Everything looks proper with the exeception of this series of warning statements: ----------------- gcc -pthread -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fno-strict-aliasing -fPIC -Imx/BeeBase/mxBeeBase -I/usr/local/incl ude/python2.3 -I/usr/local/include -c mx/BeeBase/mxBeeBase/btr.c -o build/temp.linux-i686-2.3/mx/BeeBase/mxBeeBase/mxBeeBa se/mx/BeeBase/mxBeeBase/btr.o mx/BeeBase/mxBeeBase/btr.c: In function `dumpBuf': mx/BeeBase/mxBeeBase/btr.c:249: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:250: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:255: warning: unsigned int format, long unsigned int arg (arg 4) mx/BeeBase/mxBeeBase/btr.c:256: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c: In function `_validateTree': mx/BeeBase/mxBeeBase/btr.c:330: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:337: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:339: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:349: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:351: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 3) creating build/lib.linux-i686-2.3/mx/BeeBase creating build/lib.linux-i686-2.3/mx/BeeBase/mxBeeBase -------------- Would someone be kind enough to let me know whether these messages were expected, and if not, how I might resolve these? Thanks! DC __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 22:06:33 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Feb 11 12:03:10 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> References: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Message-ID: <4277CBB9.8020302@egenix.com> Dianne Chen wrote: > Hi all- > > I am trying to build the mx-base package, v.2.0.6. > This will be used with postgresql 7.3.9, psycopg > 1.1.18, and Roundup 0.8.2. > > RHEL 3.0 > Python 2.3 > egenix-mx-base-2.0.6.tar.gz > > I performed a: > > /usr/local/bin/python2.3 setup.py install > > Everything looks proper with the exeception of this > series of warning statements: > > ----------------- > ... > -------------- > > Would someone be kind enough to let me know whether > these messages were expected, and if not, how I might > resolve these? These warning can safely be ignored. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 13:41:14 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Sat Feb 11 12:03:10 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: 6667 Message-ID: <20050503194114.72091.qmail@web31414.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Dianne Chen wrote: > > Hi all- > > > > I am trying to build the mx-base package, v.2.0.6. > > This will be used with postgresql 7.3.9, psycopg > > 1.1.18, and Roundup 0.8.2. > > > > RHEL 3.0 > > Python 2.3 > > egenix-mx-base-2.0.6.tar.gz > > > > I performed a: > > > > /usr/local/bin/python2.3 setup.py install > > > > Everything looks proper with the exeception of > this > > series of warning statements: > > > > ----------------- > > ... > > -------------- > > > > Would someone be kind enough to let me know > whether > > these messages were expected, and if not, how I > might > > resolve these? > > These warning can safely be ignored. > > -- > Marc-Andre Lemburg > eGenix.com > Marc- Thank you very much for the reply. It helps greatly. With kind regards, DC __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From davidrushby at yahoo.com Tue May 3 17:18:46 2005 From: davidrushby at yahoo.com (David Rushby) Date: Sat Feb 11 12:03:10 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050503231846.35012.qmail@web30009.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > I'm not sure whether your analysis of the problem is correct... Indeed, my original analysis wasn't correct; I think this one is. The fatal error I'm complaining about only arises if the arguments to DateTime.DateTime are invalid, so that the object is deallocated in the onError block of mxDateTime_FromDateAndTime. If the object is created successfully, and later deallocated by Python's garbage collector, the fatal error doesn't arise. Here's my analysis of the problem: --- If the debugging directive Py_TRACE_REFS is enabled, as it is in my case, the Python interpreter maintains a doubly linked list of all Python objects (named refchain) via the _ob_next and _ob_prev pointers added to PyObject via _PyObject_HEAD_EXTRA. Each object is inserted into refchain by the _Py_AddToAllObjects call in _Py_NewReference, and removed from refchain by the _Py_ForgetReference call in _Py_Dealloc. _Py_ForgetReference performs an integrity check on the object being deallocated (op) to make sure that its neighbors in refchain recognize it. Specifically, _Py_ForgetReference verifies that the _ob_next pointer of the previous object in refchain (op->_ob_prev->_ob_next) points to op, and that the _ob_prev pointer of the next object in refchain (op->_ob_next->_ob_prev) points to op. If either of those conditions is false, the interpreter raises the fatal error I'm seeing. After mxDateTime_New pulls an mxDateTimeObject out of the free list, it calls _Py_NewReference on that object to transform it from a "conceptually deallocated" object to a "conceptually allocated" one. _Py_NewReference inserts the object into refchain. Later, when the object is being "conceptually deallocated", it should be removed from refchain with _Py_ForgetReference. The version of _Py_Dealloc that's active when Py_TRACE_REFS is enabled does this (_Py_Dealloc is the element of Py_DECREF that performs the actual destruction). _Py_Dealloc first calls _Py_ForgetReference to remove the object from refchain, then calls the object's destructor (op->ob_type->tp_dealloc). If WANT_SUBCLASSABLE_TYPES is not defined (it is not in my case), the destructor for mxDateTime_Type is mxDateTime_Free. So, if a DateTime object is deallocated normally, as a result of its reference count falling to zero, _Py_Dealloc is called on the object, which first removes it from refchain, then passes it to mxDateTime_Free. If a DateTime object is destroyed prematurely, as a result of invalid arguments to its destructor, the onError handler calls mxDateTime_Free, so the object is "conceptually deallocated" (placed in the free list), *but* the object is not removed from refchain. So if a refchain-membership-integrity-check is performed on the object in question or one of its immediate neighbors in refchain, that integrity check fails, leading to the fatal error. --- The solution is to 'Py_DECREF(...)' the object in the onError handler of its constructor, instead of passing the object directly to mxDateTime_Free. That change solves two problems: 1) It causes _Py_Dealloc to execute, which in turn executes _Py_ForgetReference, so the object is removed from refchain, as it should be. 2) At present, objects that are created successfully and later deallocated by normal reference count mechanics have a reference count of 0 when they enter the free list, whereas objects whose constructors abort their creation due to invalid arguments have a reference count of 1 when they enter the free list. Although AFAIK this doesn't cause an actual execution problem (because the object's reference count is *explicitly set to 1* rather than *incremented by 1* when the object is later "conceptually allocated" by _Py_NewReference), it is likely to confuse future maintainers and thereby lead to the introduction of an actual execution problem. I assume that if you agree that this is a reasonable solution, you'll want to apply the change not only to mxDateTime_FromDateAndTime, but to all similar constructors in mxDateTime.c. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From rj at maxxian.com Thu May 5 01:57:40 2005 From: rj at maxxian.com (RJ Juneau) Date: Sat Feb 11 12:03:11 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c5512e$f72798c0$6505a8c0@rjlaptop> I'm on the 30 day evaluation for mxodbc_zope_da. I'm getting the following error when I submit some queries: Error Type: KeyError Error Value: 'query' I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 with UCS4. The error seems to be caused by multiple rows being returned. I did see an earlier posting with the same error message. The response suggested a template error, but this is clearly not the case here. The additional evidence I've gathered so far: - I'm running the test directly from the ZSQL method, so there's no template involved. - If I use the same query with an additional "where" clause to ensure that only one row is returned, it works - If I use a value in the 'where' clause with no rows returned, it works - The same ZSQL query is being used on a Windows machine running Zope and the free ZODBC module without a problem - The query has been verified directly in mysql-client-browser Other info: - The database is MySQL 4.1.10A-0 - iODBC is the DB driver RJ Juneau -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050505/68d278bf/attachment-0118.htm From mal at egenix.com Thu May 5 12:37:43 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Feb 11 12:03:11 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c5512e$f72798c0$6505a8c0@rjlaptop> References: <000301c5512e$f72798c0$6505a8c0@rjlaptop> Message-ID: <4279E967.6010904@egenix.com> RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 > with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 09:37:42 2005 From: rj at maxxian.com (RJ Juneau) Date: Sat Feb 11 12:03:11 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000101c5516f$3b96de90$6505a8c0@rjlaptop> More interesting info on the problem: If I execute the query directly in the "test" window of the base eGenix mxODBC Database Connection window, it works fine and returns the 20 lines expected. That could point to a problem in the rendering, which seems to be where the traceback ends. Note that within the same Zope system I also have an ODBC connection to a Sybase database, and I have successfully tested multi-line ZSQL queries there. This is the traceback: Time 2005/05/05 07:55:15.294 GMT-4 Exception Type KeyError Exception Value 'query' Traceback (innermost last): Module ZPublisher.Publish, line 101, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 39, in call_object Module Shared.DC.ZRDB.DA, line 337, in manage_test Module DocumentTemplate.DT_String, line 474, in __call__ Module DocumentTemplate.DT_In, line 602, in renderwb Module DocumentTemplate.DT_Var, line 219, in render KeyError: 'query' I don't think the following is an issue, but I'll include it for completeness.I am also getting the following iODBC warnings and errors in the Zope console log, which are related to the ODBC parameters being passed by iODBC. Note that these errors also appear for all of the successful queries. [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (Setup). [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (UsageCount). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Timeout). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Reuse). As for the ZSQL snippet from the template... Since there's no template involved yet (I'm still testing directly from the ZSQL method), I assume you mean the SQL code? select h.host_name, s.system_name, s.system_handle, count(*) from terminal t, system_map s, host h where t.system_index = s.system_index and s.host_index = h.host_index group by s.system_name order by h.host_name Nothing complicated here. There are no parameters passed to the query. RJ -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: May 5, 2005 5:38 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: Re: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is > 2.3.4 with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ---------------------------------------------------------------------- > -- > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 16:00:32 2005 From: charlie at egenix.com (Charlie Clark) Date: Sat Feb 11 12:03:11 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000101c5516f$3b96de90$6505a8c0@rjlaptop> References: <000101c5516f$3b96de90$6505a8c0@rjlaptop> Message-ID: <20050505150032.644.1@bepc.1115296715.fake> On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base eGenix > mxODBC Database Connection window, it works fine and returns the 20 > lines expected. That could point to a problem in the rendering, which > seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection to > a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 10:22:17 2005 From: rj at maxxian.com (RJ Juneau) Date: Sat Feb 11 12:03:11 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505150032.644.1@bepc.1115296715.fake> Message-ID: <000201c55175$75bcad10$6505a8c0@rjlaptop> At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 11:47:14 2005 From: rj at maxxian.com (RJ Juneau) Date: Sat Feb 11 12:03:11 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c55181$549be0e0$6505a8c0@rjlaptop> Charlie, I found a fix. Here it is in case anyone else runs into this. You were correct - the problem is in another part of Zope. Based on your feedback, I did a bit more searching and found something here: http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. html The problem appears to be in Zope versions after 2.7.0. I'm running 2.7.6, and the post indicates that it also happens in 2.7.4. The solution: Edit file /lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. There are two lines in the file that start with . Edit them as follows: Change first line to: Change second line to: Just to be after, I shut down Zope before I made the changes and restarted it after. Thanks for the help! RJ -----Original Message----- From: RJ Juneau [mailto:rj@maxxian.com] Sent: May 5, 2005 9:22 AM To: 'Charlie Clark' Cc: 'egenix-users@lists.egenix.com' Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 17:57:25 2005 From: charlie at egenix.com (Charlie Clark) Date: Sat Feb 11 12:03:11 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <20050505165725.3380.2@bepc.1115296715.fake> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Thu May 5 09:15:21 2005 From: charlie at egenix.com (Charlie Clark) Date: Sat Feb 11 12:03:11 2006 Subject: [Zope-DB] RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <000001c55185$41477730$6b00a8c0@fonacier.local> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________ Zope-DB mailing list Zope-DB@zope.org http://mail.zope.org/mailman/listinfo/zope-db From rj at maxxian.com Thu May 5 12:38:00 2005 From: rj at maxxian.com (RJ Juneau) Date: Sat Feb 11 12:03:11 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000001c55188$6b841eb0$6505a8c0@rjlaptop> I just double-checked. Zope-2.7.6-final. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 12:49:16 2005 From: rj at maxxian.com (RJ Juneau) Date: Sat Feb 11 12:03:11 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000501c55189$fe149ba0$6505a8c0@rjlaptop> Charlie, The fix has only been applied for 2.7.7, 2.8b2. The info is in the original bug report which is closed and can be found here: http://www.zope.org/Collectors/Zope/1745 RJ -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Fri May 6 11:50:09 2005 From: rj at maxxian.com (RJ Juneau) Date: Sat Feb 11 12:03:11 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC Message-ID: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Still on eval for the product. I cannot get a stable connection to Sybase via the iODBC drivers. - The Sybase ODBC connection - including a query - have been verified at the iODBC level. - The setup is already working well for ODBC connection to MySQL. Symptoms include: - If I click on "Open Connection", it still comes back with "Connection Closed" when I go to a ZSQL method - Using 'Connect on Demand' is not working either. - Clicking "Open Connection" gives me the following error: Connection string: DSN=lixbox_sybase; UID=sa; PWD=XXXXXXX Connection pool entry: 0 Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection rejected by data source', 7952) The odbc.ini definition for DSN "lixbox_sybase" is as follows: [lixbox_sybase] JetFix = No NoRowSetSizeLimit = No Description = Test connection to listbox Options = LIXBOX DSQUERY = SQLSERVER TDSHOST = lixbox TDSPORT = 5000 TDSVER = 5.0 SQLSERVER_CATALOG = N CURSOR_SENSITIVITY = LOW UserName = sa Password = XXXXXXXX ServerType = Sybase 10/11/12 Driver = /opt/openlink/lib/sql_mt_lt.so Database = pubs2 ReadOnly = no NoAutoCommit = No NoLoginBox = No FetchBufferSize = 60 Other relevant data: - Connecting via OpenLink's iODBC - Zope 2.7.6-final - Python 2.3.4 - Connection to Sybase has been successfully tested with iODBC, including issuing a query - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC connection RJ Juneau Chief Technology Officer Maxxian Integration Inc. 155 Westhampton Drive Thornhill, Ontario Canada L4J 7X2 E-mail: rj@maxxian.com Phone: +1 905 482 9429 Cell: +1 416 897 6682 Toll free: +1 866 758 9161 Fax: +1 647 722 2038 -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050506/aef33361/attachment-0118.htm From mal at egenix.com Fri May 6 18:27:37 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Feb 11 12:03:11 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC In-Reply-To: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> References: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Message-ID: <427B8CE9.1010601@egenix.com> RJ Juneau wrote: > Still on eval for the product. > > I cannot get a stable connection to Sybase via the iODBC drivers. > > - The Sybase ODBC connection - including a query - have been verified at > the iODBC level. > - The setup is already working well for ODBC connection to MySQL. > > Symptoms include: > > - If I click on "Open Connection", it still comes back with "Connection > Closed" when I go to a ZSQL method > - Using 'Connect on Demand' is not working either. > - Clicking "Open Connection" gives me the following error: > > Connection string: DSN=lixbox_sybase; > UID=sa; > PWD=XXXXXXX Try writing the connection string on one line and without whitespace. ODBC drivers sometimes have problems with this. > Connection pool entry: 0 > Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection > rejected by data source', 7952) This is a generic error that relates to authentication or firewall problems. It is possible that turning on ODBC tracing the ODBC manager will give more clues as to the real cause of the problem. > The odbc.ini definition for DSN "lixbox_sybase" is as follows: > > [lixbox_sybase] > JetFix = No > NoRowSetSizeLimit = No > Description = Test connection to listbox > Options = LIXBOX > DSQUERY = SQLSERVER > TDSHOST = lixbox > TDSPORT = 5000 > TDSVER = 5.0 > SQLSERVER_CATALOG = N > CURSOR_SENSITIVITY = LOW > UserName = sa > Password = XXXXXXXX > ServerType = Sybase 10/11/12 > Driver = /opt/openlink/lib/sql_mt_lt.so > Database = pubs2 > ReadOnly = no > NoAutoCommit = No > NoLoginBox = No > FetchBufferSize = 60 > > > Other relevant data: > - Connecting via OpenLink's iODBC > - Zope 2.7.6-final > - Python 2.3.4 > - Connection to Sybase has been successfully tested with iODBC, > including issuing a query > - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC > connection > > > > RJ Juneau > Chief Technology Officer > Maxxian Integration Inc. > 155 Westhampton Drive > Thornhill, Ontario > Canada L4J 7X2 > E-mail: rj@maxxian.com > Phone: +1 905 482 9429 > Cell: +1 416 897 6682 > Toll free: +1 866 758 9161 > Fax: +1 647 722 2038 > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 06 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From calisp at gmail.com Sun May 15 23:49:03 2005 From: calisp at gmail.com (calisp@gmail.com) Date: Sat Feb 11 12:03:11 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK Message-ID: Hi, I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the following error... 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the last phase of a two-phase commit. This shouldn't happen. Traceback (most recent call last): File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one jar.tpc_finish(self) File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish try: self._finish() File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could not perform COMMIT or ROLLBACK', 1023) What could be causing this? Can I get the mxODBCZopeDA source from somewhere? It would make debugging this much easier. Thanks, Calisp. From mal at egenix.com Mon May 16 13:52:12 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Feb 11 12:03:11 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK In-Reply-To: References: Message-ID: <42887B5C.4010109@egenix.com> calisp@gmail.com wrote: > Hi, > > I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with > unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the > following error... > > 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the > last phase of a two-phase commit. This shouldn't happen. > Traceback (most recent call last): > File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one > jar.tpc_finish(self) > File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish > try: self._finish() > File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish > File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler > ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could > not perform COMMIT or ROLLBACK', 1023) You should have a look at the database logs to see what prevented the commit from being completed. > What could be causing this? Hard to say: mxODBCZopeDA is trying to commit the transaction, but the driver or database failed to complete the request. The above error was generated by the ODBC driver. This could be network or DNS problems, or be related to a bug in FreeTDS (which is getting more stable with every new release, but should still be considered beta quality software at the moment). > Can I get the mxODBCZopeDA source from > somewhere? It would make debugging this much easier. Getting the source is not an option and won't help much either since the source of the problem is not mxODBCZopeDA. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 16 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Sun May 1 21:29:25 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Feb 11 16:01:18 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <427259F3.4090806@egenix.com> References: <20050427130906.52878.qmail@web30008.mail.mud.yahoo.com> <427259F3.4090806@egenix.com> Message-ID: <42752005.7080904@egenix.com> M.-A. Lemburg wrote: > David Rushby wrote: > >> --- "M.-A. Lemburg" wrote: >> >>> Are you using the standard mxDateTime build or one >>> with WANT_SUBCLASSABLE_TYPES defined... >> >> >> >> Presumably "the standard", since I just built with 'py24d setup.py >> build', making no attempt to enable special directives. >> >> >>> ... (mxDateTime_Deallocate is only used by the latter)? >> >> >> >> That's true in 2.1.0-2005-04-15, but not in 2.1.0b5. >> >> >>> In any case, please try our latest snapshot: >>> >>> >> >> http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-04-15.zip >> >>> to see if that makes any difference. >> >> >> >> I can't build it out of the box: > > > Hmm, looks like distutils' sdist command doesn't like our new > repository layout which uses symlinks (after we've switched to > subversion). > > We'll have to debug distutils first, I guess :-( Ok, we've found the problem and fixed it. Here's the new release (which does build out of the box at least on our boxes ;-): http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 01 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From davidrushby at yahoo.com Mon May 2 15:49:53 2005 From: davidrushby at yahoo.com (David Rushby) Date: Sat Feb 11 16:01:18 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Ok, we've found the problem and fixed it. Here's the new > release (which does build out of the box at least on our > boxes ;-): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip It does build now, but: py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" still behaves as it did when I submitted my original message: Fatal Python error: UNREF invalid object Aborted This is the same debug build of Python 2.4.1 that I was previously using, running the same configuration (CentOS Linux 4.0/i386, everything compiled with GCC 3.4.3). Have you examined my original claim as to the cause of the bug? __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 10:21:55 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Feb 11 16:01:18 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> References: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> Message-ID: <42772693.8050306@egenix.com> David Rushby wrote: > --- "M.-A. Lemburg" wrote: > >>Ok, we've found the problem and fixed it. Here's the new >>release (which does build out of the box at least on our >>boxes ;-): >> >> > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip > > It does build now, but: > py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" > still behaves as it did when I submitted my original message: > Fatal Python error: UNREF invalid object > Aborted > > This is the same debug build of Python 2.4.1 that I was previously > using, running the same configuration (CentOS Linux 4.0/i386, > everything compiled with GCC 3.4.3). > > Have you examined my original claim as to the cause of the bug? No. We haven't had time for looking into it. I'm not sure whether your analysis of the problem is correct: if you don't define WANT_SUBCLASSABLE_TYPES, the API mxDateTime_Deallocate() is neither defined nor used. Furthermore, PyObject_Del() is only called by mxDateTime_Free() if you have explicitely edited mxDateTime.c to disabled the free list #defines. In a standard build, PyObject_Del() is only called at module finalization time. Note that the reason we call mxDateTime_Free() in the constructor is that we don't want the destructor of the object to be called. Py_DECREF() would call the destructor (mxDateTime_Deallocate). It is possible that the debug code in Python complains about the refcount in the object not being 0 at the time the object is finalized (module finalization time), but I don't see any such checks in PyObject_Free() (which is what PyObject_Del() maps to). Again, all of this does not happen in regular non-debug Python builds. Please be aware that we don't support debug builds, so fixing the problem (if there is one - gcc has some serious optimization problems on some combinations of platform and version) will take a while. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 09:27:37 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Sat Feb 11 16:01:18 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 Message-ID: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Hi all- I am trying to build the mx-base package, v.2.0.6. This will be used with postgresql 7.3.9, psycopg 1.1.18, and Roundup 0.8.2. RHEL 3.0 Python 2.3 egenix-mx-base-2.0.6.tar.gz I performed a: /usr/local/bin/python2.3 setup.py install Everything looks proper with the exeception of this series of warning statements: ----------------- gcc -pthread -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fno-strict-aliasing -fPIC -Imx/BeeBase/mxBeeBase -I/usr/local/incl ude/python2.3 -I/usr/local/include -c mx/BeeBase/mxBeeBase/btr.c -o build/temp.linux-i686-2.3/mx/BeeBase/mxBeeBase/mxBeeBa se/mx/BeeBase/mxBeeBase/btr.o mx/BeeBase/mxBeeBase/btr.c: In function `dumpBuf': mx/BeeBase/mxBeeBase/btr.c:249: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:250: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:255: warning: unsigned int format, long unsigned int arg (arg 4) mx/BeeBase/mxBeeBase/btr.c:256: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c: In function `_validateTree': mx/BeeBase/mxBeeBase/btr.c:330: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:337: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:339: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:349: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:351: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 3) creating build/lib.linux-i686-2.3/mx/BeeBase creating build/lib.linux-i686-2.3/mx/BeeBase/mxBeeBase -------------- Would someone be kind enough to let me know whether these messages were expected, and if not, how I might resolve these? Thanks! DC __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 22:06:33 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Feb 11 16:01:18 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> References: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Message-ID: <4277CBB9.8020302@egenix.com> Dianne Chen wrote: > Hi all- > > I am trying to build the mx-base package, v.2.0.6. > This will be used with postgresql 7.3.9, psycopg > 1.1.18, and Roundup 0.8.2. > > RHEL 3.0 > Python 2.3 > egenix-mx-base-2.0.6.tar.gz > > I performed a: > > /usr/local/bin/python2.3 setup.py install > > Everything looks proper with the exeception of this > series of warning statements: > > ----------------- > ... > -------------- > > Would someone be kind enough to let me know whether > these messages were expected, and if not, how I might > resolve these? These warning can safely be ignored. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 13:41:14 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Sat Feb 11 16:01:18 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: 6667 Message-ID: <20050503194114.72091.qmail@web31414.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Dianne Chen wrote: > > Hi all- > > > > I am trying to build the mx-base package, v.2.0.6. > > This will be used with postgresql 7.3.9, psycopg > > 1.1.18, and Roundup 0.8.2. > > > > RHEL 3.0 > > Python 2.3 > > egenix-mx-base-2.0.6.tar.gz > > > > I performed a: > > > > /usr/local/bin/python2.3 setup.py install > > > > Everything looks proper with the exeception of > this > > series of warning statements: > > > > ----------------- > > ... > > -------------- > > > > Would someone be kind enough to let me know > whether > > these messages were expected, and if not, how I > might > > resolve these? > > These warning can safely be ignored. > > -- > Marc-Andre Lemburg > eGenix.com > Marc- Thank you very much for the reply. It helps greatly. With kind regards, DC __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From davidrushby at yahoo.com Tue May 3 17:18:46 2005 From: davidrushby at yahoo.com (David Rushby) Date: Sat Feb 11 16:01:18 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050503231846.35012.qmail@web30009.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > I'm not sure whether your analysis of the problem is correct... Indeed, my original analysis wasn't correct; I think this one is. The fatal error I'm complaining about only arises if the arguments to DateTime.DateTime are invalid, so that the object is deallocated in the onError block of mxDateTime_FromDateAndTime. If the object is created successfully, and later deallocated by Python's garbage collector, the fatal error doesn't arise. Here's my analysis of the problem: --- If the debugging directive Py_TRACE_REFS is enabled, as it is in my case, the Python interpreter maintains a doubly linked list of all Python objects (named refchain) via the _ob_next and _ob_prev pointers added to PyObject via _PyObject_HEAD_EXTRA. Each object is inserted into refchain by the _Py_AddToAllObjects call in _Py_NewReference, and removed from refchain by the _Py_ForgetReference call in _Py_Dealloc. _Py_ForgetReference performs an integrity check on the object being deallocated (op) to make sure that its neighbors in refchain recognize it. Specifically, _Py_ForgetReference verifies that the _ob_next pointer of the previous object in refchain (op->_ob_prev->_ob_next) points to op, and that the _ob_prev pointer of the next object in refchain (op->_ob_next->_ob_prev) points to op. If either of those conditions is false, the interpreter raises the fatal error I'm seeing. After mxDateTime_New pulls an mxDateTimeObject out of the free list, it calls _Py_NewReference on that object to transform it from a "conceptually deallocated" object to a "conceptually allocated" one. _Py_NewReference inserts the object into refchain. Later, when the object is being "conceptually deallocated", it should be removed from refchain with _Py_ForgetReference. The version of _Py_Dealloc that's active when Py_TRACE_REFS is enabled does this (_Py_Dealloc is the element of Py_DECREF that performs the actual destruction). _Py_Dealloc first calls _Py_ForgetReference to remove the object from refchain, then calls the object's destructor (op->ob_type->tp_dealloc). If WANT_SUBCLASSABLE_TYPES is not defined (it is not in my case), the destructor for mxDateTime_Type is mxDateTime_Free. So, if a DateTime object is deallocated normally, as a result of its reference count falling to zero, _Py_Dealloc is called on the object, which first removes it from refchain, then passes it to mxDateTime_Free. If a DateTime object is destroyed prematurely, as a result of invalid arguments to its destructor, the onError handler calls mxDateTime_Free, so the object is "conceptually deallocated" (placed in the free list), *but* the object is not removed from refchain. So if a refchain-membership-integrity-check is performed on the object in question or one of its immediate neighbors in refchain, that integrity check fails, leading to the fatal error. --- The solution is to 'Py_DECREF(...)' the object in the onError handler of its constructor, instead of passing the object directly to mxDateTime_Free. That change solves two problems: 1) It causes _Py_Dealloc to execute, which in turn executes _Py_ForgetReference, so the object is removed from refchain, as it should be. 2) At present, objects that are created successfully and later deallocated by normal reference count mechanics have a reference count of 0 when they enter the free list, whereas objects whose constructors abort their creation due to invalid arguments have a reference count of 1 when they enter the free list. Although AFAIK this doesn't cause an actual execution problem (because the object's reference count is *explicitly set to 1* rather than *incremented by 1* when the object is later "conceptually allocated" by _Py_NewReference), it is likely to confuse future maintainers and thereby lead to the introduction of an actual execution problem. I assume that if you agree that this is a reasonable solution, you'll want to apply the change not only to mxDateTime_FromDateAndTime, but to all similar constructors in mxDateTime.c. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From rj at maxxian.com Thu May 5 01:57:40 2005 From: rj at maxxian.com (RJ Juneau) Date: Sat Feb 11 16:01:18 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c5512e$f72798c0$6505a8c0@rjlaptop> I'm on the 30 day evaluation for mxodbc_zope_da. I'm getting the following error when I submit some queries: Error Type: KeyError Error Value: 'query' I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 with UCS4. The error seems to be caused by multiple rows being returned. I did see an earlier posting with the same error message. The response suggested a template error, but this is clearly not the case here. The additional evidence I've gathered so far: - I'm running the test directly from the ZSQL method, so there's no template involved. - If I use the same query with an additional "where" clause to ensure that only one row is returned, it works - If I use a value in the 'where' clause with no rows returned, it works - The same ZSQL query is being used on a Windows machine running Zope and the free ZODBC module without a problem - The query has been verified directly in mysql-client-browser Other info: - The database is MySQL 4.1.10A-0 - iODBC is the DB driver RJ Juneau -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050505/68d278bf/attachment-0119.htm From mal at egenix.com Thu May 5 12:37:43 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Feb 11 16:01:18 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c5512e$f72798c0$6505a8c0@rjlaptop> References: <000301c5512e$f72798c0$6505a8c0@rjlaptop> Message-ID: <4279E967.6010904@egenix.com> RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 > with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 09:37:42 2005 From: rj at maxxian.com (RJ Juneau) Date: Sat Feb 11 16:01:18 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000101c5516f$3b96de90$6505a8c0@rjlaptop> More interesting info on the problem: If I execute the query directly in the "test" window of the base eGenix mxODBC Database Connection window, it works fine and returns the 20 lines expected. That could point to a problem in the rendering, which seems to be where the traceback ends. Note that within the same Zope system I also have an ODBC connection to a Sybase database, and I have successfully tested multi-line ZSQL queries there. This is the traceback: Time 2005/05/05 07:55:15.294 GMT-4 Exception Type KeyError Exception Value 'query' Traceback (innermost last): Module ZPublisher.Publish, line 101, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 39, in call_object Module Shared.DC.ZRDB.DA, line 337, in manage_test Module DocumentTemplate.DT_String, line 474, in __call__ Module DocumentTemplate.DT_In, line 602, in renderwb Module DocumentTemplate.DT_Var, line 219, in render KeyError: 'query' I don't think the following is an issue, but I'll include it for completeness.I am also getting the following iODBC warnings and errors in the Zope console log, which are related to the ODBC parameters being passed by iODBC. Note that these errors also appear for all of the successful queries. [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (Setup). [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (UsageCount). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Timeout). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Reuse). As for the ZSQL snippet from the template... Since there's no template involved yet (I'm still testing directly from the ZSQL method), I assume you mean the SQL code? select h.host_name, s.system_name, s.system_handle, count(*) from terminal t, system_map s, host h where t.system_index = s.system_index and s.host_index = h.host_index group by s.system_name order by h.host_name Nothing complicated here. There are no parameters passed to the query. RJ -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: May 5, 2005 5:38 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: Re: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is > 2.3.4 with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ---------------------------------------------------------------------- > -- > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 16:00:32 2005 From: charlie at egenix.com (Charlie Clark) Date: Sat Feb 11 16:01:18 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000101c5516f$3b96de90$6505a8c0@rjlaptop> References: <000101c5516f$3b96de90$6505a8c0@rjlaptop> Message-ID: <20050505150032.644.1@bepc.1115296715.fake> On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base eGenix > mxODBC Database Connection window, it works fine and returns the 20 > lines expected. That could point to a problem in the rendering, which > seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection to > a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 10:22:17 2005 From: rj at maxxian.com (RJ Juneau) Date: Sat Feb 11 16:01:18 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505150032.644.1@bepc.1115296715.fake> Message-ID: <000201c55175$75bcad10$6505a8c0@rjlaptop> At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 11:47:14 2005 From: rj at maxxian.com (RJ Juneau) Date: Sat Feb 11 16:01:18 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c55181$549be0e0$6505a8c0@rjlaptop> Charlie, I found a fix. Here it is in case anyone else runs into this. You were correct - the problem is in another part of Zope. Based on your feedback, I did a bit more searching and found something here: http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. html The problem appears to be in Zope versions after 2.7.0. I'm running 2.7.6, and the post indicates that it also happens in 2.7.4. The solution: Edit file /lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. There are two lines in the file that start with . Edit them as follows: Change first line to: Change second line to: Just to be after, I shut down Zope before I made the changes and restarted it after. Thanks for the help! RJ -----Original Message----- From: RJ Juneau [mailto:rj@maxxian.com] Sent: May 5, 2005 9:22 AM To: 'Charlie Clark' Cc: 'egenix-users@lists.egenix.com' Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 17:57:25 2005 From: charlie at egenix.com (Charlie Clark) Date: Sat Feb 11 16:01:18 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <20050505165725.3380.2@bepc.1115296715.fake> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Thu May 5 09:15:21 2005 From: charlie at egenix.com (Charlie Clark) Date: Sat Feb 11 16:01:18 2006 Subject: [Zope-DB] RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <000001c55185$41477730$6b00a8c0@fonacier.local> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________ Zope-DB mailing list Zope-DB@zope.org http://mail.zope.org/mailman/listinfo/zope-db From rj at maxxian.com Thu May 5 12:38:00 2005 From: rj at maxxian.com (RJ Juneau) Date: Sat Feb 11 16:01:21 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000001c55188$6b841eb0$6505a8c0@rjlaptop> I just double-checked. Zope-2.7.6-final. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 12:49:16 2005 From: rj at maxxian.com (RJ Juneau) Date: Sat Feb 11 16:01:21 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000501c55189$fe149ba0$6505a8c0@rjlaptop> Charlie, The fix has only been applied for 2.7.7, 2.8b2. The info is in the original bug report which is closed and can be found here: http://www.zope.org/Collectors/Zope/1745 RJ -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Fri May 6 11:50:09 2005 From: rj at maxxian.com (RJ Juneau) Date: Sat Feb 11 16:01:21 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC Message-ID: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Still on eval for the product. I cannot get a stable connection to Sybase via the iODBC drivers. - The Sybase ODBC connection - including a query - have been verified at the iODBC level. - The setup is already working well for ODBC connection to MySQL. Symptoms include: - If I click on "Open Connection", it still comes back with "Connection Closed" when I go to a ZSQL method - Using 'Connect on Demand' is not working either. - Clicking "Open Connection" gives me the following error: Connection string: DSN=lixbox_sybase; UID=sa; PWD=XXXXXXX Connection pool entry: 0 Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection rejected by data source', 7952) The odbc.ini definition for DSN "lixbox_sybase" is as follows: [lixbox_sybase] JetFix = No NoRowSetSizeLimit = No Description = Test connection to listbox Options = LIXBOX DSQUERY = SQLSERVER TDSHOST = lixbox TDSPORT = 5000 TDSVER = 5.0 SQLSERVER_CATALOG = N CURSOR_SENSITIVITY = LOW UserName = sa Password = XXXXXXXX ServerType = Sybase 10/11/12 Driver = /opt/openlink/lib/sql_mt_lt.so Database = pubs2 ReadOnly = no NoAutoCommit = No NoLoginBox = No FetchBufferSize = 60 Other relevant data: - Connecting via OpenLink's iODBC - Zope 2.7.6-final - Python 2.3.4 - Connection to Sybase has been successfully tested with iODBC, including issuing a query - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC connection RJ Juneau Chief Technology Officer Maxxian Integration Inc. 155 Westhampton Drive Thornhill, Ontario Canada L4J 7X2 E-mail: rj@maxxian.com Phone: +1 905 482 9429 Cell: +1 416 897 6682 Toll free: +1 866 758 9161 Fax: +1 647 722 2038 -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050506/aef33361/attachment-0119.htm From mal at egenix.com Fri May 6 18:27:37 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Feb 11 16:01:21 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC In-Reply-To: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> References: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Message-ID: <427B8CE9.1010601@egenix.com> RJ Juneau wrote: > Still on eval for the product. > > I cannot get a stable connection to Sybase via the iODBC drivers. > > - The Sybase ODBC connection - including a query - have been verified at > the iODBC level. > - The setup is already working well for ODBC connection to MySQL. > > Symptoms include: > > - If I click on "Open Connection", it still comes back with "Connection > Closed" when I go to a ZSQL method > - Using 'Connect on Demand' is not working either. > - Clicking "Open Connection" gives me the following error: > > Connection string: DSN=lixbox_sybase; > UID=sa; > PWD=XXXXXXX Try writing the connection string on one line and without whitespace. ODBC drivers sometimes have problems with this. > Connection pool entry: 0 > Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection > rejected by data source', 7952) This is a generic error that relates to authentication or firewall problems. It is possible that turning on ODBC tracing the ODBC manager will give more clues as to the real cause of the problem. > The odbc.ini definition for DSN "lixbox_sybase" is as follows: > > [lixbox_sybase] > JetFix = No > NoRowSetSizeLimit = No > Description = Test connection to listbox > Options = LIXBOX > DSQUERY = SQLSERVER > TDSHOST = lixbox > TDSPORT = 5000 > TDSVER = 5.0 > SQLSERVER_CATALOG = N > CURSOR_SENSITIVITY = LOW > UserName = sa > Password = XXXXXXXX > ServerType = Sybase 10/11/12 > Driver = /opt/openlink/lib/sql_mt_lt.so > Database = pubs2 > ReadOnly = no > NoAutoCommit = No > NoLoginBox = No > FetchBufferSize = 60 > > > Other relevant data: > - Connecting via OpenLink's iODBC > - Zope 2.7.6-final > - Python 2.3.4 > - Connection to Sybase has been successfully tested with iODBC, > including issuing a query > - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC > connection > > > > RJ Juneau > Chief Technology Officer > Maxxian Integration Inc. > 155 Westhampton Drive > Thornhill, Ontario > Canada L4J 7X2 > E-mail: rj@maxxian.com > Phone: +1 905 482 9429 > Cell: +1 416 897 6682 > Toll free: +1 866 758 9161 > Fax: +1 647 722 2038 > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 06 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From calisp at gmail.com Sun May 15 23:49:03 2005 From: calisp at gmail.com (calisp@gmail.com) Date: Sat Feb 11 16:01:21 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK Message-ID: Hi, I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the following error... 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the last phase of a two-phase commit. This shouldn't happen. Traceback (most recent call last): File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one jar.tpc_finish(self) File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish try: self._finish() File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could not perform COMMIT or ROLLBACK', 1023) What could be causing this? Can I get the mxODBCZopeDA source from somewhere? It would make debugging this much easier. Thanks, Calisp. From mal at egenix.com Mon May 16 13:52:12 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Feb 11 16:01:21 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK In-Reply-To: References: Message-ID: <42887B5C.4010109@egenix.com> calisp@gmail.com wrote: > Hi, > > I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with > unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the > following error... > > 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the > last phase of a two-phase commit. This shouldn't happen. > Traceback (most recent call last): > File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one > jar.tpc_finish(self) > File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish > try: self._finish() > File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish > File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler > ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could > not perform COMMIT or ROLLBACK', 1023) You should have a look at the database logs to see what prevented the commit from being completed. > What could be causing this? Hard to say: mxODBCZopeDA is trying to commit the transaction, but the driver or database failed to complete the request. The above error was generated by the ODBC driver. This could be network or DNS problems, or be related to a bug in FreeTDS (which is getting more stable with every new release, but should still be considered beta quality software at the moment). > Can I get the mxODBCZopeDA source from > somewhere? It would make debugging this much easier. Getting the source is not an option and won't help much either since the source of the problem is not mxODBCZopeDA. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 16 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Sun May 1 21:29:25 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Feb 11 20:01:11 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <427259F3.4090806@egenix.com> References: <20050427130906.52878.qmail@web30008.mail.mud.yahoo.com> <427259F3.4090806@egenix.com> Message-ID: <42752005.7080904@egenix.com> M.-A. Lemburg wrote: > David Rushby wrote: > >> --- "M.-A. Lemburg" wrote: >> >>> Are you using the standard mxDateTime build or one >>> with WANT_SUBCLASSABLE_TYPES defined... >> >> >> >> Presumably "the standard", since I just built with 'py24d setup.py >> build', making no attempt to enable special directives. >> >> >>> ... (mxDateTime_Deallocate is only used by the latter)? >> >> >> >> That's true in 2.1.0-2005-04-15, but not in 2.1.0b5. >> >> >>> In any case, please try our latest snapshot: >>> >>> >> >> http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-04-15.zip >> >>> to see if that makes any difference. >> >> >> >> I can't build it out of the box: > > > Hmm, looks like distutils' sdist command doesn't like our new > repository layout which uses symlinks (after we've switched to > subversion). > > We'll have to debug distutils first, I guess :-( Ok, we've found the problem and fixed it. Here's the new release (which does build out of the box at least on our boxes ;-): http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 01 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From davidrushby at yahoo.com Mon May 2 15:49:53 2005 From: davidrushby at yahoo.com (David Rushby) Date: Sat Feb 11 20:01:11 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Ok, we've found the problem and fixed it. Here's the new > release (which does build out of the box at least on our > boxes ;-): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip It does build now, but: py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" still behaves as it did when I submitted my original message: Fatal Python error: UNREF invalid object Aborted This is the same debug build of Python 2.4.1 that I was previously using, running the same configuration (CentOS Linux 4.0/i386, everything compiled with GCC 3.4.3). Have you examined my original claim as to the cause of the bug? __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 10:21:55 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Feb 11 20:01:11 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> References: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> Message-ID: <42772693.8050306@egenix.com> David Rushby wrote: > --- "M.-A. Lemburg" wrote: > >>Ok, we've found the problem and fixed it. Here's the new >>release (which does build out of the box at least on our >>boxes ;-): >> >> > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip > > It does build now, but: > py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" > still behaves as it did when I submitted my original message: > Fatal Python error: UNREF invalid object > Aborted > > This is the same debug build of Python 2.4.1 that I was previously > using, running the same configuration (CentOS Linux 4.0/i386, > everything compiled with GCC 3.4.3). > > Have you examined my original claim as to the cause of the bug? No. We haven't had time for looking into it. I'm not sure whether your analysis of the problem is correct: if you don't define WANT_SUBCLASSABLE_TYPES, the API mxDateTime_Deallocate() is neither defined nor used. Furthermore, PyObject_Del() is only called by mxDateTime_Free() if you have explicitely edited mxDateTime.c to disabled the free list #defines. In a standard build, PyObject_Del() is only called at module finalization time. Note that the reason we call mxDateTime_Free() in the constructor is that we don't want the destructor of the object to be called. Py_DECREF() would call the destructor (mxDateTime_Deallocate). It is possible that the debug code in Python complains about the refcount in the object not being 0 at the time the object is finalized (module finalization time), but I don't see any such checks in PyObject_Free() (which is what PyObject_Del() maps to). Again, all of this does not happen in regular non-debug Python builds. Please be aware that we don't support debug builds, so fixing the problem (if there is one - gcc has some serious optimization problems on some combinations of platform and version) will take a while. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 09:27:37 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Sat Feb 11 20:01:11 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 Message-ID: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Hi all- I am trying to build the mx-base package, v.2.0.6. This will be used with postgresql 7.3.9, psycopg 1.1.18, and Roundup 0.8.2. RHEL 3.0 Python 2.3 egenix-mx-base-2.0.6.tar.gz I performed a: /usr/local/bin/python2.3 setup.py install Everything looks proper with the exeception of this series of warning statements: ----------------- gcc -pthread -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fno-strict-aliasing -fPIC -Imx/BeeBase/mxBeeBase -I/usr/local/incl ude/python2.3 -I/usr/local/include -c mx/BeeBase/mxBeeBase/btr.c -o build/temp.linux-i686-2.3/mx/BeeBase/mxBeeBase/mxBeeBa se/mx/BeeBase/mxBeeBase/btr.o mx/BeeBase/mxBeeBase/btr.c: In function `dumpBuf': mx/BeeBase/mxBeeBase/btr.c:249: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:250: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:255: warning: unsigned int format, long unsigned int arg (arg 4) mx/BeeBase/mxBeeBase/btr.c:256: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c: In function `_validateTree': mx/BeeBase/mxBeeBase/btr.c:330: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:337: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:339: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:349: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:351: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 3) creating build/lib.linux-i686-2.3/mx/BeeBase creating build/lib.linux-i686-2.3/mx/BeeBase/mxBeeBase -------------- Would someone be kind enough to let me know whether these messages were expected, and if not, how I might resolve these? Thanks! DC __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 22:06:33 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Feb 11 20:01:11 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> References: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Message-ID: <4277CBB9.8020302@egenix.com> Dianne Chen wrote: > Hi all- > > I am trying to build the mx-base package, v.2.0.6. > This will be used with postgresql 7.3.9, psycopg > 1.1.18, and Roundup 0.8.2. > > RHEL 3.0 > Python 2.3 > egenix-mx-base-2.0.6.tar.gz > > I performed a: > > /usr/local/bin/python2.3 setup.py install > > Everything looks proper with the exeception of this > series of warning statements: > > ----------------- > ... > -------------- > > Would someone be kind enough to let me know whether > these messages were expected, and if not, how I might > resolve these? These warning can safely be ignored. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 13:41:14 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Sat Feb 11 20:01:11 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: 6667 Message-ID: <20050503194114.72091.qmail@web31414.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Dianne Chen wrote: > > Hi all- > > > > I am trying to build the mx-base package, v.2.0.6. > > This will be used with postgresql 7.3.9, psycopg > > 1.1.18, and Roundup 0.8.2. > > > > RHEL 3.0 > > Python 2.3 > > egenix-mx-base-2.0.6.tar.gz > > > > I performed a: > > > > /usr/local/bin/python2.3 setup.py install > > > > Everything looks proper with the exeception of > this > > series of warning statements: > > > > ----------------- > > ... > > -------------- > > > > Would someone be kind enough to let me know > whether > > these messages were expected, and if not, how I > might > > resolve these? > > These warning can safely be ignored. > > -- > Marc-Andre Lemburg > eGenix.com > Marc- Thank you very much for the reply. It helps greatly. With kind regards, DC __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From davidrushby at yahoo.com Tue May 3 17:18:46 2005 From: davidrushby at yahoo.com (David Rushby) Date: Sat Feb 11 20:01:11 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050503231846.35012.qmail@web30009.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > I'm not sure whether your analysis of the problem is correct... Indeed, my original analysis wasn't correct; I think this one is. The fatal error I'm complaining about only arises if the arguments to DateTime.DateTime are invalid, so that the object is deallocated in the onError block of mxDateTime_FromDateAndTime. If the object is created successfully, and later deallocated by Python's garbage collector, the fatal error doesn't arise. Here's my analysis of the problem: --- If the debugging directive Py_TRACE_REFS is enabled, as it is in my case, the Python interpreter maintains a doubly linked list of all Python objects (named refchain) via the _ob_next and _ob_prev pointers added to PyObject via _PyObject_HEAD_EXTRA. Each object is inserted into refchain by the _Py_AddToAllObjects call in _Py_NewReference, and removed from refchain by the _Py_ForgetReference call in _Py_Dealloc. _Py_ForgetReference performs an integrity check on the object being deallocated (op) to make sure that its neighbors in refchain recognize it. Specifically, _Py_ForgetReference verifies that the _ob_next pointer of the previous object in refchain (op->_ob_prev->_ob_next) points to op, and that the _ob_prev pointer of the next object in refchain (op->_ob_next->_ob_prev) points to op. If either of those conditions is false, the interpreter raises the fatal error I'm seeing. After mxDateTime_New pulls an mxDateTimeObject out of the free list, it calls _Py_NewReference on that object to transform it from a "conceptually deallocated" object to a "conceptually allocated" one. _Py_NewReference inserts the object into refchain. Later, when the object is being "conceptually deallocated", it should be removed from refchain with _Py_ForgetReference. The version of _Py_Dealloc that's active when Py_TRACE_REFS is enabled does this (_Py_Dealloc is the element of Py_DECREF that performs the actual destruction). _Py_Dealloc first calls _Py_ForgetReference to remove the object from refchain, then calls the object's destructor (op->ob_type->tp_dealloc). If WANT_SUBCLASSABLE_TYPES is not defined (it is not in my case), the destructor for mxDateTime_Type is mxDateTime_Free. So, if a DateTime object is deallocated normally, as a result of its reference count falling to zero, _Py_Dealloc is called on the object, which first removes it from refchain, then passes it to mxDateTime_Free. If a DateTime object is destroyed prematurely, as a result of invalid arguments to its destructor, the onError handler calls mxDateTime_Free, so the object is "conceptually deallocated" (placed in the free list), *but* the object is not removed from refchain. So if a refchain-membership-integrity-check is performed on the object in question or one of its immediate neighbors in refchain, that integrity check fails, leading to the fatal error. --- The solution is to 'Py_DECREF(...)' the object in the onError handler of its constructor, instead of passing the object directly to mxDateTime_Free. That change solves two problems: 1) It causes _Py_Dealloc to execute, which in turn executes _Py_ForgetReference, so the object is removed from refchain, as it should be. 2) At present, objects that are created successfully and later deallocated by normal reference count mechanics have a reference count of 0 when they enter the free list, whereas objects whose constructors abort their creation due to invalid arguments have a reference count of 1 when they enter the free list. Although AFAIK this doesn't cause an actual execution problem (because the object's reference count is *explicitly set to 1* rather than *incremented by 1* when the object is later "conceptually allocated" by _Py_NewReference), it is likely to confuse future maintainers and thereby lead to the introduction of an actual execution problem. I assume that if you agree that this is a reasonable solution, you'll want to apply the change not only to mxDateTime_FromDateAndTime, but to all similar constructors in mxDateTime.c. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From rj at maxxian.com Thu May 5 01:57:40 2005 From: rj at maxxian.com (RJ Juneau) Date: Sat Feb 11 20:01:11 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c5512e$f72798c0$6505a8c0@rjlaptop> I'm on the 30 day evaluation for mxodbc_zope_da. I'm getting the following error when I submit some queries: Error Type: KeyError Error Value: 'query' I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 with UCS4. The error seems to be caused by multiple rows being returned. I did see an earlier posting with the same error message. The response suggested a template error, but this is clearly not the case here. The additional evidence I've gathered so far: - I'm running the test directly from the ZSQL method, so there's no template involved. - If I use the same query with an additional "where" clause to ensure that only one row is returned, it works - If I use a value in the 'where' clause with no rows returned, it works - The same ZSQL query is being used on a Windows machine running Zope and the free ZODBC module without a problem - The query has been verified directly in mysql-client-browser Other info: - The database is MySQL 4.1.10A-0 - iODBC is the DB driver RJ Juneau -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050505/68d278bf/attachment-0120.htm From mal at egenix.com Thu May 5 12:37:43 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Feb 11 20:01:11 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c5512e$f72798c0$6505a8c0@rjlaptop> References: <000301c5512e$f72798c0$6505a8c0@rjlaptop> Message-ID: <4279E967.6010904@egenix.com> RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 > with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 09:37:42 2005 From: rj at maxxian.com (RJ Juneau) Date: Sat Feb 11 20:01:11 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000101c5516f$3b96de90$6505a8c0@rjlaptop> More interesting info on the problem: If I execute the query directly in the "test" window of the base eGenix mxODBC Database Connection window, it works fine and returns the 20 lines expected. That could point to a problem in the rendering, which seems to be where the traceback ends. Note that within the same Zope system I also have an ODBC connection to a Sybase database, and I have successfully tested multi-line ZSQL queries there. This is the traceback: Time 2005/05/05 07:55:15.294 GMT-4 Exception Type KeyError Exception Value 'query' Traceback (innermost last): Module ZPublisher.Publish, line 101, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 39, in call_object Module Shared.DC.ZRDB.DA, line 337, in manage_test Module DocumentTemplate.DT_String, line 474, in __call__ Module DocumentTemplate.DT_In, line 602, in renderwb Module DocumentTemplate.DT_Var, line 219, in render KeyError: 'query' I don't think the following is an issue, but I'll include it for completeness.I am also getting the following iODBC warnings and errors in the Zope console log, which are related to the ODBC parameters being passed by iODBC. Note that these errors also appear for all of the successful queries. [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (Setup). [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (UsageCount). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Timeout). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Reuse). As for the ZSQL snippet from the template... Since there's no template involved yet (I'm still testing directly from the ZSQL method), I assume you mean the SQL code? select h.host_name, s.system_name, s.system_handle, count(*) from terminal t, system_map s, host h where t.system_index = s.system_index and s.host_index = h.host_index group by s.system_name order by h.host_name Nothing complicated here. There are no parameters passed to the query. RJ -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: May 5, 2005 5:38 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: Re: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is > 2.3.4 with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ---------------------------------------------------------------------- > -- > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 16:00:32 2005 From: charlie at egenix.com (Charlie Clark) Date: Sat Feb 11 20:01:11 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000101c5516f$3b96de90$6505a8c0@rjlaptop> References: <000101c5516f$3b96de90$6505a8c0@rjlaptop> Message-ID: <20050505150032.644.1@bepc.1115296715.fake> On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base eGenix > mxODBC Database Connection window, it works fine and returns the 20 > lines expected. That could point to a problem in the rendering, which > seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection to > a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 10:22:17 2005 From: rj at maxxian.com (RJ Juneau) Date: Sat Feb 11 20:01:11 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505150032.644.1@bepc.1115296715.fake> Message-ID: <000201c55175$75bcad10$6505a8c0@rjlaptop> At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 11:47:14 2005 From: rj at maxxian.com (RJ Juneau) Date: Sat Feb 11 20:01:11 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c55181$549be0e0$6505a8c0@rjlaptop> Charlie, I found a fix. Here it is in case anyone else runs into this. You were correct - the problem is in another part of Zope. Based on your feedback, I did a bit more searching and found something here: http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. html The problem appears to be in Zope versions after 2.7.0. I'm running 2.7.6, and the post indicates that it also happens in 2.7.4. The solution: Edit file /lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. There are two lines in the file that start with . Edit them as follows: Change first line to: Change second line to: Just to be after, I shut down Zope before I made the changes and restarted it after. Thanks for the help! RJ -----Original Message----- From: RJ Juneau [mailto:rj@maxxian.com] Sent: May 5, 2005 9:22 AM To: 'Charlie Clark' Cc: 'egenix-users@lists.egenix.com' Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 17:57:25 2005 From: charlie at egenix.com (Charlie Clark) Date: Sat Feb 11 20:01:11 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <20050505165725.3380.2@bepc.1115296715.fake> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Thu May 5 09:15:21 2005 From: charlie at egenix.com (Charlie Clark) Date: Sat Feb 11 20:01:11 2006 Subject: [Zope-DB] RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <000001c55185$41477730$6b00a8c0@fonacier.local> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________ Zope-DB mailing list Zope-DB@zope.org http://mail.zope.org/mailman/listinfo/zope-db From rj at maxxian.com Thu May 5 12:38:00 2005 From: rj at maxxian.com (RJ Juneau) Date: Sat Feb 11 20:01:11 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000001c55188$6b841eb0$6505a8c0@rjlaptop> I just double-checked. Zope-2.7.6-final. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 12:49:16 2005 From: rj at maxxian.com (RJ Juneau) Date: Sat Feb 11 20:01:11 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000501c55189$fe149ba0$6505a8c0@rjlaptop> Charlie, The fix has only been applied for 2.7.7, 2.8b2. The info is in the original bug report which is closed and can be found here: http://www.zope.org/Collectors/Zope/1745 RJ -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Fri May 6 11:50:09 2005 From: rj at maxxian.com (RJ Juneau) Date: Sat Feb 11 20:01:11 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC Message-ID: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Still on eval for the product. I cannot get a stable connection to Sybase via the iODBC drivers. - The Sybase ODBC connection - including a query - have been verified at the iODBC level. - The setup is already working well for ODBC connection to MySQL. Symptoms include: - If I click on "Open Connection", it still comes back with "Connection Closed" when I go to a ZSQL method - Using 'Connect on Demand' is not working either. - Clicking "Open Connection" gives me the following error: Connection string: DSN=lixbox_sybase; UID=sa; PWD=XXXXXXX Connection pool entry: 0 Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection rejected by data source', 7952) The odbc.ini definition for DSN "lixbox_sybase" is as follows: [lixbox_sybase] JetFix = No NoRowSetSizeLimit = No Description = Test connection to listbox Options = LIXBOX DSQUERY = SQLSERVER TDSHOST = lixbox TDSPORT = 5000 TDSVER = 5.0 SQLSERVER_CATALOG = N CURSOR_SENSITIVITY = LOW UserName = sa Password = XXXXXXXX ServerType = Sybase 10/11/12 Driver = /opt/openlink/lib/sql_mt_lt.so Database = pubs2 ReadOnly = no NoAutoCommit = No NoLoginBox = No FetchBufferSize = 60 Other relevant data: - Connecting via OpenLink's iODBC - Zope 2.7.6-final - Python 2.3.4 - Connection to Sybase has been successfully tested with iODBC, including issuing a query - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC connection RJ Juneau Chief Technology Officer Maxxian Integration Inc. 155 Westhampton Drive Thornhill, Ontario Canada L4J 7X2 E-mail: rj@maxxian.com Phone: +1 905 482 9429 Cell: +1 416 897 6682 Toll free: +1 866 758 9161 Fax: +1 647 722 2038 -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050506/aef33361/attachment-0120.htm From mal at egenix.com Fri May 6 18:27:37 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Feb 11 20:01:11 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC In-Reply-To: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> References: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Message-ID: <427B8CE9.1010601@egenix.com> RJ Juneau wrote: > Still on eval for the product. > > I cannot get a stable connection to Sybase via the iODBC drivers. > > - The Sybase ODBC connection - including a query - have been verified at > the iODBC level. > - The setup is already working well for ODBC connection to MySQL. > > Symptoms include: > > - If I click on "Open Connection", it still comes back with "Connection > Closed" when I go to a ZSQL method > - Using 'Connect on Demand' is not working either. > - Clicking "Open Connection" gives me the following error: > > Connection string: DSN=lixbox_sybase; > UID=sa; > PWD=XXXXXXX Try writing the connection string on one line and without whitespace. ODBC drivers sometimes have problems with this. > Connection pool entry: 0 > Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection > rejected by data source', 7952) This is a generic error that relates to authentication or firewall problems. It is possible that turning on ODBC tracing the ODBC manager will give more clues as to the real cause of the problem. > The odbc.ini definition for DSN "lixbox_sybase" is as follows: > > [lixbox_sybase] > JetFix = No > NoRowSetSizeLimit = No > Description = Test connection to listbox > Options = LIXBOX > DSQUERY = SQLSERVER > TDSHOST = lixbox > TDSPORT = 5000 > TDSVER = 5.0 > SQLSERVER_CATALOG = N > CURSOR_SENSITIVITY = LOW > UserName = sa > Password = XXXXXXXX > ServerType = Sybase 10/11/12 > Driver = /opt/openlink/lib/sql_mt_lt.so > Database = pubs2 > ReadOnly = no > NoAutoCommit = No > NoLoginBox = No > FetchBufferSize = 60 > > > Other relevant data: > - Connecting via OpenLink's iODBC > - Zope 2.7.6-final > - Python 2.3.4 > - Connection to Sybase has been successfully tested with iODBC, > including issuing a query > - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC > connection > > > > RJ Juneau > Chief Technology Officer > Maxxian Integration Inc. > 155 Westhampton Drive > Thornhill, Ontario > Canada L4J 7X2 > E-mail: rj@maxxian.com > Phone: +1 905 482 9429 > Cell: +1 416 897 6682 > Toll free: +1 866 758 9161 > Fax: +1 647 722 2038 > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 06 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From calisp at gmail.com Sun May 15 23:49:03 2005 From: calisp at gmail.com (calisp@gmail.com) Date: Sat Feb 11 20:01:11 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK Message-ID: Hi, I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the following error... 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the last phase of a two-phase commit. This shouldn't happen. Traceback (most recent call last): File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one jar.tpc_finish(self) File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish try: self._finish() File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could not perform COMMIT or ROLLBACK', 1023) What could be causing this? Can I get the mxODBCZopeDA source from somewhere? It would make debugging this much easier. Thanks, Calisp. From mal at egenix.com Mon May 16 13:52:12 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sat Feb 11 20:01:11 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK In-Reply-To: References: Message-ID: <42887B5C.4010109@egenix.com> calisp@gmail.com wrote: > Hi, > > I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with > unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the > following error... > > 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the > last phase of a two-phase commit. This shouldn't happen. > Traceback (most recent call last): > File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one > jar.tpc_finish(self) > File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish > try: self._finish() > File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish > File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler > ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could > not perform COMMIT or ROLLBACK', 1023) You should have a look at the database logs to see what prevented the commit from being completed. > What could be causing this? Hard to say: mxODBCZopeDA is trying to commit the transaction, but the driver or database failed to complete the request. The above error was generated by the ODBC driver. This could be network or DNS problems, or be related to a bug in FreeTDS (which is getting more stable with every new release, but should still be considered beta quality software at the moment). > Can I get the mxODBCZopeDA source from > somewhere? It would make debugging this much easier. Getting the source is not an option and won't help much either since the source of the problem is not mxODBCZopeDA. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 16 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Sun May 1 21:29:25 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Feb 12 08:10:38 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <427259F3.4090806@egenix.com> References: <20050427130906.52878.qmail@web30008.mail.mud.yahoo.com> <427259F3.4090806@egenix.com> Message-ID: <42752005.7080904@egenix.com> M.-A. Lemburg wrote: > David Rushby wrote: > >> --- "M.-A. Lemburg" wrote: >> >>> Are you using the standard mxDateTime build or one >>> with WANT_SUBCLASSABLE_TYPES defined... >> >> >> >> Presumably "the standard", since I just built with 'py24d setup.py >> build', making no attempt to enable special directives. >> >> >>> ... (mxDateTime_Deallocate is only used by the latter)? >> >> >> >> That's true in 2.1.0-2005-04-15, but not in 2.1.0b5. >> >> >>> In any case, please try our latest snapshot: >>> >>> >> >> http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-04-15.zip >> >>> to see if that makes any difference. >> >> >> >> I can't build it out of the box: > > > Hmm, looks like distutils' sdist command doesn't like our new > repository layout which uses symlinks (after we've switched to > subversion). > > We'll have to debug distutils first, I guess :-( Ok, we've found the problem and fixed it. Here's the new release (which does build out of the box at least on our boxes ;-): http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 01 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From davidrushby at yahoo.com Mon May 2 15:49:53 2005 From: davidrushby at yahoo.com (David Rushby) Date: Sun Feb 12 08:10:39 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Ok, we've found the problem and fixed it. Here's the new > release (which does build out of the box at least on our > boxes ;-): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip It does build now, but: py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" still behaves as it did when I submitted my original message: Fatal Python error: UNREF invalid object Aborted This is the same debug build of Python 2.4.1 that I was previously using, running the same configuration (CentOS Linux 4.0/i386, everything compiled with GCC 3.4.3). Have you examined my original claim as to the cause of the bug? __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 10:21:55 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Feb 12 08:10:39 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> References: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> Message-ID: <42772693.8050306@egenix.com> David Rushby wrote: > --- "M.-A. Lemburg" wrote: > >>Ok, we've found the problem and fixed it. Here's the new >>release (which does build out of the box at least on our >>boxes ;-): >> >> > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip > > It does build now, but: > py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" > still behaves as it did when I submitted my original message: > Fatal Python error: UNREF invalid object > Aborted > > This is the same debug build of Python 2.4.1 that I was previously > using, running the same configuration (CentOS Linux 4.0/i386, > everything compiled with GCC 3.4.3). > > Have you examined my original claim as to the cause of the bug? No. We haven't had time for looking into it. I'm not sure whether your analysis of the problem is correct: if you don't define WANT_SUBCLASSABLE_TYPES, the API mxDateTime_Deallocate() is neither defined nor used. Furthermore, PyObject_Del() is only called by mxDateTime_Free() if you have explicitely edited mxDateTime.c to disabled the free list #defines. In a standard build, PyObject_Del() is only called at module finalization time. Note that the reason we call mxDateTime_Free() in the constructor is that we don't want the destructor of the object to be called. Py_DECREF() would call the destructor (mxDateTime_Deallocate). It is possible that the debug code in Python complains about the refcount in the object not being 0 at the time the object is finalized (module finalization time), but I don't see any such checks in PyObject_Free() (which is what PyObject_Del() maps to). Again, all of this does not happen in regular non-debug Python builds. Please be aware that we don't support debug builds, so fixing the problem (if there is one - gcc has some serious optimization problems on some combinations of platform and version) will take a while. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 09:27:37 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Sun Feb 12 08:10:39 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 Message-ID: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Hi all- I am trying to build the mx-base package, v.2.0.6. This will be used with postgresql 7.3.9, psycopg 1.1.18, and Roundup 0.8.2. RHEL 3.0 Python 2.3 egenix-mx-base-2.0.6.tar.gz I performed a: /usr/local/bin/python2.3 setup.py install Everything looks proper with the exeception of this series of warning statements: ----------------- gcc -pthread -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fno-strict-aliasing -fPIC -Imx/BeeBase/mxBeeBase -I/usr/local/incl ude/python2.3 -I/usr/local/include -c mx/BeeBase/mxBeeBase/btr.c -o build/temp.linux-i686-2.3/mx/BeeBase/mxBeeBase/mxBeeBa se/mx/BeeBase/mxBeeBase/btr.o mx/BeeBase/mxBeeBase/btr.c: In function `dumpBuf': mx/BeeBase/mxBeeBase/btr.c:249: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:250: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:255: warning: unsigned int format, long unsigned int arg (arg 4) mx/BeeBase/mxBeeBase/btr.c:256: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c: In function `_validateTree': mx/BeeBase/mxBeeBase/btr.c:330: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:337: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:339: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:349: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:351: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 3) creating build/lib.linux-i686-2.3/mx/BeeBase creating build/lib.linux-i686-2.3/mx/BeeBase/mxBeeBase -------------- Would someone be kind enough to let me know whether these messages were expected, and if not, how I might resolve these? Thanks! DC __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 22:06:33 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Feb 12 08:10:39 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> References: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Message-ID: <4277CBB9.8020302@egenix.com> Dianne Chen wrote: > Hi all- > > I am trying to build the mx-base package, v.2.0.6. > This will be used with postgresql 7.3.9, psycopg > 1.1.18, and Roundup 0.8.2. > > RHEL 3.0 > Python 2.3 > egenix-mx-base-2.0.6.tar.gz > > I performed a: > > /usr/local/bin/python2.3 setup.py install > > Everything looks proper with the exeception of this > series of warning statements: > > ----------------- > ... > -------------- > > Would someone be kind enough to let me know whether > these messages were expected, and if not, how I might > resolve these? These warning can safely be ignored. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 13:41:14 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Sun Feb 12 08:10:39 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: 6667 Message-ID: <20050503194114.72091.qmail@web31414.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Dianne Chen wrote: > > Hi all- > > > > I am trying to build the mx-base package, v.2.0.6. > > This will be used with postgresql 7.3.9, psycopg > > 1.1.18, and Roundup 0.8.2. > > > > RHEL 3.0 > > Python 2.3 > > egenix-mx-base-2.0.6.tar.gz > > > > I performed a: > > > > /usr/local/bin/python2.3 setup.py install > > > > Everything looks proper with the exeception of > this > > series of warning statements: > > > > ----------------- > > ... > > -------------- > > > > Would someone be kind enough to let me know > whether > > these messages were expected, and if not, how I > might > > resolve these? > > These warning can safely be ignored. > > -- > Marc-Andre Lemburg > eGenix.com > Marc- Thank you very much for the reply. It helps greatly. With kind regards, DC __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From davidrushby at yahoo.com Tue May 3 17:18:46 2005 From: davidrushby at yahoo.com (David Rushby) Date: Sun Feb 12 08:10:39 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050503231846.35012.qmail@web30009.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > I'm not sure whether your analysis of the problem is correct... Indeed, my original analysis wasn't correct; I think this one is. The fatal error I'm complaining about only arises if the arguments to DateTime.DateTime are invalid, so that the object is deallocated in the onError block of mxDateTime_FromDateAndTime. If the object is created successfully, and later deallocated by Python's garbage collector, the fatal error doesn't arise. Here's my analysis of the problem: --- If the debugging directive Py_TRACE_REFS is enabled, as it is in my case, the Python interpreter maintains a doubly linked list of all Python objects (named refchain) via the _ob_next and _ob_prev pointers added to PyObject via _PyObject_HEAD_EXTRA. Each object is inserted into refchain by the _Py_AddToAllObjects call in _Py_NewReference, and removed from refchain by the _Py_ForgetReference call in _Py_Dealloc. _Py_ForgetReference performs an integrity check on the object being deallocated (op) to make sure that its neighbors in refchain recognize it. Specifically, _Py_ForgetReference verifies that the _ob_next pointer of the previous object in refchain (op->_ob_prev->_ob_next) points to op, and that the _ob_prev pointer of the next object in refchain (op->_ob_next->_ob_prev) points to op. If either of those conditions is false, the interpreter raises the fatal error I'm seeing. After mxDateTime_New pulls an mxDateTimeObject out of the free list, it calls _Py_NewReference on that object to transform it from a "conceptually deallocated" object to a "conceptually allocated" one. _Py_NewReference inserts the object into refchain. Later, when the object is being "conceptually deallocated", it should be removed from refchain with _Py_ForgetReference. The version of _Py_Dealloc that's active when Py_TRACE_REFS is enabled does this (_Py_Dealloc is the element of Py_DECREF that performs the actual destruction). _Py_Dealloc first calls _Py_ForgetReference to remove the object from refchain, then calls the object's destructor (op->ob_type->tp_dealloc). If WANT_SUBCLASSABLE_TYPES is not defined (it is not in my case), the destructor for mxDateTime_Type is mxDateTime_Free. So, if a DateTime object is deallocated normally, as a result of its reference count falling to zero, _Py_Dealloc is called on the object, which first removes it from refchain, then passes it to mxDateTime_Free. If a DateTime object is destroyed prematurely, as a result of invalid arguments to its destructor, the onError handler calls mxDateTime_Free, so the object is "conceptually deallocated" (placed in the free list), *but* the object is not removed from refchain. So if a refchain-membership-integrity-check is performed on the object in question or one of its immediate neighbors in refchain, that integrity check fails, leading to the fatal error. --- The solution is to 'Py_DECREF(...)' the object in the onError handler of its constructor, instead of passing the object directly to mxDateTime_Free. That change solves two problems: 1) It causes _Py_Dealloc to execute, which in turn executes _Py_ForgetReference, so the object is removed from refchain, as it should be. 2) At present, objects that are created successfully and later deallocated by normal reference count mechanics have a reference count of 0 when they enter the free list, whereas objects whose constructors abort their creation due to invalid arguments have a reference count of 1 when they enter the free list. Although AFAIK this doesn't cause an actual execution problem (because the object's reference count is *explicitly set to 1* rather than *incremented by 1* when the object is later "conceptually allocated" by _Py_NewReference), it is likely to confuse future maintainers and thereby lead to the introduction of an actual execution problem. I assume that if you agree that this is a reasonable solution, you'll want to apply the change not only to mxDateTime_FromDateAndTime, but to all similar constructors in mxDateTime.c. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From rj at maxxian.com Thu May 5 01:57:40 2005 From: rj at maxxian.com (RJ Juneau) Date: Sun Feb 12 08:10:40 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c5512e$f72798c0$6505a8c0@rjlaptop> I'm on the 30 day evaluation for mxodbc_zope_da. I'm getting the following error when I submit some queries: Error Type: KeyError Error Value: 'query' I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 with UCS4. The error seems to be caused by multiple rows being returned. I did see an earlier posting with the same error message. The response suggested a template error, but this is clearly not the case here. The additional evidence I've gathered so far: - I'm running the test directly from the ZSQL method, so there's no template involved. - If I use the same query with an additional "where" clause to ensure that only one row is returned, it works - If I use a value in the 'where' clause with no rows returned, it works - The same ZSQL query is being used on a Windows machine running Zope and the free ZODBC module without a problem - The query has been verified directly in mysql-client-browser Other info: - The database is MySQL 4.1.10A-0 - iODBC is the DB driver RJ Juneau -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050505/68d278bf/attachment-0121.htm From mal at egenix.com Thu May 5 12:37:43 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Feb 12 08:10:40 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c5512e$f72798c0$6505a8c0@rjlaptop> References: <000301c5512e$f72798c0$6505a8c0@rjlaptop> Message-ID: <4279E967.6010904@egenix.com> RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 > with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 09:37:42 2005 From: rj at maxxian.com (RJ Juneau) Date: Sun Feb 12 08:10:40 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000101c5516f$3b96de90$6505a8c0@rjlaptop> More interesting info on the problem: If I execute the query directly in the "test" window of the base eGenix mxODBC Database Connection window, it works fine and returns the 20 lines expected. That could point to a problem in the rendering, which seems to be where the traceback ends. Note that within the same Zope system I also have an ODBC connection to a Sybase database, and I have successfully tested multi-line ZSQL queries there. This is the traceback: Time 2005/05/05 07:55:15.294 GMT-4 Exception Type KeyError Exception Value 'query' Traceback (innermost last): Module ZPublisher.Publish, line 101, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 39, in call_object Module Shared.DC.ZRDB.DA, line 337, in manage_test Module DocumentTemplate.DT_String, line 474, in __call__ Module DocumentTemplate.DT_In, line 602, in renderwb Module DocumentTemplate.DT_Var, line 219, in render KeyError: 'query' I don't think the following is an issue, but I'll include it for completeness.I am also getting the following iODBC warnings and errors in the Zope console log, which are related to the ODBC parameters being passed by iODBC. Note that these errors also appear for all of the successful queries. [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (Setup). [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (UsageCount). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Timeout). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Reuse). As for the ZSQL snippet from the template... Since there's no template involved yet (I'm still testing directly from the ZSQL method), I assume you mean the SQL code? select h.host_name, s.system_name, s.system_handle, count(*) from terminal t, system_map s, host h where t.system_index = s.system_index and s.host_index = h.host_index group by s.system_name order by h.host_name Nothing complicated here. There are no parameters passed to the query. RJ -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: May 5, 2005 5:38 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: Re: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is > 2.3.4 with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ---------------------------------------------------------------------- > -- > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 16:00:32 2005 From: charlie at egenix.com (Charlie Clark) Date: Sun Feb 12 08:10:40 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000101c5516f$3b96de90$6505a8c0@rjlaptop> References: <000101c5516f$3b96de90$6505a8c0@rjlaptop> Message-ID: <20050505150032.644.1@bepc.1115296715.fake> On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base eGenix > mxODBC Database Connection window, it works fine and returns the 20 > lines expected. That could point to a problem in the rendering, which > seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection to > a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 10:22:17 2005 From: rj at maxxian.com (RJ Juneau) Date: Sun Feb 12 08:10:40 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505150032.644.1@bepc.1115296715.fake> Message-ID: <000201c55175$75bcad10$6505a8c0@rjlaptop> At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 11:47:14 2005 From: rj at maxxian.com (RJ Juneau) Date: Sun Feb 12 08:10:40 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c55181$549be0e0$6505a8c0@rjlaptop> Charlie, I found a fix. Here it is in case anyone else runs into this. You were correct - the problem is in another part of Zope. Based on your feedback, I did a bit more searching and found something here: http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. html The problem appears to be in Zope versions after 2.7.0. I'm running 2.7.6, and the post indicates that it also happens in 2.7.4. The solution: Edit file /lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. There are two lines in the file that start with . Edit them as follows: Change first line to: Change second line to: Just to be after, I shut down Zope before I made the changes and restarted it after. Thanks for the help! RJ -----Original Message----- From: RJ Juneau [mailto:rj@maxxian.com] Sent: May 5, 2005 9:22 AM To: 'Charlie Clark' Cc: 'egenix-users@lists.egenix.com' Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 17:57:25 2005 From: charlie at egenix.com (Charlie Clark) Date: Sun Feb 12 08:10:41 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <20050505165725.3380.2@bepc.1115296715.fake> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Thu May 5 09:15:21 2005 From: charlie at egenix.com (Charlie Clark) Date: Sun Feb 12 08:10:41 2006 Subject: [Zope-DB] RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <000001c55185$41477730$6b00a8c0@fonacier.local> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________ Zope-DB mailing list Zope-DB@zope.org http://mail.zope.org/mailman/listinfo/zope-db From rj at maxxian.com Thu May 5 12:38:00 2005 From: rj at maxxian.com (RJ Juneau) Date: Sun Feb 12 08:10:41 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000001c55188$6b841eb0$6505a8c0@rjlaptop> I just double-checked. Zope-2.7.6-final. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 12:49:16 2005 From: rj at maxxian.com (RJ Juneau) Date: Sun Feb 12 08:10:41 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000501c55189$fe149ba0$6505a8c0@rjlaptop> Charlie, The fix has only been applied for 2.7.7, 2.8b2. The info is in the original bug report which is closed and can be found here: http://www.zope.org/Collectors/Zope/1745 RJ -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Fri May 6 11:50:09 2005 From: rj at maxxian.com (RJ Juneau) Date: Sun Feb 12 08:10:41 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC Message-ID: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Still on eval for the product. I cannot get a stable connection to Sybase via the iODBC drivers. - The Sybase ODBC connection - including a query - have been verified at the iODBC level. - The setup is already working well for ODBC connection to MySQL. Symptoms include: - If I click on "Open Connection", it still comes back with "Connection Closed" when I go to a ZSQL method - Using 'Connect on Demand' is not working either. - Clicking "Open Connection" gives me the following error: Connection string: DSN=lixbox_sybase; UID=sa; PWD=XXXXXXX Connection pool entry: 0 Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection rejected by data source', 7952) The odbc.ini definition for DSN "lixbox_sybase" is as follows: [lixbox_sybase] JetFix = No NoRowSetSizeLimit = No Description = Test connection to listbox Options = LIXBOX DSQUERY = SQLSERVER TDSHOST = lixbox TDSPORT = 5000 TDSVER = 5.0 SQLSERVER_CATALOG = N CURSOR_SENSITIVITY = LOW UserName = sa Password = XXXXXXXX ServerType = Sybase 10/11/12 Driver = /opt/openlink/lib/sql_mt_lt.so Database = pubs2 ReadOnly = no NoAutoCommit = No NoLoginBox = No FetchBufferSize = 60 Other relevant data: - Connecting via OpenLink's iODBC - Zope 2.7.6-final - Python 2.3.4 - Connection to Sybase has been successfully tested with iODBC, including issuing a query - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC connection RJ Juneau Chief Technology Officer Maxxian Integration Inc. 155 Westhampton Drive Thornhill, Ontario Canada L4J 7X2 E-mail: rj@maxxian.com Phone: +1 905 482 9429 Cell: +1 416 897 6682 Toll free: +1 866 758 9161 Fax: +1 647 722 2038 -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050506/aef33361/attachment-0121.htm From mal at egenix.com Fri May 6 18:27:37 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Feb 12 08:10:41 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC In-Reply-To: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> References: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Message-ID: <427B8CE9.1010601@egenix.com> RJ Juneau wrote: > Still on eval for the product. > > I cannot get a stable connection to Sybase via the iODBC drivers. > > - The Sybase ODBC connection - including a query - have been verified at > the iODBC level. > - The setup is already working well for ODBC connection to MySQL. > > Symptoms include: > > - If I click on "Open Connection", it still comes back with "Connection > Closed" when I go to a ZSQL method > - Using 'Connect on Demand' is not working either. > - Clicking "Open Connection" gives me the following error: > > Connection string: DSN=lixbox_sybase; > UID=sa; > PWD=XXXXXXX Try writing the connection string on one line and without whitespace. ODBC drivers sometimes have problems with this. > Connection pool entry: 0 > Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection > rejected by data source', 7952) This is a generic error that relates to authentication or firewall problems. It is possible that turning on ODBC tracing the ODBC manager will give more clues as to the real cause of the problem. > The odbc.ini definition for DSN "lixbox_sybase" is as follows: > > [lixbox_sybase] > JetFix = No > NoRowSetSizeLimit = No > Description = Test connection to listbox > Options = LIXBOX > DSQUERY = SQLSERVER > TDSHOST = lixbox > TDSPORT = 5000 > TDSVER = 5.0 > SQLSERVER_CATALOG = N > CURSOR_SENSITIVITY = LOW > UserName = sa > Password = XXXXXXXX > ServerType = Sybase 10/11/12 > Driver = /opt/openlink/lib/sql_mt_lt.so > Database = pubs2 > ReadOnly = no > NoAutoCommit = No > NoLoginBox = No > FetchBufferSize = 60 > > > Other relevant data: > - Connecting via OpenLink's iODBC > - Zope 2.7.6-final > - Python 2.3.4 > - Connection to Sybase has been successfully tested with iODBC, > including issuing a query > - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC > connection > > > > RJ Juneau > Chief Technology Officer > Maxxian Integration Inc. > 155 Westhampton Drive > Thornhill, Ontario > Canada L4J 7X2 > E-mail: rj@maxxian.com > Phone: +1 905 482 9429 > Cell: +1 416 897 6682 > Toll free: +1 866 758 9161 > Fax: +1 647 722 2038 > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 06 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From calisp at gmail.com Sun May 15 23:49:03 2005 From: calisp at gmail.com (calisp@gmail.com) Date: Sun Feb 12 08:10:41 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK Message-ID: Hi, I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the following error... 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the last phase of a two-phase commit. This shouldn't happen. Traceback (most recent call last): File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one jar.tpc_finish(self) File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish try: self._finish() File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could not perform COMMIT or ROLLBACK', 1023) What could be causing this? Can I get the mxODBCZopeDA source from somewhere? It would make debugging this much easier. Thanks, Calisp. From mal at egenix.com Mon May 16 13:52:12 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Feb 12 08:10:41 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK In-Reply-To: References: Message-ID: <42887B5C.4010109@egenix.com> calisp@gmail.com wrote: > Hi, > > I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with > unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the > following error... > > 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the > last phase of a two-phase commit. This shouldn't happen. > Traceback (most recent call last): > File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one > jar.tpc_finish(self) > File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish > try: self._finish() > File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish > File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler > ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could > not perform COMMIT or ROLLBACK', 1023) You should have a look at the database logs to see what prevented the commit from being completed. > What could be causing this? Hard to say: mxODBCZopeDA is trying to commit the transaction, but the driver or database failed to complete the request. The above error was generated by the ODBC driver. This could be network or DNS problems, or be related to a bug in FreeTDS (which is getting more stable with every new release, but should still be considered beta quality software at the moment). > Can I get the mxODBCZopeDA source from > somewhere? It would make debugging this much easier. Getting the source is not an option and won't help much either since the source of the problem is not mxODBCZopeDA. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 16 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Sun May 1 21:29:25 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Feb 12 12:03:15 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <427259F3.4090806@egenix.com> References: <20050427130906.52878.qmail@web30008.mail.mud.yahoo.com> <427259F3.4090806@egenix.com> Message-ID: <42752005.7080904@egenix.com> M.-A. Lemburg wrote: > David Rushby wrote: > >> --- "M.-A. Lemburg" wrote: >> >>> Are you using the standard mxDateTime build or one >>> with WANT_SUBCLASSABLE_TYPES defined... >> >> >> >> Presumably "the standard", since I just built with 'py24d setup.py >> build', making no attempt to enable special directives. >> >> >>> ... (mxDateTime_Deallocate is only used by the latter)? >> >> >> >> That's true in 2.1.0-2005-04-15, but not in 2.1.0b5. >> >> >>> In any case, please try our latest snapshot: >>> >>> >> >> http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-04-15.zip >> >>> to see if that makes any difference. >> >> >> >> I can't build it out of the box: > > > Hmm, looks like distutils' sdist command doesn't like our new > repository layout which uses symlinks (after we've switched to > subversion). > > We'll have to debug distutils first, I guess :-( Ok, we've found the problem and fixed it. Here's the new release (which does build out of the box at least on our boxes ;-): http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 01 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From davidrushby at yahoo.com Mon May 2 15:49:53 2005 From: davidrushby at yahoo.com (David Rushby) Date: Sun Feb 12 12:03:15 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Ok, we've found the problem and fixed it. Here's the new > release (which does build out of the box at least on our > boxes ;-): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip It does build now, but: py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" still behaves as it did when I submitted my original message: Fatal Python error: UNREF invalid object Aborted This is the same debug build of Python 2.4.1 that I was previously using, running the same configuration (CentOS Linux 4.0/i386, everything compiled with GCC 3.4.3). Have you examined my original claim as to the cause of the bug? __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 10:21:55 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Feb 12 12:03:15 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> References: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> Message-ID: <42772693.8050306@egenix.com> David Rushby wrote: > --- "M.-A. Lemburg" wrote: > >>Ok, we've found the problem and fixed it. Here's the new >>release (which does build out of the box at least on our >>boxes ;-): >> >> > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip > > It does build now, but: > py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" > still behaves as it did when I submitted my original message: > Fatal Python error: UNREF invalid object > Aborted > > This is the same debug build of Python 2.4.1 that I was previously > using, running the same configuration (CentOS Linux 4.0/i386, > everything compiled with GCC 3.4.3). > > Have you examined my original claim as to the cause of the bug? No. We haven't had time for looking into it. I'm not sure whether your analysis of the problem is correct: if you don't define WANT_SUBCLASSABLE_TYPES, the API mxDateTime_Deallocate() is neither defined nor used. Furthermore, PyObject_Del() is only called by mxDateTime_Free() if you have explicitely edited mxDateTime.c to disabled the free list #defines. In a standard build, PyObject_Del() is only called at module finalization time. Note that the reason we call mxDateTime_Free() in the constructor is that we don't want the destructor of the object to be called. Py_DECREF() would call the destructor (mxDateTime_Deallocate). It is possible that the debug code in Python complains about the refcount in the object not being 0 at the time the object is finalized (module finalization time), but I don't see any such checks in PyObject_Free() (which is what PyObject_Del() maps to). Again, all of this does not happen in regular non-debug Python builds. Please be aware that we don't support debug builds, so fixing the problem (if there is one - gcc has some serious optimization problems on some combinations of platform and version) will take a while. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 09:27:37 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Sun Feb 12 12:03:15 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 Message-ID: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Hi all- I am trying to build the mx-base package, v.2.0.6. This will be used with postgresql 7.3.9, psycopg 1.1.18, and Roundup 0.8.2. RHEL 3.0 Python 2.3 egenix-mx-base-2.0.6.tar.gz I performed a: /usr/local/bin/python2.3 setup.py install Everything looks proper with the exeception of this series of warning statements: ----------------- gcc -pthread -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fno-strict-aliasing -fPIC -Imx/BeeBase/mxBeeBase -I/usr/local/incl ude/python2.3 -I/usr/local/include -c mx/BeeBase/mxBeeBase/btr.c -o build/temp.linux-i686-2.3/mx/BeeBase/mxBeeBase/mxBeeBa se/mx/BeeBase/mxBeeBase/btr.o mx/BeeBase/mxBeeBase/btr.c: In function `dumpBuf': mx/BeeBase/mxBeeBase/btr.c:249: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:250: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:255: warning: unsigned int format, long unsigned int arg (arg 4) mx/BeeBase/mxBeeBase/btr.c:256: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c: In function `_validateTree': mx/BeeBase/mxBeeBase/btr.c:330: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:337: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:339: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:349: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:351: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 3) creating build/lib.linux-i686-2.3/mx/BeeBase creating build/lib.linux-i686-2.3/mx/BeeBase/mxBeeBase -------------- Would someone be kind enough to let me know whether these messages were expected, and if not, how I might resolve these? Thanks! DC __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 22:06:33 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Feb 12 12:03:15 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> References: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Message-ID: <4277CBB9.8020302@egenix.com> Dianne Chen wrote: > Hi all- > > I am trying to build the mx-base package, v.2.0.6. > This will be used with postgresql 7.3.9, psycopg > 1.1.18, and Roundup 0.8.2. > > RHEL 3.0 > Python 2.3 > egenix-mx-base-2.0.6.tar.gz > > I performed a: > > /usr/local/bin/python2.3 setup.py install > > Everything looks proper with the exeception of this > series of warning statements: > > ----------------- > ... > -------------- > > Would someone be kind enough to let me know whether > these messages were expected, and if not, how I might > resolve these? These warning can safely be ignored. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 13:41:14 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Sun Feb 12 12:03:15 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: 6667 Message-ID: <20050503194114.72091.qmail@web31414.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Dianne Chen wrote: > > Hi all- > > > > I am trying to build the mx-base package, v.2.0.6. > > This will be used with postgresql 7.3.9, psycopg > > 1.1.18, and Roundup 0.8.2. > > > > RHEL 3.0 > > Python 2.3 > > egenix-mx-base-2.0.6.tar.gz > > > > I performed a: > > > > /usr/local/bin/python2.3 setup.py install > > > > Everything looks proper with the exeception of > this > > series of warning statements: > > > > ----------------- > > ... > > -------------- > > > > Would someone be kind enough to let me know > whether > > these messages were expected, and if not, how I > might > > resolve these? > > These warning can safely be ignored. > > -- > Marc-Andre Lemburg > eGenix.com > Marc- Thank you very much for the reply. It helps greatly. With kind regards, DC __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From davidrushby at yahoo.com Tue May 3 17:18:46 2005 From: davidrushby at yahoo.com (David Rushby) Date: Sun Feb 12 12:03:15 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050503231846.35012.qmail@web30009.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > I'm not sure whether your analysis of the problem is correct... Indeed, my original analysis wasn't correct; I think this one is. The fatal error I'm complaining about only arises if the arguments to DateTime.DateTime are invalid, so that the object is deallocated in the onError block of mxDateTime_FromDateAndTime. If the object is created successfully, and later deallocated by Python's garbage collector, the fatal error doesn't arise. Here's my analysis of the problem: --- If the debugging directive Py_TRACE_REFS is enabled, as it is in my case, the Python interpreter maintains a doubly linked list of all Python objects (named refchain) via the _ob_next and _ob_prev pointers added to PyObject via _PyObject_HEAD_EXTRA. Each object is inserted into refchain by the _Py_AddToAllObjects call in _Py_NewReference, and removed from refchain by the _Py_ForgetReference call in _Py_Dealloc. _Py_ForgetReference performs an integrity check on the object being deallocated (op) to make sure that its neighbors in refchain recognize it. Specifically, _Py_ForgetReference verifies that the _ob_next pointer of the previous object in refchain (op->_ob_prev->_ob_next) points to op, and that the _ob_prev pointer of the next object in refchain (op->_ob_next->_ob_prev) points to op. If either of those conditions is false, the interpreter raises the fatal error I'm seeing. After mxDateTime_New pulls an mxDateTimeObject out of the free list, it calls _Py_NewReference on that object to transform it from a "conceptually deallocated" object to a "conceptually allocated" one. _Py_NewReference inserts the object into refchain. Later, when the object is being "conceptually deallocated", it should be removed from refchain with _Py_ForgetReference. The version of _Py_Dealloc that's active when Py_TRACE_REFS is enabled does this (_Py_Dealloc is the element of Py_DECREF that performs the actual destruction). _Py_Dealloc first calls _Py_ForgetReference to remove the object from refchain, then calls the object's destructor (op->ob_type->tp_dealloc). If WANT_SUBCLASSABLE_TYPES is not defined (it is not in my case), the destructor for mxDateTime_Type is mxDateTime_Free. So, if a DateTime object is deallocated normally, as a result of its reference count falling to zero, _Py_Dealloc is called on the object, which first removes it from refchain, then passes it to mxDateTime_Free. If a DateTime object is destroyed prematurely, as a result of invalid arguments to its destructor, the onError handler calls mxDateTime_Free, so the object is "conceptually deallocated" (placed in the free list), *but* the object is not removed from refchain. So if a refchain-membership-integrity-check is performed on the object in question or one of its immediate neighbors in refchain, that integrity check fails, leading to the fatal error. --- The solution is to 'Py_DECREF(...)' the object in the onError handler of its constructor, instead of passing the object directly to mxDateTime_Free. That change solves two problems: 1) It causes _Py_Dealloc to execute, which in turn executes _Py_ForgetReference, so the object is removed from refchain, as it should be. 2) At present, objects that are created successfully and later deallocated by normal reference count mechanics have a reference count of 0 when they enter the free list, whereas objects whose constructors abort their creation due to invalid arguments have a reference count of 1 when they enter the free list. Although AFAIK this doesn't cause an actual execution problem (because the object's reference count is *explicitly set to 1* rather than *incremented by 1* when the object is later "conceptually allocated" by _Py_NewReference), it is likely to confuse future maintainers and thereby lead to the introduction of an actual execution problem. I assume that if you agree that this is a reasonable solution, you'll want to apply the change not only to mxDateTime_FromDateAndTime, but to all similar constructors in mxDateTime.c. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From rj at maxxian.com Thu May 5 01:57:40 2005 From: rj at maxxian.com (RJ Juneau) Date: Sun Feb 12 12:03:15 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c5512e$f72798c0$6505a8c0@rjlaptop> I'm on the 30 day evaluation for mxodbc_zope_da. I'm getting the following error when I submit some queries: Error Type: KeyError Error Value: 'query' I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 with UCS4. The error seems to be caused by multiple rows being returned. I did see an earlier posting with the same error message. The response suggested a template error, but this is clearly not the case here. The additional evidence I've gathered so far: - I'm running the test directly from the ZSQL method, so there's no template involved. - If I use the same query with an additional "where" clause to ensure that only one row is returned, it works - If I use a value in the 'where' clause with no rows returned, it works - The same ZSQL query is being used on a Windows machine running Zope and the free ZODBC module without a problem - The query has been verified directly in mysql-client-browser Other info: - The database is MySQL 4.1.10A-0 - iODBC is the DB driver RJ Juneau -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050505/68d278bf/attachment-0122.htm From mal at egenix.com Thu May 5 12:37:43 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Feb 12 12:03:15 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c5512e$f72798c0$6505a8c0@rjlaptop> References: <000301c5512e$f72798c0$6505a8c0@rjlaptop> Message-ID: <4279E967.6010904@egenix.com> RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 > with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 09:37:42 2005 From: rj at maxxian.com (RJ Juneau) Date: Sun Feb 12 12:03:15 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000101c5516f$3b96de90$6505a8c0@rjlaptop> More interesting info on the problem: If I execute the query directly in the "test" window of the base eGenix mxODBC Database Connection window, it works fine and returns the 20 lines expected. That could point to a problem in the rendering, which seems to be where the traceback ends. Note that within the same Zope system I also have an ODBC connection to a Sybase database, and I have successfully tested multi-line ZSQL queries there. This is the traceback: Time 2005/05/05 07:55:15.294 GMT-4 Exception Type KeyError Exception Value 'query' Traceback (innermost last): Module ZPublisher.Publish, line 101, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 39, in call_object Module Shared.DC.ZRDB.DA, line 337, in manage_test Module DocumentTemplate.DT_String, line 474, in __call__ Module DocumentTemplate.DT_In, line 602, in renderwb Module DocumentTemplate.DT_Var, line 219, in render KeyError: 'query' I don't think the following is an issue, but I'll include it for completeness.I am also getting the following iODBC warnings and errors in the Zope console log, which are related to the ODBC parameters being passed by iODBC. Note that these errors also appear for all of the successful queries. [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (Setup). [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (UsageCount). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Timeout). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Reuse). As for the ZSQL snippet from the template... Since there's no template involved yet (I'm still testing directly from the ZSQL method), I assume you mean the SQL code? select h.host_name, s.system_name, s.system_handle, count(*) from terminal t, system_map s, host h where t.system_index = s.system_index and s.host_index = h.host_index group by s.system_name order by h.host_name Nothing complicated here. There are no parameters passed to the query. RJ -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: May 5, 2005 5:38 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: Re: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is > 2.3.4 with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ---------------------------------------------------------------------- > -- > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 16:00:32 2005 From: charlie at egenix.com (Charlie Clark) Date: Sun Feb 12 12:03:15 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000101c5516f$3b96de90$6505a8c0@rjlaptop> References: <000101c5516f$3b96de90$6505a8c0@rjlaptop> Message-ID: <20050505150032.644.1@bepc.1115296715.fake> On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base eGenix > mxODBC Database Connection window, it works fine and returns the 20 > lines expected. That could point to a problem in the rendering, which > seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection to > a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 10:22:17 2005 From: rj at maxxian.com (RJ Juneau) Date: Sun Feb 12 12:03:15 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505150032.644.1@bepc.1115296715.fake> Message-ID: <000201c55175$75bcad10$6505a8c0@rjlaptop> At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 11:47:14 2005 From: rj at maxxian.com (RJ Juneau) Date: Sun Feb 12 12:03:15 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c55181$549be0e0$6505a8c0@rjlaptop> Charlie, I found a fix. Here it is in case anyone else runs into this. You were correct - the problem is in another part of Zope. Based on your feedback, I did a bit more searching and found something here: http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. html The problem appears to be in Zope versions after 2.7.0. I'm running 2.7.6, and the post indicates that it also happens in 2.7.4. The solution: Edit file /lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. There are two lines in the file that start with . Edit them as follows: Change first line to: Change second line to: Just to be after, I shut down Zope before I made the changes and restarted it after. Thanks for the help! RJ -----Original Message----- From: RJ Juneau [mailto:rj@maxxian.com] Sent: May 5, 2005 9:22 AM To: 'Charlie Clark' Cc: 'egenix-users@lists.egenix.com' Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 17:57:25 2005 From: charlie at egenix.com (Charlie Clark) Date: Sun Feb 12 12:03:15 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <20050505165725.3380.2@bepc.1115296715.fake> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Thu May 5 09:15:21 2005 From: charlie at egenix.com (Charlie Clark) Date: Sun Feb 12 12:03:15 2006 Subject: [Zope-DB] RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <000001c55185$41477730$6b00a8c0@fonacier.local> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________ Zope-DB mailing list Zope-DB@zope.org http://mail.zope.org/mailman/listinfo/zope-db From rj at maxxian.com Thu May 5 12:38:00 2005 From: rj at maxxian.com (RJ Juneau) Date: Sun Feb 12 12:03:16 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000001c55188$6b841eb0$6505a8c0@rjlaptop> I just double-checked. Zope-2.7.6-final. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 12:49:16 2005 From: rj at maxxian.com (RJ Juneau) Date: Sun Feb 12 12:03:16 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000501c55189$fe149ba0$6505a8c0@rjlaptop> Charlie, The fix has only been applied for 2.7.7, 2.8b2. The info is in the original bug report which is closed and can be found here: http://www.zope.org/Collectors/Zope/1745 RJ -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Fri May 6 11:50:09 2005 From: rj at maxxian.com (RJ Juneau) Date: Sun Feb 12 12:03:16 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC Message-ID: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Still on eval for the product. I cannot get a stable connection to Sybase via the iODBC drivers. - The Sybase ODBC connection - including a query - have been verified at the iODBC level. - The setup is already working well for ODBC connection to MySQL. Symptoms include: - If I click on "Open Connection", it still comes back with "Connection Closed" when I go to a ZSQL method - Using 'Connect on Demand' is not working either. - Clicking "Open Connection" gives me the following error: Connection string: DSN=lixbox_sybase; UID=sa; PWD=XXXXXXX Connection pool entry: 0 Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection rejected by data source', 7952) The odbc.ini definition for DSN "lixbox_sybase" is as follows: [lixbox_sybase] JetFix = No NoRowSetSizeLimit = No Description = Test connection to listbox Options = LIXBOX DSQUERY = SQLSERVER TDSHOST = lixbox TDSPORT = 5000 TDSVER = 5.0 SQLSERVER_CATALOG = N CURSOR_SENSITIVITY = LOW UserName = sa Password = XXXXXXXX ServerType = Sybase 10/11/12 Driver = /opt/openlink/lib/sql_mt_lt.so Database = pubs2 ReadOnly = no NoAutoCommit = No NoLoginBox = No FetchBufferSize = 60 Other relevant data: - Connecting via OpenLink's iODBC - Zope 2.7.6-final - Python 2.3.4 - Connection to Sybase has been successfully tested with iODBC, including issuing a query - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC connection RJ Juneau Chief Technology Officer Maxxian Integration Inc. 155 Westhampton Drive Thornhill, Ontario Canada L4J 7X2 E-mail: rj@maxxian.com Phone: +1 905 482 9429 Cell: +1 416 897 6682 Toll free: +1 866 758 9161 Fax: +1 647 722 2038 -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050506/aef33361/attachment-0122.htm From mal at egenix.com Fri May 6 18:27:37 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Feb 12 12:03:16 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC In-Reply-To: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> References: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Message-ID: <427B8CE9.1010601@egenix.com> RJ Juneau wrote: > Still on eval for the product. > > I cannot get a stable connection to Sybase via the iODBC drivers. > > - The Sybase ODBC connection - including a query - have been verified at > the iODBC level. > - The setup is already working well for ODBC connection to MySQL. > > Symptoms include: > > - If I click on "Open Connection", it still comes back with "Connection > Closed" when I go to a ZSQL method > - Using 'Connect on Demand' is not working either. > - Clicking "Open Connection" gives me the following error: > > Connection string: DSN=lixbox_sybase; > UID=sa; > PWD=XXXXXXX Try writing the connection string on one line and without whitespace. ODBC drivers sometimes have problems with this. > Connection pool entry: 0 > Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection > rejected by data source', 7952) This is a generic error that relates to authentication or firewall problems. It is possible that turning on ODBC tracing the ODBC manager will give more clues as to the real cause of the problem. > The odbc.ini definition for DSN "lixbox_sybase" is as follows: > > [lixbox_sybase] > JetFix = No > NoRowSetSizeLimit = No > Description = Test connection to listbox > Options = LIXBOX > DSQUERY = SQLSERVER > TDSHOST = lixbox > TDSPORT = 5000 > TDSVER = 5.0 > SQLSERVER_CATALOG = N > CURSOR_SENSITIVITY = LOW > UserName = sa > Password = XXXXXXXX > ServerType = Sybase 10/11/12 > Driver = /opt/openlink/lib/sql_mt_lt.so > Database = pubs2 > ReadOnly = no > NoAutoCommit = No > NoLoginBox = No > FetchBufferSize = 60 > > > Other relevant data: > - Connecting via OpenLink's iODBC > - Zope 2.7.6-final > - Python 2.3.4 > - Connection to Sybase has been successfully tested with iODBC, > including issuing a query > - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC > connection > > > > RJ Juneau > Chief Technology Officer > Maxxian Integration Inc. > 155 Westhampton Drive > Thornhill, Ontario > Canada L4J 7X2 > E-mail: rj@maxxian.com > Phone: +1 905 482 9429 > Cell: +1 416 897 6682 > Toll free: +1 866 758 9161 > Fax: +1 647 722 2038 > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 06 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From calisp at gmail.com Sun May 15 23:49:03 2005 From: calisp at gmail.com (calisp@gmail.com) Date: Sun Feb 12 12:03:16 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK Message-ID: Hi, I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the following error... 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the last phase of a two-phase commit. This shouldn't happen. Traceback (most recent call last): File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one jar.tpc_finish(self) File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish try: self._finish() File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could not perform COMMIT or ROLLBACK', 1023) What could be causing this? Can I get the mxODBCZopeDA source from somewhere? It would make debugging this much easier. Thanks, Calisp. From mal at egenix.com Mon May 16 13:52:12 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Feb 12 12:03:16 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK In-Reply-To: References: Message-ID: <42887B5C.4010109@egenix.com> calisp@gmail.com wrote: > Hi, > > I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with > unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the > following error... > > 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the > last phase of a two-phase commit. This shouldn't happen. > Traceback (most recent call last): > File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one > jar.tpc_finish(self) > File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish > try: self._finish() > File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish > File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler > ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could > not perform COMMIT or ROLLBACK', 1023) You should have a look at the database logs to see what prevented the commit from being completed. > What could be causing this? Hard to say: mxODBCZopeDA is trying to commit the transaction, but the driver or database failed to complete the request. The above error was generated by the ODBC driver. This could be network or DNS problems, or be related to a bug in FreeTDS (which is getting more stable with every new release, but should still be considered beta quality software at the moment). > Can I get the mxODBCZopeDA source from > somewhere? It would make debugging this much easier. Getting the source is not an option and won't help much either since the source of the problem is not mxODBCZopeDA. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 16 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Sun May 1 21:29:25 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Feb 12 16:01:24 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <427259F3.4090806@egenix.com> References: <20050427130906.52878.qmail@web30008.mail.mud.yahoo.com> <427259F3.4090806@egenix.com> Message-ID: <42752005.7080904@egenix.com> M.-A. Lemburg wrote: > David Rushby wrote: > >> --- "M.-A. Lemburg" wrote: >> >>> Are you using the standard mxDateTime build or one >>> with WANT_SUBCLASSABLE_TYPES defined... >> >> >> >> Presumably "the standard", since I just built with 'py24d setup.py >> build', making no attempt to enable special directives. >> >> >>> ... (mxDateTime_Deallocate is only used by the latter)? >> >> >> >> That's true in 2.1.0-2005-04-15, but not in 2.1.0b5. >> >> >>> In any case, please try our latest snapshot: >>> >>> >> >> http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-04-15.zip >> >>> to see if that makes any difference. >> >> >> >> I can't build it out of the box: > > > Hmm, looks like distutils' sdist command doesn't like our new > repository layout which uses symlinks (after we've switched to > subversion). > > We'll have to debug distutils first, I guess :-( Ok, we've found the problem and fixed it. Here's the new release (which does build out of the box at least on our boxes ;-): http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 01 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From davidrushby at yahoo.com Mon May 2 15:49:53 2005 From: davidrushby at yahoo.com (David Rushby) Date: Sun Feb 12 16:01:24 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Ok, we've found the problem and fixed it. Here's the new > release (which does build out of the box at least on our > boxes ;-): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip It does build now, but: py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" still behaves as it did when I submitted my original message: Fatal Python error: UNREF invalid object Aborted This is the same debug build of Python 2.4.1 that I was previously using, running the same configuration (CentOS Linux 4.0/i386, everything compiled with GCC 3.4.3). Have you examined my original claim as to the cause of the bug? __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 10:21:55 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Feb 12 16:01:24 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> References: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> Message-ID: <42772693.8050306@egenix.com> David Rushby wrote: > --- "M.-A. Lemburg" wrote: > >>Ok, we've found the problem and fixed it. Here's the new >>release (which does build out of the box at least on our >>boxes ;-): >> >> > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip > > It does build now, but: > py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" > still behaves as it did when I submitted my original message: > Fatal Python error: UNREF invalid object > Aborted > > This is the same debug build of Python 2.4.1 that I was previously > using, running the same configuration (CentOS Linux 4.0/i386, > everything compiled with GCC 3.4.3). > > Have you examined my original claim as to the cause of the bug? No. We haven't had time for looking into it. I'm not sure whether your analysis of the problem is correct: if you don't define WANT_SUBCLASSABLE_TYPES, the API mxDateTime_Deallocate() is neither defined nor used. Furthermore, PyObject_Del() is only called by mxDateTime_Free() if you have explicitely edited mxDateTime.c to disabled the free list #defines. In a standard build, PyObject_Del() is only called at module finalization time. Note that the reason we call mxDateTime_Free() in the constructor is that we don't want the destructor of the object to be called. Py_DECREF() would call the destructor (mxDateTime_Deallocate). It is possible that the debug code in Python complains about the refcount in the object not being 0 at the time the object is finalized (module finalization time), but I don't see any such checks in PyObject_Free() (which is what PyObject_Del() maps to). Again, all of this does not happen in regular non-debug Python builds. Please be aware that we don't support debug builds, so fixing the problem (if there is one - gcc has some serious optimization problems on some combinations of platform and version) will take a while. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 09:27:37 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Sun Feb 12 16:01:24 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 Message-ID: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Hi all- I am trying to build the mx-base package, v.2.0.6. This will be used with postgresql 7.3.9, psycopg 1.1.18, and Roundup 0.8.2. RHEL 3.0 Python 2.3 egenix-mx-base-2.0.6.tar.gz I performed a: /usr/local/bin/python2.3 setup.py install Everything looks proper with the exeception of this series of warning statements: ----------------- gcc -pthread -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fno-strict-aliasing -fPIC -Imx/BeeBase/mxBeeBase -I/usr/local/incl ude/python2.3 -I/usr/local/include -c mx/BeeBase/mxBeeBase/btr.c -o build/temp.linux-i686-2.3/mx/BeeBase/mxBeeBase/mxBeeBa se/mx/BeeBase/mxBeeBase/btr.o mx/BeeBase/mxBeeBase/btr.c: In function `dumpBuf': mx/BeeBase/mxBeeBase/btr.c:249: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:250: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:255: warning: unsigned int format, long unsigned int arg (arg 4) mx/BeeBase/mxBeeBase/btr.c:256: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c: In function `_validateTree': mx/BeeBase/mxBeeBase/btr.c:330: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:337: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:339: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:349: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:351: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 3) creating build/lib.linux-i686-2.3/mx/BeeBase creating build/lib.linux-i686-2.3/mx/BeeBase/mxBeeBase -------------- Would someone be kind enough to let me know whether these messages were expected, and if not, how I might resolve these? Thanks! DC __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 22:06:33 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Feb 12 16:01:24 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> References: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Message-ID: <4277CBB9.8020302@egenix.com> Dianne Chen wrote: > Hi all- > > I am trying to build the mx-base package, v.2.0.6. > This will be used with postgresql 7.3.9, psycopg > 1.1.18, and Roundup 0.8.2. > > RHEL 3.0 > Python 2.3 > egenix-mx-base-2.0.6.tar.gz > > I performed a: > > /usr/local/bin/python2.3 setup.py install > > Everything looks proper with the exeception of this > series of warning statements: > > ----------------- > ... > -------------- > > Would someone be kind enough to let me know whether > these messages were expected, and if not, how I might > resolve these? These warning can safely be ignored. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 13:41:14 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Sun Feb 12 16:01:24 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: 6667 Message-ID: <20050503194114.72091.qmail@web31414.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Dianne Chen wrote: > > Hi all- > > > > I am trying to build the mx-base package, v.2.0.6. > > This will be used with postgresql 7.3.9, psycopg > > 1.1.18, and Roundup 0.8.2. > > > > RHEL 3.0 > > Python 2.3 > > egenix-mx-base-2.0.6.tar.gz > > > > I performed a: > > > > /usr/local/bin/python2.3 setup.py install > > > > Everything looks proper with the exeception of > this > > series of warning statements: > > > > ----------------- > > ... > > -------------- > > > > Would someone be kind enough to let me know > whether > > these messages were expected, and if not, how I > might > > resolve these? > > These warning can safely be ignored. > > -- > Marc-Andre Lemburg > eGenix.com > Marc- Thank you very much for the reply. It helps greatly. With kind regards, DC __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From davidrushby at yahoo.com Tue May 3 17:18:46 2005 From: davidrushby at yahoo.com (David Rushby) Date: Sun Feb 12 16:01:24 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050503231846.35012.qmail@web30009.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > I'm not sure whether your analysis of the problem is correct... Indeed, my original analysis wasn't correct; I think this one is. The fatal error I'm complaining about only arises if the arguments to DateTime.DateTime are invalid, so that the object is deallocated in the onError block of mxDateTime_FromDateAndTime. If the object is created successfully, and later deallocated by Python's garbage collector, the fatal error doesn't arise. Here's my analysis of the problem: --- If the debugging directive Py_TRACE_REFS is enabled, as it is in my case, the Python interpreter maintains a doubly linked list of all Python objects (named refchain) via the _ob_next and _ob_prev pointers added to PyObject via _PyObject_HEAD_EXTRA. Each object is inserted into refchain by the _Py_AddToAllObjects call in _Py_NewReference, and removed from refchain by the _Py_ForgetReference call in _Py_Dealloc. _Py_ForgetReference performs an integrity check on the object being deallocated (op) to make sure that its neighbors in refchain recognize it. Specifically, _Py_ForgetReference verifies that the _ob_next pointer of the previous object in refchain (op->_ob_prev->_ob_next) points to op, and that the _ob_prev pointer of the next object in refchain (op->_ob_next->_ob_prev) points to op. If either of those conditions is false, the interpreter raises the fatal error I'm seeing. After mxDateTime_New pulls an mxDateTimeObject out of the free list, it calls _Py_NewReference on that object to transform it from a "conceptually deallocated" object to a "conceptually allocated" one. _Py_NewReference inserts the object into refchain. Later, when the object is being "conceptually deallocated", it should be removed from refchain with _Py_ForgetReference. The version of _Py_Dealloc that's active when Py_TRACE_REFS is enabled does this (_Py_Dealloc is the element of Py_DECREF that performs the actual destruction). _Py_Dealloc first calls _Py_ForgetReference to remove the object from refchain, then calls the object's destructor (op->ob_type->tp_dealloc). If WANT_SUBCLASSABLE_TYPES is not defined (it is not in my case), the destructor for mxDateTime_Type is mxDateTime_Free. So, if a DateTime object is deallocated normally, as a result of its reference count falling to zero, _Py_Dealloc is called on the object, which first removes it from refchain, then passes it to mxDateTime_Free. If a DateTime object is destroyed prematurely, as a result of invalid arguments to its destructor, the onError handler calls mxDateTime_Free, so the object is "conceptually deallocated" (placed in the free list), *but* the object is not removed from refchain. So if a refchain-membership-integrity-check is performed on the object in question or one of its immediate neighbors in refchain, that integrity check fails, leading to the fatal error. --- The solution is to 'Py_DECREF(...)' the object in the onError handler of its constructor, instead of passing the object directly to mxDateTime_Free. That change solves two problems: 1) It causes _Py_Dealloc to execute, which in turn executes _Py_ForgetReference, so the object is removed from refchain, as it should be. 2) At present, objects that are created successfully and later deallocated by normal reference count mechanics have a reference count of 0 when they enter the free list, whereas objects whose constructors abort their creation due to invalid arguments have a reference count of 1 when they enter the free list. Although AFAIK this doesn't cause an actual execution problem (because the object's reference count is *explicitly set to 1* rather than *incremented by 1* when the object is later "conceptually allocated" by _Py_NewReference), it is likely to confuse future maintainers and thereby lead to the introduction of an actual execution problem. I assume that if you agree that this is a reasonable solution, you'll want to apply the change not only to mxDateTime_FromDateAndTime, but to all similar constructors in mxDateTime.c. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From rj at maxxian.com Thu May 5 01:57:40 2005 From: rj at maxxian.com (RJ Juneau) Date: Sun Feb 12 16:01:24 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c5512e$f72798c0$6505a8c0@rjlaptop> I'm on the 30 day evaluation for mxodbc_zope_da. I'm getting the following error when I submit some queries: Error Type: KeyError Error Value: 'query' I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 with UCS4. The error seems to be caused by multiple rows being returned. I did see an earlier posting with the same error message. The response suggested a template error, but this is clearly not the case here. The additional evidence I've gathered so far: - I'm running the test directly from the ZSQL method, so there's no template involved. - If I use the same query with an additional "where" clause to ensure that only one row is returned, it works - If I use a value in the 'where' clause with no rows returned, it works - The same ZSQL query is being used on a Windows machine running Zope and the free ZODBC module without a problem - The query has been verified directly in mysql-client-browser Other info: - The database is MySQL 4.1.10A-0 - iODBC is the DB driver RJ Juneau -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050505/68d278bf/attachment-0123.htm From mal at egenix.com Thu May 5 12:37:43 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Feb 12 16:01:24 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c5512e$f72798c0$6505a8c0@rjlaptop> References: <000301c5512e$f72798c0$6505a8c0@rjlaptop> Message-ID: <4279E967.6010904@egenix.com> RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 > with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 09:37:42 2005 From: rj at maxxian.com (RJ Juneau) Date: Sun Feb 12 16:01:24 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000101c5516f$3b96de90$6505a8c0@rjlaptop> More interesting info on the problem: If I execute the query directly in the "test" window of the base eGenix mxODBC Database Connection window, it works fine and returns the 20 lines expected. That could point to a problem in the rendering, which seems to be where the traceback ends. Note that within the same Zope system I also have an ODBC connection to a Sybase database, and I have successfully tested multi-line ZSQL queries there. This is the traceback: Time 2005/05/05 07:55:15.294 GMT-4 Exception Type KeyError Exception Value 'query' Traceback (innermost last): Module ZPublisher.Publish, line 101, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 39, in call_object Module Shared.DC.ZRDB.DA, line 337, in manage_test Module DocumentTemplate.DT_String, line 474, in __call__ Module DocumentTemplate.DT_In, line 602, in renderwb Module DocumentTemplate.DT_Var, line 219, in render KeyError: 'query' I don't think the following is an issue, but I'll include it for completeness.I am also getting the following iODBC warnings and errors in the Zope console log, which are related to the ODBC parameters being passed by iODBC. Note that these errors also appear for all of the successful queries. [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (Setup). [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (UsageCount). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Timeout). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Reuse). As for the ZSQL snippet from the template... Since there's no template involved yet (I'm still testing directly from the ZSQL method), I assume you mean the SQL code? select h.host_name, s.system_name, s.system_handle, count(*) from terminal t, system_map s, host h where t.system_index = s.system_index and s.host_index = h.host_index group by s.system_name order by h.host_name Nothing complicated here. There are no parameters passed to the query. RJ -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: May 5, 2005 5:38 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: Re: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is > 2.3.4 with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ---------------------------------------------------------------------- > -- > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 16:00:32 2005 From: charlie at egenix.com (Charlie Clark) Date: Sun Feb 12 16:01:24 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000101c5516f$3b96de90$6505a8c0@rjlaptop> References: <000101c5516f$3b96de90$6505a8c0@rjlaptop> Message-ID: <20050505150032.644.1@bepc.1115296715.fake> On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base eGenix > mxODBC Database Connection window, it works fine and returns the 20 > lines expected. That could point to a problem in the rendering, which > seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection to > a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 10:22:17 2005 From: rj at maxxian.com (RJ Juneau) Date: Sun Feb 12 16:01:24 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505150032.644.1@bepc.1115296715.fake> Message-ID: <000201c55175$75bcad10$6505a8c0@rjlaptop> At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 11:47:14 2005 From: rj at maxxian.com (RJ Juneau) Date: Sun Feb 12 16:01:24 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c55181$549be0e0$6505a8c0@rjlaptop> Charlie, I found a fix. Here it is in case anyone else runs into this. You were correct - the problem is in another part of Zope. Based on your feedback, I did a bit more searching and found something here: http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. html The problem appears to be in Zope versions after 2.7.0. I'm running 2.7.6, and the post indicates that it also happens in 2.7.4. The solution: Edit file /lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. There are two lines in the file that start with . Edit them as follows: Change first line to: Change second line to: Just to be after, I shut down Zope before I made the changes and restarted it after. Thanks for the help! RJ -----Original Message----- From: RJ Juneau [mailto:rj@maxxian.com] Sent: May 5, 2005 9:22 AM To: 'Charlie Clark' Cc: 'egenix-users@lists.egenix.com' Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 17:57:25 2005 From: charlie at egenix.com (Charlie Clark) Date: Sun Feb 12 16:01:24 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <20050505165725.3380.2@bepc.1115296715.fake> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Thu May 5 09:15:21 2005 From: charlie at egenix.com (Charlie Clark) Date: Sun Feb 12 16:01:24 2006 Subject: [Zope-DB] RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <000001c55185$41477730$6b00a8c0@fonacier.local> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________ Zope-DB mailing list Zope-DB@zope.org http://mail.zope.org/mailman/listinfo/zope-db From rj at maxxian.com Thu May 5 12:38:00 2005 From: rj at maxxian.com (RJ Juneau) Date: Sun Feb 12 16:01:24 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000001c55188$6b841eb0$6505a8c0@rjlaptop> I just double-checked. Zope-2.7.6-final. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 12:49:16 2005 From: rj at maxxian.com (RJ Juneau) Date: Sun Feb 12 16:01:24 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000501c55189$fe149ba0$6505a8c0@rjlaptop> Charlie, The fix has only been applied for 2.7.7, 2.8b2. The info is in the original bug report which is closed and can be found here: http://www.zope.org/Collectors/Zope/1745 RJ -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Fri May 6 11:50:09 2005 From: rj at maxxian.com (RJ Juneau) Date: Sun Feb 12 16:01:24 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC Message-ID: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Still on eval for the product. I cannot get a stable connection to Sybase via the iODBC drivers. - The Sybase ODBC connection - including a query - have been verified at the iODBC level. - The setup is already working well for ODBC connection to MySQL. Symptoms include: - If I click on "Open Connection", it still comes back with "Connection Closed" when I go to a ZSQL method - Using 'Connect on Demand' is not working either. - Clicking "Open Connection" gives me the following error: Connection string: DSN=lixbox_sybase; UID=sa; PWD=XXXXXXX Connection pool entry: 0 Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection rejected by data source', 7952) The odbc.ini definition for DSN "lixbox_sybase" is as follows: [lixbox_sybase] JetFix = No NoRowSetSizeLimit = No Description = Test connection to listbox Options = LIXBOX DSQUERY = SQLSERVER TDSHOST = lixbox TDSPORT = 5000 TDSVER = 5.0 SQLSERVER_CATALOG = N CURSOR_SENSITIVITY = LOW UserName = sa Password = XXXXXXXX ServerType = Sybase 10/11/12 Driver = /opt/openlink/lib/sql_mt_lt.so Database = pubs2 ReadOnly = no NoAutoCommit = No NoLoginBox = No FetchBufferSize = 60 Other relevant data: - Connecting via OpenLink's iODBC - Zope 2.7.6-final - Python 2.3.4 - Connection to Sybase has been successfully tested with iODBC, including issuing a query - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC connection RJ Juneau Chief Technology Officer Maxxian Integration Inc. 155 Westhampton Drive Thornhill, Ontario Canada L4J 7X2 E-mail: rj@maxxian.com Phone: +1 905 482 9429 Cell: +1 416 897 6682 Toll free: +1 866 758 9161 Fax: +1 647 722 2038 -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050506/aef33361/attachment-0123.htm From mal at egenix.com Fri May 6 18:27:37 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Feb 12 16:01:24 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC In-Reply-To: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> References: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Message-ID: <427B8CE9.1010601@egenix.com> RJ Juneau wrote: > Still on eval for the product. > > I cannot get a stable connection to Sybase via the iODBC drivers. > > - The Sybase ODBC connection - including a query - have been verified at > the iODBC level. > - The setup is already working well for ODBC connection to MySQL. > > Symptoms include: > > - If I click on "Open Connection", it still comes back with "Connection > Closed" when I go to a ZSQL method > - Using 'Connect on Demand' is not working either. > - Clicking "Open Connection" gives me the following error: > > Connection string: DSN=lixbox_sybase; > UID=sa; > PWD=XXXXXXX Try writing the connection string on one line and without whitespace. ODBC drivers sometimes have problems with this. > Connection pool entry: 0 > Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection > rejected by data source', 7952) This is a generic error that relates to authentication or firewall problems. It is possible that turning on ODBC tracing the ODBC manager will give more clues as to the real cause of the problem. > The odbc.ini definition for DSN "lixbox_sybase" is as follows: > > [lixbox_sybase] > JetFix = No > NoRowSetSizeLimit = No > Description = Test connection to listbox > Options = LIXBOX > DSQUERY = SQLSERVER > TDSHOST = lixbox > TDSPORT = 5000 > TDSVER = 5.0 > SQLSERVER_CATALOG = N > CURSOR_SENSITIVITY = LOW > UserName = sa > Password = XXXXXXXX > ServerType = Sybase 10/11/12 > Driver = /opt/openlink/lib/sql_mt_lt.so > Database = pubs2 > ReadOnly = no > NoAutoCommit = No > NoLoginBox = No > FetchBufferSize = 60 > > > Other relevant data: > - Connecting via OpenLink's iODBC > - Zope 2.7.6-final > - Python 2.3.4 > - Connection to Sybase has been successfully tested with iODBC, > including issuing a query > - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC > connection > > > > RJ Juneau > Chief Technology Officer > Maxxian Integration Inc. > 155 Westhampton Drive > Thornhill, Ontario > Canada L4J 7X2 > E-mail: rj@maxxian.com > Phone: +1 905 482 9429 > Cell: +1 416 897 6682 > Toll free: +1 866 758 9161 > Fax: +1 647 722 2038 > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 06 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From calisp at gmail.com Sun May 15 23:49:03 2005 From: calisp at gmail.com (calisp@gmail.com) Date: Sun Feb 12 16:01:24 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK Message-ID: Hi, I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the following error... 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the last phase of a two-phase commit. This shouldn't happen. Traceback (most recent call last): File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one jar.tpc_finish(self) File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish try: self._finish() File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could not perform COMMIT or ROLLBACK', 1023) What could be causing this? Can I get the mxODBCZopeDA source from somewhere? It would make debugging this much easier. Thanks, Calisp. From mal at egenix.com Mon May 16 13:52:12 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Feb 12 16:01:24 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK In-Reply-To: References: Message-ID: <42887B5C.4010109@egenix.com> calisp@gmail.com wrote: > Hi, > > I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with > unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the > following error... > > 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the > last phase of a two-phase commit. This shouldn't happen. > Traceback (most recent call last): > File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one > jar.tpc_finish(self) > File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish > try: self._finish() > File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish > File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler > ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could > not perform COMMIT or ROLLBACK', 1023) You should have a look at the database logs to see what prevented the commit from being completed. > What could be causing this? Hard to say: mxODBCZopeDA is trying to commit the transaction, but the driver or database failed to complete the request. The above error was generated by the ODBC driver. This could be network or DNS problems, or be related to a bug in FreeTDS (which is getting more stable with every new release, but should still be considered beta quality software at the moment). > Can I get the mxODBCZopeDA source from > somewhere? It would make debugging this much easier. Getting the source is not an option and won't help much either since the source of the problem is not mxODBCZopeDA. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 16 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Sun May 1 21:29:25 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Feb 12 20:01:14 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <427259F3.4090806@egenix.com> References: <20050427130906.52878.qmail@web30008.mail.mud.yahoo.com> <427259F3.4090806@egenix.com> Message-ID: <42752005.7080904@egenix.com> M.-A. Lemburg wrote: > David Rushby wrote: > >> --- "M.-A. Lemburg" wrote: >> >>> Are you using the standard mxDateTime build or one >>> with WANT_SUBCLASSABLE_TYPES defined... >> >> >> >> Presumably "the standard", since I just built with 'py24d setup.py >> build', making no attempt to enable special directives. >> >> >>> ... (mxDateTime_Deallocate is only used by the latter)? >> >> >> >> That's true in 2.1.0-2005-04-15, but not in 2.1.0b5. >> >> >>> In any case, please try our latest snapshot: >>> >>> >> >> http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-04-15.zip >> >>> to see if that makes any difference. >> >> >> >> I can't build it out of the box: > > > Hmm, looks like distutils' sdist command doesn't like our new > repository layout which uses symlinks (after we've switched to > subversion). > > We'll have to debug distutils first, I guess :-( Ok, we've found the problem and fixed it. Here's the new release (which does build out of the box at least on our boxes ;-): http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 01 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From davidrushby at yahoo.com Mon May 2 15:49:53 2005 From: davidrushby at yahoo.com (David Rushby) Date: Sun Feb 12 20:01:14 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Ok, we've found the problem and fixed it. Here's the new > release (which does build out of the box at least on our > boxes ;-): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip It does build now, but: py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" still behaves as it did when I submitted my original message: Fatal Python error: UNREF invalid object Aborted This is the same debug build of Python 2.4.1 that I was previously using, running the same configuration (CentOS Linux 4.0/i386, everything compiled with GCC 3.4.3). Have you examined my original claim as to the cause of the bug? __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 10:21:55 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Feb 12 20:01:14 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> References: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> Message-ID: <42772693.8050306@egenix.com> David Rushby wrote: > --- "M.-A. Lemburg" wrote: > >>Ok, we've found the problem and fixed it. Here's the new >>release (which does build out of the box at least on our >>boxes ;-): >> >> > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip > > It does build now, but: > py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" > still behaves as it did when I submitted my original message: > Fatal Python error: UNREF invalid object > Aborted > > This is the same debug build of Python 2.4.1 that I was previously > using, running the same configuration (CentOS Linux 4.0/i386, > everything compiled with GCC 3.4.3). > > Have you examined my original claim as to the cause of the bug? No. We haven't had time for looking into it. I'm not sure whether your analysis of the problem is correct: if you don't define WANT_SUBCLASSABLE_TYPES, the API mxDateTime_Deallocate() is neither defined nor used. Furthermore, PyObject_Del() is only called by mxDateTime_Free() if you have explicitely edited mxDateTime.c to disabled the free list #defines. In a standard build, PyObject_Del() is only called at module finalization time. Note that the reason we call mxDateTime_Free() in the constructor is that we don't want the destructor of the object to be called. Py_DECREF() would call the destructor (mxDateTime_Deallocate). It is possible that the debug code in Python complains about the refcount in the object not being 0 at the time the object is finalized (module finalization time), but I don't see any such checks in PyObject_Free() (which is what PyObject_Del() maps to). Again, all of this does not happen in regular non-debug Python builds. Please be aware that we don't support debug builds, so fixing the problem (if there is one - gcc has some serious optimization problems on some combinations of platform and version) will take a while. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 09:27:37 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Sun Feb 12 20:01:14 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 Message-ID: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Hi all- I am trying to build the mx-base package, v.2.0.6. This will be used with postgresql 7.3.9, psycopg 1.1.18, and Roundup 0.8.2. RHEL 3.0 Python 2.3 egenix-mx-base-2.0.6.tar.gz I performed a: /usr/local/bin/python2.3 setup.py install Everything looks proper with the exeception of this series of warning statements: ----------------- gcc -pthread -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fno-strict-aliasing -fPIC -Imx/BeeBase/mxBeeBase -I/usr/local/incl ude/python2.3 -I/usr/local/include -c mx/BeeBase/mxBeeBase/btr.c -o build/temp.linux-i686-2.3/mx/BeeBase/mxBeeBase/mxBeeBa se/mx/BeeBase/mxBeeBase/btr.o mx/BeeBase/mxBeeBase/btr.c: In function `dumpBuf': mx/BeeBase/mxBeeBase/btr.c:249: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:250: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:255: warning: unsigned int format, long unsigned int arg (arg 4) mx/BeeBase/mxBeeBase/btr.c:256: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c: In function `_validateTree': mx/BeeBase/mxBeeBase/btr.c:330: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:337: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:339: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:349: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:351: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 3) creating build/lib.linux-i686-2.3/mx/BeeBase creating build/lib.linux-i686-2.3/mx/BeeBase/mxBeeBase -------------- Would someone be kind enough to let me know whether these messages were expected, and if not, how I might resolve these? Thanks! DC __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 22:06:33 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Feb 12 20:01:14 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> References: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Message-ID: <4277CBB9.8020302@egenix.com> Dianne Chen wrote: > Hi all- > > I am trying to build the mx-base package, v.2.0.6. > This will be used with postgresql 7.3.9, psycopg > 1.1.18, and Roundup 0.8.2. > > RHEL 3.0 > Python 2.3 > egenix-mx-base-2.0.6.tar.gz > > I performed a: > > /usr/local/bin/python2.3 setup.py install > > Everything looks proper with the exeception of this > series of warning statements: > > ----------------- > ... > -------------- > > Would someone be kind enough to let me know whether > these messages were expected, and if not, how I might > resolve these? These warning can safely be ignored. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 13:41:14 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Sun Feb 12 20:01:14 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: 6667 Message-ID: <20050503194114.72091.qmail@web31414.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Dianne Chen wrote: > > Hi all- > > > > I am trying to build the mx-base package, v.2.0.6. > > This will be used with postgresql 7.3.9, psycopg > > 1.1.18, and Roundup 0.8.2. > > > > RHEL 3.0 > > Python 2.3 > > egenix-mx-base-2.0.6.tar.gz > > > > I performed a: > > > > /usr/local/bin/python2.3 setup.py install > > > > Everything looks proper with the exeception of > this > > series of warning statements: > > > > ----------------- > > ... > > -------------- > > > > Would someone be kind enough to let me know > whether > > these messages were expected, and if not, how I > might > > resolve these? > > These warning can safely be ignored. > > -- > Marc-Andre Lemburg > eGenix.com > Marc- Thank you very much for the reply. It helps greatly. With kind regards, DC __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From davidrushby at yahoo.com Tue May 3 17:18:46 2005 From: davidrushby at yahoo.com (David Rushby) Date: Sun Feb 12 20:01:14 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050503231846.35012.qmail@web30009.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > I'm not sure whether your analysis of the problem is correct... Indeed, my original analysis wasn't correct; I think this one is. The fatal error I'm complaining about only arises if the arguments to DateTime.DateTime are invalid, so that the object is deallocated in the onError block of mxDateTime_FromDateAndTime. If the object is created successfully, and later deallocated by Python's garbage collector, the fatal error doesn't arise. Here's my analysis of the problem: --- If the debugging directive Py_TRACE_REFS is enabled, as it is in my case, the Python interpreter maintains a doubly linked list of all Python objects (named refchain) via the _ob_next and _ob_prev pointers added to PyObject via _PyObject_HEAD_EXTRA. Each object is inserted into refchain by the _Py_AddToAllObjects call in _Py_NewReference, and removed from refchain by the _Py_ForgetReference call in _Py_Dealloc. _Py_ForgetReference performs an integrity check on the object being deallocated (op) to make sure that its neighbors in refchain recognize it. Specifically, _Py_ForgetReference verifies that the _ob_next pointer of the previous object in refchain (op->_ob_prev->_ob_next) points to op, and that the _ob_prev pointer of the next object in refchain (op->_ob_next->_ob_prev) points to op. If either of those conditions is false, the interpreter raises the fatal error I'm seeing. After mxDateTime_New pulls an mxDateTimeObject out of the free list, it calls _Py_NewReference on that object to transform it from a "conceptually deallocated" object to a "conceptually allocated" one. _Py_NewReference inserts the object into refchain. Later, when the object is being "conceptually deallocated", it should be removed from refchain with _Py_ForgetReference. The version of _Py_Dealloc that's active when Py_TRACE_REFS is enabled does this (_Py_Dealloc is the element of Py_DECREF that performs the actual destruction). _Py_Dealloc first calls _Py_ForgetReference to remove the object from refchain, then calls the object's destructor (op->ob_type->tp_dealloc). If WANT_SUBCLASSABLE_TYPES is not defined (it is not in my case), the destructor for mxDateTime_Type is mxDateTime_Free. So, if a DateTime object is deallocated normally, as a result of its reference count falling to zero, _Py_Dealloc is called on the object, which first removes it from refchain, then passes it to mxDateTime_Free. If a DateTime object is destroyed prematurely, as a result of invalid arguments to its destructor, the onError handler calls mxDateTime_Free, so the object is "conceptually deallocated" (placed in the free list), *but* the object is not removed from refchain. So if a refchain-membership-integrity-check is performed on the object in question or one of its immediate neighbors in refchain, that integrity check fails, leading to the fatal error. --- The solution is to 'Py_DECREF(...)' the object in the onError handler of its constructor, instead of passing the object directly to mxDateTime_Free. That change solves two problems: 1) It causes _Py_Dealloc to execute, which in turn executes _Py_ForgetReference, so the object is removed from refchain, as it should be. 2) At present, objects that are created successfully and later deallocated by normal reference count mechanics have a reference count of 0 when they enter the free list, whereas objects whose constructors abort their creation due to invalid arguments have a reference count of 1 when they enter the free list. Although AFAIK this doesn't cause an actual execution problem (because the object's reference count is *explicitly set to 1* rather than *incremented by 1* when the object is later "conceptually allocated" by _Py_NewReference), it is likely to confuse future maintainers and thereby lead to the introduction of an actual execution problem. I assume that if you agree that this is a reasonable solution, you'll want to apply the change not only to mxDateTime_FromDateAndTime, but to all similar constructors in mxDateTime.c. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From rj at maxxian.com Thu May 5 01:57:40 2005 From: rj at maxxian.com (RJ Juneau) Date: Sun Feb 12 20:01:14 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c5512e$f72798c0$6505a8c0@rjlaptop> I'm on the 30 day evaluation for mxodbc_zope_da. I'm getting the following error when I submit some queries: Error Type: KeyError Error Value: 'query' I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 with UCS4. The error seems to be caused by multiple rows being returned. I did see an earlier posting with the same error message. The response suggested a template error, but this is clearly not the case here. The additional evidence I've gathered so far: - I'm running the test directly from the ZSQL method, so there's no template involved. - If I use the same query with an additional "where" clause to ensure that only one row is returned, it works - If I use a value in the 'where' clause with no rows returned, it works - The same ZSQL query is being used on a Windows machine running Zope and the free ZODBC module without a problem - The query has been verified directly in mysql-client-browser Other info: - The database is MySQL 4.1.10A-0 - iODBC is the DB driver RJ Juneau -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050505/68d278bf/attachment-0124.htm From mal at egenix.com Thu May 5 12:37:43 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Feb 12 20:01:14 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c5512e$f72798c0$6505a8c0@rjlaptop> References: <000301c5512e$f72798c0$6505a8c0@rjlaptop> Message-ID: <4279E967.6010904@egenix.com> RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 > with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 09:37:42 2005 From: rj at maxxian.com (RJ Juneau) Date: Sun Feb 12 20:01:15 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000101c5516f$3b96de90$6505a8c0@rjlaptop> More interesting info on the problem: If I execute the query directly in the "test" window of the base eGenix mxODBC Database Connection window, it works fine and returns the 20 lines expected. That could point to a problem in the rendering, which seems to be where the traceback ends. Note that within the same Zope system I also have an ODBC connection to a Sybase database, and I have successfully tested multi-line ZSQL queries there. This is the traceback: Time 2005/05/05 07:55:15.294 GMT-4 Exception Type KeyError Exception Value 'query' Traceback (innermost last): Module ZPublisher.Publish, line 101, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 39, in call_object Module Shared.DC.ZRDB.DA, line 337, in manage_test Module DocumentTemplate.DT_String, line 474, in __call__ Module DocumentTemplate.DT_In, line 602, in renderwb Module DocumentTemplate.DT_Var, line 219, in render KeyError: 'query' I don't think the following is an issue, but I'll include it for completeness.I am also getting the following iODBC warnings and errors in the Zope console log, which are related to the ODBC parameters being passed by iODBC. Note that these errors also appear for all of the successful queries. [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (Setup). [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (UsageCount). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Timeout). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Reuse). As for the ZSQL snippet from the template... Since there's no template involved yet (I'm still testing directly from the ZSQL method), I assume you mean the SQL code? select h.host_name, s.system_name, s.system_handle, count(*) from terminal t, system_map s, host h where t.system_index = s.system_index and s.host_index = h.host_index group by s.system_name order by h.host_name Nothing complicated here. There are no parameters passed to the query. RJ -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: May 5, 2005 5:38 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: Re: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is > 2.3.4 with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ---------------------------------------------------------------------- > -- > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 16:00:32 2005 From: charlie at egenix.com (Charlie Clark) Date: Sun Feb 12 20:01:15 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000101c5516f$3b96de90$6505a8c0@rjlaptop> References: <000101c5516f$3b96de90$6505a8c0@rjlaptop> Message-ID: <20050505150032.644.1@bepc.1115296715.fake> On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base eGenix > mxODBC Database Connection window, it works fine and returns the 20 > lines expected. That could point to a problem in the rendering, which > seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection to > a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 10:22:17 2005 From: rj at maxxian.com (RJ Juneau) Date: Sun Feb 12 20:01:15 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505150032.644.1@bepc.1115296715.fake> Message-ID: <000201c55175$75bcad10$6505a8c0@rjlaptop> At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 11:47:14 2005 From: rj at maxxian.com (RJ Juneau) Date: Sun Feb 12 20:01:15 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c55181$549be0e0$6505a8c0@rjlaptop> Charlie, I found a fix. Here it is in case anyone else runs into this. You were correct - the problem is in another part of Zope. Based on your feedback, I did a bit more searching and found something here: http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. html The problem appears to be in Zope versions after 2.7.0. I'm running 2.7.6, and the post indicates that it also happens in 2.7.4. The solution: Edit file /lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. There are two lines in the file that start with . Edit them as follows: Change first line to: Change second line to: Just to be after, I shut down Zope before I made the changes and restarted it after. Thanks for the help! RJ -----Original Message----- From: RJ Juneau [mailto:rj@maxxian.com] Sent: May 5, 2005 9:22 AM To: 'Charlie Clark' Cc: 'egenix-users@lists.egenix.com' Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 17:57:25 2005 From: charlie at egenix.com (Charlie Clark) Date: Sun Feb 12 20:01:15 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <20050505165725.3380.2@bepc.1115296715.fake> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Thu May 5 09:15:21 2005 From: charlie at egenix.com (Charlie Clark) Date: Sun Feb 12 20:01:15 2006 Subject: [Zope-DB] RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <000001c55185$41477730$6b00a8c0@fonacier.local> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________ Zope-DB mailing list Zope-DB@zope.org http://mail.zope.org/mailman/listinfo/zope-db From rj at maxxian.com Thu May 5 12:38:00 2005 From: rj at maxxian.com (RJ Juneau) Date: Sun Feb 12 20:01:15 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000001c55188$6b841eb0$6505a8c0@rjlaptop> I just double-checked. Zope-2.7.6-final. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 12:49:16 2005 From: rj at maxxian.com (RJ Juneau) Date: Sun Feb 12 20:01:15 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000501c55189$fe149ba0$6505a8c0@rjlaptop> Charlie, The fix has only been applied for 2.7.7, 2.8b2. The info is in the original bug report which is closed and can be found here: http://www.zope.org/Collectors/Zope/1745 RJ -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Fri May 6 11:50:09 2005 From: rj at maxxian.com (RJ Juneau) Date: Sun Feb 12 20:01:15 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC Message-ID: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Still on eval for the product. I cannot get a stable connection to Sybase via the iODBC drivers. - The Sybase ODBC connection - including a query - have been verified at the iODBC level. - The setup is already working well for ODBC connection to MySQL. Symptoms include: - If I click on "Open Connection", it still comes back with "Connection Closed" when I go to a ZSQL method - Using 'Connect on Demand' is not working either. - Clicking "Open Connection" gives me the following error: Connection string: DSN=lixbox_sybase; UID=sa; PWD=XXXXXXX Connection pool entry: 0 Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection rejected by data source', 7952) The odbc.ini definition for DSN "lixbox_sybase" is as follows: [lixbox_sybase] JetFix = No NoRowSetSizeLimit = No Description = Test connection to listbox Options = LIXBOX DSQUERY = SQLSERVER TDSHOST = lixbox TDSPORT = 5000 TDSVER = 5.0 SQLSERVER_CATALOG = N CURSOR_SENSITIVITY = LOW UserName = sa Password = XXXXXXXX ServerType = Sybase 10/11/12 Driver = /opt/openlink/lib/sql_mt_lt.so Database = pubs2 ReadOnly = no NoAutoCommit = No NoLoginBox = No FetchBufferSize = 60 Other relevant data: - Connecting via OpenLink's iODBC - Zope 2.7.6-final - Python 2.3.4 - Connection to Sybase has been successfully tested with iODBC, including issuing a query - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC connection RJ Juneau Chief Technology Officer Maxxian Integration Inc. 155 Westhampton Drive Thornhill, Ontario Canada L4J 7X2 E-mail: rj@maxxian.com Phone: +1 905 482 9429 Cell: +1 416 897 6682 Toll free: +1 866 758 9161 Fax: +1 647 722 2038 -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050506/aef33361/attachment-0124.htm From mal at egenix.com Fri May 6 18:27:37 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Feb 12 20:01:15 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC In-Reply-To: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> References: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Message-ID: <427B8CE9.1010601@egenix.com> RJ Juneau wrote: > Still on eval for the product. > > I cannot get a stable connection to Sybase via the iODBC drivers. > > - The Sybase ODBC connection - including a query - have been verified at > the iODBC level. > - The setup is already working well for ODBC connection to MySQL. > > Symptoms include: > > - If I click on "Open Connection", it still comes back with "Connection > Closed" when I go to a ZSQL method > - Using 'Connect on Demand' is not working either. > - Clicking "Open Connection" gives me the following error: > > Connection string: DSN=lixbox_sybase; > UID=sa; > PWD=XXXXXXX Try writing the connection string on one line and without whitespace. ODBC drivers sometimes have problems with this. > Connection pool entry: 0 > Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection > rejected by data source', 7952) This is a generic error that relates to authentication or firewall problems. It is possible that turning on ODBC tracing the ODBC manager will give more clues as to the real cause of the problem. > The odbc.ini definition for DSN "lixbox_sybase" is as follows: > > [lixbox_sybase] > JetFix = No > NoRowSetSizeLimit = No > Description = Test connection to listbox > Options = LIXBOX > DSQUERY = SQLSERVER > TDSHOST = lixbox > TDSPORT = 5000 > TDSVER = 5.0 > SQLSERVER_CATALOG = N > CURSOR_SENSITIVITY = LOW > UserName = sa > Password = XXXXXXXX > ServerType = Sybase 10/11/12 > Driver = /opt/openlink/lib/sql_mt_lt.so > Database = pubs2 > ReadOnly = no > NoAutoCommit = No > NoLoginBox = No > FetchBufferSize = 60 > > > Other relevant data: > - Connecting via OpenLink's iODBC > - Zope 2.7.6-final > - Python 2.3.4 > - Connection to Sybase has been successfully tested with iODBC, > including issuing a query > - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC > connection > > > > RJ Juneau > Chief Technology Officer > Maxxian Integration Inc. > 155 Westhampton Drive > Thornhill, Ontario > Canada L4J 7X2 > E-mail: rj@maxxian.com > Phone: +1 905 482 9429 > Cell: +1 416 897 6682 > Toll free: +1 866 758 9161 > Fax: +1 647 722 2038 > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 06 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From calisp at gmail.com Sun May 15 23:49:03 2005 From: calisp at gmail.com (calisp@gmail.com) Date: Sun Feb 12 20:01:15 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK Message-ID: Hi, I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the following error... 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the last phase of a two-phase commit. This shouldn't happen. Traceback (most recent call last): File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one jar.tpc_finish(self) File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish try: self._finish() File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could not perform COMMIT or ROLLBACK', 1023) What could be causing this? Can I get the mxODBCZopeDA source from somewhere? It would make debugging this much easier. Thanks, Calisp. From mal at egenix.com Mon May 16 13:52:12 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Sun Feb 12 20:01:15 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK In-Reply-To: References: Message-ID: <42887B5C.4010109@egenix.com> calisp@gmail.com wrote: > Hi, > > I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with > unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the > following error... > > 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the > last phase of a two-phase commit. This shouldn't happen. > Traceback (most recent call last): > File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one > jar.tpc_finish(self) > File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish > try: self._finish() > File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish > File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler > ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could > not perform COMMIT or ROLLBACK', 1023) You should have a look at the database logs to see what prevented the commit from being completed. > What could be causing this? Hard to say: mxODBCZopeDA is trying to commit the transaction, but the driver or database failed to complete the request. The above error was generated by the ODBC driver. This could be network or DNS problems, or be related to a bug in FreeTDS (which is getting more stable with every new release, but should still be considered beta quality software at the moment). > Can I get the mxODBCZopeDA source from > somewhere? It would make debugging this much easier. Getting the source is not an option and won't help much either since the source of the problem is not mxODBCZopeDA. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 16 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Sun May 1 21:29:25 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Feb 13 08:19:14 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <427259F3.4090806@egenix.com> References: <20050427130906.52878.qmail@web30008.mail.mud.yahoo.com> <427259F3.4090806@egenix.com> Message-ID: <42752005.7080904@egenix.com> M.-A. Lemburg wrote: > David Rushby wrote: > >> --- "M.-A. Lemburg" wrote: >> >>> Are you using the standard mxDateTime build or one >>> with WANT_SUBCLASSABLE_TYPES defined... >> >> >> >> Presumably "the standard", since I just built with 'py24d setup.py >> build', making no attempt to enable special directives. >> >> >>> ... (mxDateTime_Deallocate is only used by the latter)? >> >> >> >> That's true in 2.1.0-2005-04-15, but not in 2.1.0b5. >> >> >>> In any case, please try our latest snapshot: >>> >>> >> >> http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-04-15.zip >> >>> to see if that makes any difference. >> >> >> >> I can't build it out of the box: > > > Hmm, looks like distutils' sdist command doesn't like our new > repository layout which uses symlinks (after we've switched to > subversion). > > We'll have to debug distutils first, I guess :-( Ok, we've found the problem and fixed it. Here's the new release (which does build out of the box at least on our boxes ;-): http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 01 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From davidrushby at yahoo.com Mon May 2 15:49:53 2005 From: davidrushby at yahoo.com (David Rushby) Date: Mon Feb 13 08:19:15 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Ok, we've found the problem and fixed it. Here's the new > release (which does build out of the box at least on our > boxes ;-): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip It does build now, but: py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" still behaves as it did when I submitted my original message: Fatal Python error: UNREF invalid object Aborted This is the same debug build of Python 2.4.1 that I was previously using, running the same configuration (CentOS Linux 4.0/i386, everything compiled with GCC 3.4.3). Have you examined my original claim as to the cause of the bug? __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 10:21:55 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Feb 13 08:19:16 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> References: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> Message-ID: <42772693.8050306@egenix.com> David Rushby wrote: > --- "M.-A. Lemburg" wrote: > >>Ok, we've found the problem and fixed it. Here's the new >>release (which does build out of the box at least on our >>boxes ;-): >> >> > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip > > It does build now, but: > py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" > still behaves as it did when I submitted my original message: > Fatal Python error: UNREF invalid object > Aborted > > This is the same debug build of Python 2.4.1 that I was previously > using, running the same configuration (CentOS Linux 4.0/i386, > everything compiled with GCC 3.4.3). > > Have you examined my original claim as to the cause of the bug? No. We haven't had time for looking into it. I'm not sure whether your analysis of the problem is correct: if you don't define WANT_SUBCLASSABLE_TYPES, the API mxDateTime_Deallocate() is neither defined nor used. Furthermore, PyObject_Del() is only called by mxDateTime_Free() if you have explicitely edited mxDateTime.c to disabled the free list #defines. In a standard build, PyObject_Del() is only called at module finalization time. Note that the reason we call mxDateTime_Free() in the constructor is that we don't want the destructor of the object to be called. Py_DECREF() would call the destructor (mxDateTime_Deallocate). It is possible that the debug code in Python complains about the refcount in the object not being 0 at the time the object is finalized (module finalization time), but I don't see any such checks in PyObject_Free() (which is what PyObject_Del() maps to). Again, all of this does not happen in regular non-debug Python builds. Please be aware that we don't support debug builds, so fixing the problem (if there is one - gcc has some serious optimization problems on some combinations of platform and version) will take a while. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 09:27:37 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Mon Feb 13 08:19:16 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 Message-ID: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Hi all- I am trying to build the mx-base package, v.2.0.6. This will be used with postgresql 7.3.9, psycopg 1.1.18, and Roundup 0.8.2. RHEL 3.0 Python 2.3 egenix-mx-base-2.0.6.tar.gz I performed a: /usr/local/bin/python2.3 setup.py install Everything looks proper with the exeception of this series of warning statements: ----------------- gcc -pthread -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fno-strict-aliasing -fPIC -Imx/BeeBase/mxBeeBase -I/usr/local/incl ude/python2.3 -I/usr/local/include -c mx/BeeBase/mxBeeBase/btr.c -o build/temp.linux-i686-2.3/mx/BeeBase/mxBeeBase/mxBeeBa se/mx/BeeBase/mxBeeBase/btr.o mx/BeeBase/mxBeeBase/btr.c: In function `dumpBuf': mx/BeeBase/mxBeeBase/btr.c:249: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:250: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:255: warning: unsigned int format, long unsigned int arg (arg 4) mx/BeeBase/mxBeeBase/btr.c:256: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c: In function `_validateTree': mx/BeeBase/mxBeeBase/btr.c:330: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:337: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:339: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:349: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:351: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 3) creating build/lib.linux-i686-2.3/mx/BeeBase creating build/lib.linux-i686-2.3/mx/BeeBase/mxBeeBase -------------- Would someone be kind enough to let me know whether these messages were expected, and if not, how I might resolve these? Thanks! DC __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 22:06:33 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Feb 13 08:19:16 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> References: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Message-ID: <4277CBB9.8020302@egenix.com> Dianne Chen wrote: > Hi all- > > I am trying to build the mx-base package, v.2.0.6. > This will be used with postgresql 7.3.9, psycopg > 1.1.18, and Roundup 0.8.2. > > RHEL 3.0 > Python 2.3 > egenix-mx-base-2.0.6.tar.gz > > I performed a: > > /usr/local/bin/python2.3 setup.py install > > Everything looks proper with the exeception of this > series of warning statements: > > ----------------- > ... > -------------- > > Would someone be kind enough to let me know whether > these messages were expected, and if not, how I might > resolve these? These warning can safely be ignored. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 13:41:14 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Mon Feb 13 08:19:17 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: 6667 Message-ID: <20050503194114.72091.qmail@web31414.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Dianne Chen wrote: > > Hi all- > > > > I am trying to build the mx-base package, v.2.0.6. > > This will be used with postgresql 7.3.9, psycopg > > 1.1.18, and Roundup 0.8.2. > > > > RHEL 3.0 > > Python 2.3 > > egenix-mx-base-2.0.6.tar.gz > > > > I performed a: > > > > /usr/local/bin/python2.3 setup.py install > > > > Everything looks proper with the exeception of > this > > series of warning statements: > > > > ----------------- > > ... > > -------------- > > > > Would someone be kind enough to let me know > whether > > these messages were expected, and if not, how I > might > > resolve these? > > These warning can safely be ignored. > > -- > Marc-Andre Lemburg > eGenix.com > Marc- Thank you very much for the reply. It helps greatly. With kind regards, DC __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From davidrushby at yahoo.com Tue May 3 17:18:46 2005 From: davidrushby at yahoo.com (David Rushby) Date: Mon Feb 13 08:19:17 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050503231846.35012.qmail@web30009.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > I'm not sure whether your analysis of the problem is correct... Indeed, my original analysis wasn't correct; I think this one is. The fatal error I'm complaining about only arises if the arguments to DateTime.DateTime are invalid, so that the object is deallocated in the onError block of mxDateTime_FromDateAndTime. If the object is created successfully, and later deallocated by Python's garbage collector, the fatal error doesn't arise. Here's my analysis of the problem: --- If the debugging directive Py_TRACE_REFS is enabled, as it is in my case, the Python interpreter maintains a doubly linked list of all Python objects (named refchain) via the _ob_next and _ob_prev pointers added to PyObject via _PyObject_HEAD_EXTRA. Each object is inserted into refchain by the _Py_AddToAllObjects call in _Py_NewReference, and removed from refchain by the _Py_ForgetReference call in _Py_Dealloc. _Py_ForgetReference performs an integrity check on the object being deallocated (op) to make sure that its neighbors in refchain recognize it. Specifically, _Py_ForgetReference verifies that the _ob_next pointer of the previous object in refchain (op->_ob_prev->_ob_next) points to op, and that the _ob_prev pointer of the next object in refchain (op->_ob_next->_ob_prev) points to op. If either of those conditions is false, the interpreter raises the fatal error I'm seeing. After mxDateTime_New pulls an mxDateTimeObject out of the free list, it calls _Py_NewReference on that object to transform it from a "conceptually deallocated" object to a "conceptually allocated" one. _Py_NewReference inserts the object into refchain. Later, when the object is being "conceptually deallocated", it should be removed from refchain with _Py_ForgetReference. The version of _Py_Dealloc that's active when Py_TRACE_REFS is enabled does this (_Py_Dealloc is the element of Py_DECREF that performs the actual destruction). _Py_Dealloc first calls _Py_ForgetReference to remove the object from refchain, then calls the object's destructor (op->ob_type->tp_dealloc). If WANT_SUBCLASSABLE_TYPES is not defined (it is not in my case), the destructor for mxDateTime_Type is mxDateTime_Free. So, if a DateTime object is deallocated normally, as a result of its reference count falling to zero, _Py_Dealloc is called on the object, which first removes it from refchain, then passes it to mxDateTime_Free. If a DateTime object is destroyed prematurely, as a result of invalid arguments to its destructor, the onError handler calls mxDateTime_Free, so the object is "conceptually deallocated" (placed in the free list), *but* the object is not removed from refchain. So if a refchain-membership-integrity-check is performed on the object in question or one of its immediate neighbors in refchain, that integrity check fails, leading to the fatal error. --- The solution is to 'Py_DECREF(...)' the object in the onError handler of its constructor, instead of passing the object directly to mxDateTime_Free. That change solves two problems: 1) It causes _Py_Dealloc to execute, which in turn executes _Py_ForgetReference, so the object is removed from refchain, as it should be. 2) At present, objects that are created successfully and later deallocated by normal reference count mechanics have a reference count of 0 when they enter the free list, whereas objects whose constructors abort their creation due to invalid arguments have a reference count of 1 when they enter the free list. Although AFAIK this doesn't cause an actual execution problem (because the object's reference count is *explicitly set to 1* rather than *incremented by 1* when the object is later "conceptually allocated" by _Py_NewReference), it is likely to confuse future maintainers and thereby lead to the introduction of an actual execution problem. I assume that if you agree that this is a reasonable solution, you'll want to apply the change not only to mxDateTime_FromDateAndTime, but to all similar constructors in mxDateTime.c. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From rj at maxxian.com Thu May 5 01:57:40 2005 From: rj at maxxian.com (RJ Juneau) Date: Mon Feb 13 08:19:17 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c5512e$f72798c0$6505a8c0@rjlaptop> I'm on the 30 day evaluation for mxodbc_zope_da. I'm getting the following error when I submit some queries: Error Type: KeyError Error Value: 'query' I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 with UCS4. The error seems to be caused by multiple rows being returned. I did see an earlier posting with the same error message. The response suggested a template error, but this is clearly not the case here. The additional evidence I've gathered so far: - I'm running the test directly from the ZSQL method, so there's no template involved. - If I use the same query with an additional "where" clause to ensure that only one row is returned, it works - If I use a value in the 'where' clause with no rows returned, it works - The same ZSQL query is being used on a Windows machine running Zope and the free ZODBC module without a problem - The query has been verified directly in mysql-client-browser Other info: - The database is MySQL 4.1.10A-0 - iODBC is the DB driver RJ Juneau -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050505/68d278bf/attachment-0125.htm From mal at egenix.com Thu May 5 12:37:43 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Feb 13 08:19:18 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c5512e$f72798c0$6505a8c0@rjlaptop> References: <000301c5512e$f72798c0$6505a8c0@rjlaptop> Message-ID: <4279E967.6010904@egenix.com> RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 > with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 09:37:42 2005 From: rj at maxxian.com (RJ Juneau) Date: Mon Feb 13 08:19:18 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000101c5516f$3b96de90$6505a8c0@rjlaptop> More interesting info on the problem: If I execute the query directly in the "test" window of the base eGenix mxODBC Database Connection window, it works fine and returns the 20 lines expected. That could point to a problem in the rendering, which seems to be where the traceback ends. Note that within the same Zope system I also have an ODBC connection to a Sybase database, and I have successfully tested multi-line ZSQL queries there. This is the traceback: Time 2005/05/05 07:55:15.294 GMT-4 Exception Type KeyError Exception Value 'query' Traceback (innermost last): Module ZPublisher.Publish, line 101, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 39, in call_object Module Shared.DC.ZRDB.DA, line 337, in manage_test Module DocumentTemplate.DT_String, line 474, in __call__ Module DocumentTemplate.DT_In, line 602, in renderwb Module DocumentTemplate.DT_Var, line 219, in render KeyError: 'query' I don't think the following is an issue, but I'll include it for completeness.I am also getting the following iODBC warnings and errors in the Zope console log, which are related to the ODBC parameters being passed by iODBC. Note that these errors also appear for all of the successful queries. [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (Setup). [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (UsageCount). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Timeout). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Reuse). As for the ZSQL snippet from the template... Since there's no template involved yet (I'm still testing directly from the ZSQL method), I assume you mean the SQL code? select h.host_name, s.system_name, s.system_handle, count(*) from terminal t, system_map s, host h where t.system_index = s.system_index and s.host_index = h.host_index group by s.system_name order by h.host_name Nothing complicated here. There are no parameters passed to the query. RJ -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: May 5, 2005 5:38 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: Re: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is > 2.3.4 with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ---------------------------------------------------------------------- > -- > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 16:00:32 2005 From: charlie at egenix.com (Charlie Clark) Date: Mon Feb 13 08:19:18 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000101c5516f$3b96de90$6505a8c0@rjlaptop> References: <000101c5516f$3b96de90$6505a8c0@rjlaptop> Message-ID: <20050505150032.644.1@bepc.1115296715.fake> On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base eGenix > mxODBC Database Connection window, it works fine and returns the 20 > lines expected. That could point to a problem in the rendering, which > seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection to > a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 10:22:17 2005 From: rj at maxxian.com (RJ Juneau) Date: Mon Feb 13 08:19:18 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505150032.644.1@bepc.1115296715.fake> Message-ID: <000201c55175$75bcad10$6505a8c0@rjlaptop> At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 11:47:14 2005 From: rj at maxxian.com (RJ Juneau) Date: Mon Feb 13 08:19:19 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c55181$549be0e0$6505a8c0@rjlaptop> Charlie, I found a fix. Here it is in case anyone else runs into this. You were correct - the problem is in another part of Zope. Based on your feedback, I did a bit more searching and found something here: http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. html The problem appears to be in Zope versions after 2.7.0. I'm running 2.7.6, and the post indicates that it also happens in 2.7.4. The solution: Edit file /lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. There are two lines in the file that start with . Edit them as follows: Change first line to: Change second line to: Just to be after, I shut down Zope before I made the changes and restarted it after. Thanks for the help! RJ -----Original Message----- From: RJ Juneau [mailto:rj@maxxian.com] Sent: May 5, 2005 9:22 AM To: 'Charlie Clark' Cc: 'egenix-users@lists.egenix.com' Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 17:57:25 2005 From: charlie at egenix.com (Charlie Clark) Date: Mon Feb 13 08:19:19 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <20050505165725.3380.2@bepc.1115296715.fake> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Thu May 5 09:15:21 2005 From: charlie at egenix.com (Charlie Clark) Date: Mon Feb 13 08:19:19 2006 Subject: [Zope-DB] RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <000001c55185$41477730$6b00a8c0@fonacier.local> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________ Zope-DB mailing list Zope-DB@zope.org http://mail.zope.org/mailman/listinfo/zope-db From rj at maxxian.com Thu May 5 12:38:00 2005 From: rj at maxxian.com (RJ Juneau) Date: Mon Feb 13 08:19:19 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000001c55188$6b841eb0$6505a8c0@rjlaptop> I just double-checked. Zope-2.7.6-final. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 12:49:16 2005 From: rj at maxxian.com (RJ Juneau) Date: Mon Feb 13 08:19:19 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000501c55189$fe149ba0$6505a8c0@rjlaptop> Charlie, The fix has only been applied for 2.7.7, 2.8b2. The info is in the original bug report which is closed and can be found here: http://www.zope.org/Collectors/Zope/1745 RJ -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Fri May 6 11:50:09 2005 From: rj at maxxian.com (RJ Juneau) Date: Mon Feb 13 08:19:23 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC Message-ID: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Still on eval for the product. I cannot get a stable connection to Sybase via the iODBC drivers. - The Sybase ODBC connection - including a query - have been verified at the iODBC level. - The setup is already working well for ODBC connection to MySQL. Symptoms include: - If I click on "Open Connection", it still comes back with "Connection Closed" when I go to a ZSQL method - Using 'Connect on Demand' is not working either. - Clicking "Open Connection" gives me the following error: Connection string: DSN=lixbox_sybase; UID=sa; PWD=XXXXXXX Connection pool entry: 0 Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection rejected by data source', 7952) The odbc.ini definition for DSN "lixbox_sybase" is as follows: [lixbox_sybase] JetFix = No NoRowSetSizeLimit = No Description = Test connection to listbox Options = LIXBOX DSQUERY = SQLSERVER TDSHOST = lixbox TDSPORT = 5000 TDSVER = 5.0 SQLSERVER_CATALOG = N CURSOR_SENSITIVITY = LOW UserName = sa Password = XXXXXXXX ServerType = Sybase 10/11/12 Driver = /opt/openlink/lib/sql_mt_lt.so Database = pubs2 ReadOnly = no NoAutoCommit = No NoLoginBox = No FetchBufferSize = 60 Other relevant data: - Connecting via OpenLink's iODBC - Zope 2.7.6-final - Python 2.3.4 - Connection to Sybase has been successfully tested with iODBC, including issuing a query - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC connection RJ Juneau Chief Technology Officer Maxxian Integration Inc. 155 Westhampton Drive Thornhill, Ontario Canada L4J 7X2 E-mail: rj@maxxian.com Phone: +1 905 482 9429 Cell: +1 416 897 6682 Toll free: +1 866 758 9161 Fax: +1 647 722 2038 -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050506/aef33361/attachment-0125.htm From mal at egenix.com Fri May 6 18:27:37 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Feb 13 08:19:23 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC In-Reply-To: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> References: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Message-ID: <427B8CE9.1010601@egenix.com> RJ Juneau wrote: > Still on eval for the product. > > I cannot get a stable connection to Sybase via the iODBC drivers. > > - The Sybase ODBC connection - including a query - have been verified at > the iODBC level. > - The setup is already working well for ODBC connection to MySQL. > > Symptoms include: > > - If I click on "Open Connection", it still comes back with "Connection > Closed" when I go to a ZSQL method > - Using 'Connect on Demand' is not working either. > - Clicking "Open Connection" gives me the following error: > > Connection string: DSN=lixbox_sybase; > UID=sa; > PWD=XXXXXXX Try writing the connection string on one line and without whitespace. ODBC drivers sometimes have problems with this. > Connection pool entry: 0 > Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection > rejected by data source', 7952) This is a generic error that relates to authentication or firewall problems. It is possible that turning on ODBC tracing the ODBC manager will give more clues as to the real cause of the problem. > The odbc.ini definition for DSN "lixbox_sybase" is as follows: > > [lixbox_sybase] > JetFix = No > NoRowSetSizeLimit = No > Description = Test connection to listbox > Options = LIXBOX > DSQUERY = SQLSERVER > TDSHOST = lixbox > TDSPORT = 5000 > TDSVER = 5.0 > SQLSERVER_CATALOG = N > CURSOR_SENSITIVITY = LOW > UserName = sa > Password = XXXXXXXX > ServerType = Sybase 10/11/12 > Driver = /opt/openlink/lib/sql_mt_lt.so > Database = pubs2 > ReadOnly = no > NoAutoCommit = No > NoLoginBox = No > FetchBufferSize = 60 > > > Other relevant data: > - Connecting via OpenLink's iODBC > - Zope 2.7.6-final > - Python 2.3.4 > - Connection to Sybase has been successfully tested with iODBC, > including issuing a query > - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC > connection > > > > RJ Juneau > Chief Technology Officer > Maxxian Integration Inc. > 155 Westhampton Drive > Thornhill, Ontario > Canada L4J 7X2 > E-mail: rj@maxxian.com > Phone: +1 905 482 9429 > Cell: +1 416 897 6682 > Toll free: +1 866 758 9161 > Fax: +1 647 722 2038 > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 06 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From calisp at gmail.com Sun May 15 23:49:03 2005 From: calisp at gmail.com (calisp@gmail.com) Date: Mon Feb 13 08:19:23 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK Message-ID: Hi, I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the following error... 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the last phase of a two-phase commit. This shouldn't happen. Traceback (most recent call last): File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one jar.tpc_finish(self) File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish try: self._finish() File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could not perform COMMIT or ROLLBACK', 1023) What could be causing this? Can I get the mxODBCZopeDA source from somewhere? It would make debugging this much easier. Thanks, Calisp. From mal at egenix.com Mon May 16 13:52:12 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Feb 13 08:19:23 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK In-Reply-To: References: Message-ID: <42887B5C.4010109@egenix.com> calisp@gmail.com wrote: > Hi, > > I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with > unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the > following error... > > 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the > last phase of a two-phase commit. This shouldn't happen. > Traceback (most recent call last): > File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one > jar.tpc_finish(self) > File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish > try: self._finish() > File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish > File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler > ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could > not perform COMMIT or ROLLBACK', 1023) You should have a look at the database logs to see what prevented the commit from being completed. > What could be causing this? Hard to say: mxODBCZopeDA is trying to commit the transaction, but the driver or database failed to complete the request. The above error was generated by the ODBC driver. This could be network or DNS problems, or be related to a bug in FreeTDS (which is getting more stable with every new release, but should still be considered beta quality software at the moment). > Can I get the mxODBCZopeDA source from > somewhere? It would make debugging this much easier. Getting the source is not an option and won't help much either since the source of the problem is not mxODBCZopeDA. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 16 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Sun May 1 21:29:25 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Feb 13 12:03:37 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <427259F3.4090806@egenix.com> References: <20050427130906.52878.qmail@web30008.mail.mud.yahoo.com> <427259F3.4090806@egenix.com> Message-ID: <42752005.7080904@egenix.com> M.-A. Lemburg wrote: > David Rushby wrote: > >> --- "M.-A. Lemburg" wrote: >> >>> Are you using the standard mxDateTime build or one >>> with WANT_SUBCLASSABLE_TYPES defined... >> >> >> >> Presumably "the standard", since I just built with 'py24d setup.py >> build', making no attempt to enable special directives. >> >> >>> ... (mxDateTime_Deallocate is only used by the latter)? >> >> >> >> That's true in 2.1.0-2005-04-15, but not in 2.1.0b5. >> >> >>> In any case, please try our latest snapshot: >>> >>> >> >> http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-04-15.zip >> >>> to see if that makes any difference. >> >> >> >> I can't build it out of the box: > > > Hmm, looks like distutils' sdist command doesn't like our new > repository layout which uses symlinks (after we've switched to > subversion). > > We'll have to debug distutils first, I guess :-( Ok, we've found the problem and fixed it. Here's the new release (which does build out of the box at least on our boxes ;-): http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 01 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From davidrushby at yahoo.com Mon May 2 15:49:53 2005 From: davidrushby at yahoo.com (David Rushby) Date: Mon Feb 13 12:03:37 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Ok, we've found the problem and fixed it. Here's the new > release (which does build out of the box at least on our > boxes ;-): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip It does build now, but: py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" still behaves as it did when I submitted my original message: Fatal Python error: UNREF invalid object Aborted This is the same debug build of Python 2.4.1 that I was previously using, running the same configuration (CentOS Linux 4.0/i386, everything compiled with GCC 3.4.3). Have you examined my original claim as to the cause of the bug? __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 10:21:55 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Feb 13 12:03:37 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> References: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> Message-ID: <42772693.8050306@egenix.com> David Rushby wrote: > --- "M.-A. Lemburg" wrote: > >>Ok, we've found the problem and fixed it. Here's the new >>release (which does build out of the box at least on our >>boxes ;-): >> >> > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip > > It does build now, but: > py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" > still behaves as it did when I submitted my original message: > Fatal Python error: UNREF invalid object > Aborted > > This is the same debug build of Python 2.4.1 that I was previously > using, running the same configuration (CentOS Linux 4.0/i386, > everything compiled with GCC 3.4.3). > > Have you examined my original claim as to the cause of the bug? No. We haven't had time for looking into it. I'm not sure whether your analysis of the problem is correct: if you don't define WANT_SUBCLASSABLE_TYPES, the API mxDateTime_Deallocate() is neither defined nor used. Furthermore, PyObject_Del() is only called by mxDateTime_Free() if you have explicitely edited mxDateTime.c to disabled the free list #defines. In a standard build, PyObject_Del() is only called at module finalization time. Note that the reason we call mxDateTime_Free() in the constructor is that we don't want the destructor of the object to be called. Py_DECREF() would call the destructor (mxDateTime_Deallocate). It is possible that the debug code in Python complains about the refcount in the object not being 0 at the time the object is finalized (module finalization time), but I don't see any such checks in PyObject_Free() (which is what PyObject_Del() maps to). Again, all of this does not happen in regular non-debug Python builds. Please be aware that we don't support debug builds, so fixing the problem (if there is one - gcc has some serious optimization problems on some combinations of platform and version) will take a while. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 09:27:37 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Mon Feb 13 12:03:37 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 Message-ID: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Hi all- I am trying to build the mx-base package, v.2.0.6. This will be used with postgresql 7.3.9, psycopg 1.1.18, and Roundup 0.8.2. RHEL 3.0 Python 2.3 egenix-mx-base-2.0.6.tar.gz I performed a: /usr/local/bin/python2.3 setup.py install Everything looks proper with the exeception of this series of warning statements: ----------------- gcc -pthread -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fno-strict-aliasing -fPIC -Imx/BeeBase/mxBeeBase -I/usr/local/incl ude/python2.3 -I/usr/local/include -c mx/BeeBase/mxBeeBase/btr.c -o build/temp.linux-i686-2.3/mx/BeeBase/mxBeeBase/mxBeeBa se/mx/BeeBase/mxBeeBase/btr.o mx/BeeBase/mxBeeBase/btr.c: In function `dumpBuf': mx/BeeBase/mxBeeBase/btr.c:249: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:250: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:255: warning: unsigned int format, long unsigned int arg (arg 4) mx/BeeBase/mxBeeBase/btr.c:256: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c: In function `_validateTree': mx/BeeBase/mxBeeBase/btr.c:330: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:337: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:339: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:349: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:351: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 3) creating build/lib.linux-i686-2.3/mx/BeeBase creating build/lib.linux-i686-2.3/mx/BeeBase/mxBeeBase -------------- Would someone be kind enough to let me know whether these messages were expected, and if not, how I might resolve these? Thanks! DC __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 22:06:33 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Feb 13 12:03:37 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> References: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Message-ID: <4277CBB9.8020302@egenix.com> Dianne Chen wrote: > Hi all- > > I am trying to build the mx-base package, v.2.0.6. > This will be used with postgresql 7.3.9, psycopg > 1.1.18, and Roundup 0.8.2. > > RHEL 3.0 > Python 2.3 > egenix-mx-base-2.0.6.tar.gz > > I performed a: > > /usr/local/bin/python2.3 setup.py install > > Everything looks proper with the exeception of this > series of warning statements: > > ----------------- > ... > -------------- > > Would someone be kind enough to let me know whether > these messages were expected, and if not, how I might > resolve these? These warning can safely be ignored. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 13:41:14 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Mon Feb 13 12:03:37 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: 6667 Message-ID: <20050503194114.72091.qmail@web31414.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Dianne Chen wrote: > > Hi all- > > > > I am trying to build the mx-base package, v.2.0.6. > > This will be used with postgresql 7.3.9, psycopg > > 1.1.18, and Roundup 0.8.2. > > > > RHEL 3.0 > > Python 2.3 > > egenix-mx-base-2.0.6.tar.gz > > > > I performed a: > > > > /usr/local/bin/python2.3 setup.py install > > > > Everything looks proper with the exeception of > this > > series of warning statements: > > > > ----------------- > > ... > > -------------- > > > > Would someone be kind enough to let me know > whether > > these messages were expected, and if not, how I > might > > resolve these? > > These warning can safely be ignored. > > -- > Marc-Andre Lemburg > eGenix.com > Marc- Thank you very much for the reply. It helps greatly. With kind regards, DC __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From davidrushby at yahoo.com Tue May 3 17:18:46 2005 From: davidrushby at yahoo.com (David Rushby) Date: Mon Feb 13 12:03:37 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050503231846.35012.qmail@web30009.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > I'm not sure whether your analysis of the problem is correct... Indeed, my original analysis wasn't correct; I think this one is. The fatal error I'm complaining about only arises if the arguments to DateTime.DateTime are invalid, so that the object is deallocated in the onError block of mxDateTime_FromDateAndTime. If the object is created successfully, and later deallocated by Python's garbage collector, the fatal error doesn't arise. Here's my analysis of the problem: --- If the debugging directive Py_TRACE_REFS is enabled, as it is in my case, the Python interpreter maintains a doubly linked list of all Python objects (named refchain) via the _ob_next and _ob_prev pointers added to PyObject via _PyObject_HEAD_EXTRA. Each object is inserted into refchain by the _Py_AddToAllObjects call in _Py_NewReference, and removed from refchain by the _Py_ForgetReference call in _Py_Dealloc. _Py_ForgetReference performs an integrity check on the object being deallocated (op) to make sure that its neighbors in refchain recognize it. Specifically, _Py_ForgetReference verifies that the _ob_next pointer of the previous object in refchain (op->_ob_prev->_ob_next) points to op, and that the _ob_prev pointer of the next object in refchain (op->_ob_next->_ob_prev) points to op. If either of those conditions is false, the interpreter raises the fatal error I'm seeing. After mxDateTime_New pulls an mxDateTimeObject out of the free list, it calls _Py_NewReference on that object to transform it from a "conceptually deallocated" object to a "conceptually allocated" one. _Py_NewReference inserts the object into refchain. Later, when the object is being "conceptually deallocated", it should be removed from refchain with _Py_ForgetReference. The version of _Py_Dealloc that's active when Py_TRACE_REFS is enabled does this (_Py_Dealloc is the element of Py_DECREF that performs the actual destruction). _Py_Dealloc first calls _Py_ForgetReference to remove the object from refchain, then calls the object's destructor (op->ob_type->tp_dealloc). If WANT_SUBCLASSABLE_TYPES is not defined (it is not in my case), the destructor for mxDateTime_Type is mxDateTime_Free. So, if a DateTime object is deallocated normally, as a result of its reference count falling to zero, _Py_Dealloc is called on the object, which first removes it from refchain, then passes it to mxDateTime_Free. If a DateTime object is destroyed prematurely, as a result of invalid arguments to its destructor, the onError handler calls mxDateTime_Free, so the object is "conceptually deallocated" (placed in the free list), *but* the object is not removed from refchain. So if a refchain-membership-integrity-check is performed on the object in question or one of its immediate neighbors in refchain, that integrity check fails, leading to the fatal error. --- The solution is to 'Py_DECREF(...)' the object in the onError handler of its constructor, instead of passing the object directly to mxDateTime_Free. That change solves two problems: 1) It causes _Py_Dealloc to execute, which in turn executes _Py_ForgetReference, so the object is removed from refchain, as it should be. 2) At present, objects that are created successfully and later deallocated by normal reference count mechanics have a reference count of 0 when they enter the free list, whereas objects whose constructors abort their creation due to invalid arguments have a reference count of 1 when they enter the free list. Although AFAIK this doesn't cause an actual execution problem (because the object's reference count is *explicitly set to 1* rather than *incremented by 1* when the object is later "conceptually allocated" by _Py_NewReference), it is likely to confuse future maintainers and thereby lead to the introduction of an actual execution problem. I assume that if you agree that this is a reasonable solution, you'll want to apply the change not only to mxDateTime_FromDateAndTime, but to all similar constructors in mxDateTime.c. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From rj at maxxian.com Thu May 5 01:57:40 2005 From: rj at maxxian.com (RJ Juneau) Date: Mon Feb 13 12:03:37 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c5512e$f72798c0$6505a8c0@rjlaptop> I'm on the 30 day evaluation for mxodbc_zope_da. I'm getting the following error when I submit some queries: Error Type: KeyError Error Value: 'query' I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 with UCS4. The error seems to be caused by multiple rows being returned. I did see an earlier posting with the same error message. The response suggested a template error, but this is clearly not the case here. The additional evidence I've gathered so far: - I'm running the test directly from the ZSQL method, so there's no template involved. - If I use the same query with an additional "where" clause to ensure that only one row is returned, it works - If I use a value in the 'where' clause with no rows returned, it works - The same ZSQL query is being used on a Windows machine running Zope and the free ZODBC module without a problem - The query has been verified directly in mysql-client-browser Other info: - The database is MySQL 4.1.10A-0 - iODBC is the DB driver RJ Juneau -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050505/68d278bf/attachment-0126.htm From mal at egenix.com Thu May 5 12:37:43 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Feb 13 12:03:37 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c5512e$f72798c0$6505a8c0@rjlaptop> References: <000301c5512e$f72798c0$6505a8c0@rjlaptop> Message-ID: <4279E967.6010904@egenix.com> RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 > with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 09:37:42 2005 From: rj at maxxian.com (RJ Juneau) Date: Mon Feb 13 12:03:38 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000101c5516f$3b96de90$6505a8c0@rjlaptop> More interesting info on the problem: If I execute the query directly in the "test" window of the base eGenix mxODBC Database Connection window, it works fine and returns the 20 lines expected. That could point to a problem in the rendering, which seems to be where the traceback ends. Note that within the same Zope system I also have an ODBC connection to a Sybase database, and I have successfully tested multi-line ZSQL queries there. This is the traceback: Time 2005/05/05 07:55:15.294 GMT-4 Exception Type KeyError Exception Value 'query' Traceback (innermost last): Module ZPublisher.Publish, line 101, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 39, in call_object Module Shared.DC.ZRDB.DA, line 337, in manage_test Module DocumentTemplate.DT_String, line 474, in __call__ Module DocumentTemplate.DT_In, line 602, in renderwb Module DocumentTemplate.DT_Var, line 219, in render KeyError: 'query' I don't think the following is an issue, but I'll include it for completeness.I am also getting the following iODBC warnings and errors in the Zope console log, which are related to the ODBC parameters being passed by iODBC. Note that these errors also appear for all of the successful queries. [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (Setup). [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (UsageCount). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Timeout). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Reuse). As for the ZSQL snippet from the template... Since there's no template involved yet (I'm still testing directly from the ZSQL method), I assume you mean the SQL code? select h.host_name, s.system_name, s.system_handle, count(*) from terminal t, system_map s, host h where t.system_index = s.system_index and s.host_index = h.host_index group by s.system_name order by h.host_name Nothing complicated here. There are no parameters passed to the query. RJ -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: May 5, 2005 5:38 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: Re: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is > 2.3.4 with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ---------------------------------------------------------------------- > -- > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 16:00:32 2005 From: charlie at egenix.com (Charlie Clark) Date: Mon Feb 13 12:03:38 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000101c5516f$3b96de90$6505a8c0@rjlaptop> References: <000101c5516f$3b96de90$6505a8c0@rjlaptop> Message-ID: <20050505150032.644.1@bepc.1115296715.fake> On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base eGenix > mxODBC Database Connection window, it works fine and returns the 20 > lines expected. That could point to a problem in the rendering, which > seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection to > a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 10:22:17 2005 From: rj at maxxian.com (RJ Juneau) Date: Mon Feb 13 12:03:38 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505150032.644.1@bepc.1115296715.fake> Message-ID: <000201c55175$75bcad10$6505a8c0@rjlaptop> At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 11:47:14 2005 From: rj at maxxian.com (RJ Juneau) Date: Mon Feb 13 12:03:38 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c55181$549be0e0$6505a8c0@rjlaptop> Charlie, I found a fix. Here it is in case anyone else runs into this. You were correct - the problem is in another part of Zope. Based on your feedback, I did a bit more searching and found something here: http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. html The problem appears to be in Zope versions after 2.7.0. I'm running 2.7.6, and the post indicates that it also happens in 2.7.4. The solution: Edit file /lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. There are two lines in the file that start with . Edit them as follows: Change first line to: Change second line to: Just to be after, I shut down Zope before I made the changes and restarted it after. Thanks for the help! RJ -----Original Message----- From: RJ Juneau [mailto:rj@maxxian.com] Sent: May 5, 2005 9:22 AM To: 'Charlie Clark' Cc: 'egenix-users@lists.egenix.com' Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 17:57:25 2005 From: charlie at egenix.com (Charlie Clark) Date: Mon Feb 13 12:03:38 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <20050505165725.3380.2@bepc.1115296715.fake> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Thu May 5 09:15:21 2005 From: charlie at egenix.com (Charlie Clark) Date: Mon Feb 13 12:03:38 2006 Subject: [Zope-DB] RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <000001c55185$41477730$6b00a8c0@fonacier.local> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________ Zope-DB mailing list Zope-DB@zope.org http://mail.zope.org/mailman/listinfo/zope-db From rj at maxxian.com Thu May 5 12:38:00 2005 From: rj at maxxian.com (RJ Juneau) Date: Mon Feb 13 12:03:38 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000001c55188$6b841eb0$6505a8c0@rjlaptop> I just double-checked. Zope-2.7.6-final. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 12:49:16 2005 From: rj at maxxian.com (RJ Juneau) Date: Mon Feb 13 12:03:38 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000501c55189$fe149ba0$6505a8c0@rjlaptop> Charlie, The fix has only been applied for 2.7.7, 2.8b2. The info is in the original bug report which is closed and can be found here: http://www.zope.org/Collectors/Zope/1745 RJ -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Fri May 6 11:50:09 2005 From: rj at maxxian.com (RJ Juneau) Date: Mon Feb 13 12:03:39 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC Message-ID: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Still on eval for the product. I cannot get a stable connection to Sybase via the iODBC drivers. - The Sybase ODBC connection - including a query - have been verified at the iODBC level. - The setup is already working well for ODBC connection to MySQL. Symptoms include: - If I click on "Open Connection", it still comes back with "Connection Closed" when I go to a ZSQL method - Using 'Connect on Demand' is not working either. - Clicking "Open Connection" gives me the following error: Connection string: DSN=lixbox_sybase; UID=sa; PWD=XXXXXXX Connection pool entry: 0 Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection rejected by data source', 7952) The odbc.ini definition for DSN "lixbox_sybase" is as follows: [lixbox_sybase] JetFix = No NoRowSetSizeLimit = No Description = Test connection to listbox Options = LIXBOX DSQUERY = SQLSERVER TDSHOST = lixbox TDSPORT = 5000 TDSVER = 5.0 SQLSERVER_CATALOG = N CURSOR_SENSITIVITY = LOW UserName = sa Password = XXXXXXXX ServerType = Sybase 10/11/12 Driver = /opt/openlink/lib/sql_mt_lt.so Database = pubs2 ReadOnly = no NoAutoCommit = No NoLoginBox = No FetchBufferSize = 60 Other relevant data: - Connecting via OpenLink's iODBC - Zope 2.7.6-final - Python 2.3.4 - Connection to Sybase has been successfully tested with iODBC, including issuing a query - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC connection RJ Juneau Chief Technology Officer Maxxian Integration Inc. 155 Westhampton Drive Thornhill, Ontario Canada L4J 7X2 E-mail: rj@maxxian.com Phone: +1 905 482 9429 Cell: +1 416 897 6682 Toll free: +1 866 758 9161 Fax: +1 647 722 2038 -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050506/aef33361/attachment-0126.htm From mal at egenix.com Fri May 6 18:27:37 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Feb 13 12:03:39 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC In-Reply-To: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> References: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Message-ID: <427B8CE9.1010601@egenix.com> RJ Juneau wrote: > Still on eval for the product. > > I cannot get a stable connection to Sybase via the iODBC drivers. > > - The Sybase ODBC connection - including a query - have been verified at > the iODBC level. > - The setup is already working well for ODBC connection to MySQL. > > Symptoms include: > > - If I click on "Open Connection", it still comes back with "Connection > Closed" when I go to a ZSQL method > - Using 'Connect on Demand' is not working either. > - Clicking "Open Connection" gives me the following error: > > Connection string: DSN=lixbox_sybase; > UID=sa; > PWD=XXXXXXX Try writing the connection string on one line and without whitespace. ODBC drivers sometimes have problems with this. > Connection pool entry: 0 > Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection > rejected by data source', 7952) This is a generic error that relates to authentication or firewall problems. It is possible that turning on ODBC tracing the ODBC manager will give more clues as to the real cause of the problem. > The odbc.ini definition for DSN "lixbox_sybase" is as follows: > > [lixbox_sybase] > JetFix = No > NoRowSetSizeLimit = No > Description = Test connection to listbox > Options = LIXBOX > DSQUERY = SQLSERVER > TDSHOST = lixbox > TDSPORT = 5000 > TDSVER = 5.0 > SQLSERVER_CATALOG = N > CURSOR_SENSITIVITY = LOW > UserName = sa > Password = XXXXXXXX > ServerType = Sybase 10/11/12 > Driver = /opt/openlink/lib/sql_mt_lt.so > Database = pubs2 > ReadOnly = no > NoAutoCommit = No > NoLoginBox = No > FetchBufferSize = 60 > > > Other relevant data: > - Connecting via OpenLink's iODBC > - Zope 2.7.6-final > - Python 2.3.4 > - Connection to Sybase has been successfully tested with iODBC, > including issuing a query > - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC > connection > > > > RJ Juneau > Chief Technology Officer > Maxxian Integration Inc. > 155 Westhampton Drive > Thornhill, Ontario > Canada L4J 7X2 > E-mail: rj@maxxian.com > Phone: +1 905 482 9429 > Cell: +1 416 897 6682 > Toll free: +1 866 758 9161 > Fax: +1 647 722 2038 > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 06 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From calisp at gmail.com Sun May 15 23:49:03 2005 From: calisp at gmail.com (calisp@gmail.com) Date: Mon Feb 13 12:03:39 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK Message-ID: Hi, I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the following error... 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the last phase of a two-phase commit. This shouldn't happen. Traceback (most recent call last): File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one jar.tpc_finish(self) File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish try: self._finish() File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could not perform COMMIT or ROLLBACK', 1023) What could be causing this? Can I get the mxODBCZopeDA source from somewhere? It would make debugging this much easier. Thanks, Calisp. From mal at egenix.com Mon May 16 13:52:12 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Feb 13 12:03:39 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK In-Reply-To: References: Message-ID: <42887B5C.4010109@egenix.com> calisp@gmail.com wrote: > Hi, > > I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with > unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the > following error... > > 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the > last phase of a two-phase commit. This shouldn't happen. > Traceback (most recent call last): > File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one > jar.tpc_finish(self) > File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish > try: self._finish() > File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish > File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler > ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could > not perform COMMIT or ROLLBACK', 1023) You should have a look at the database logs to see what prevented the commit from being completed. > What could be causing this? Hard to say: mxODBCZopeDA is trying to commit the transaction, but the driver or database failed to complete the request. The above error was generated by the ODBC driver. This could be network or DNS problems, or be related to a bug in FreeTDS (which is getting more stable with every new release, but should still be considered beta quality software at the moment). > Can I get the mxODBCZopeDA source from > somewhere? It would make debugging this much easier. Getting the source is not an option and won't help much either since the source of the problem is not mxODBCZopeDA. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 16 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Sun May 1 21:29:25 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Feb 13 16:01:41 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <427259F3.4090806@egenix.com> References: <20050427130906.52878.qmail@web30008.mail.mud.yahoo.com> <427259F3.4090806@egenix.com> Message-ID: <42752005.7080904@egenix.com> M.-A. Lemburg wrote: > David Rushby wrote: > >> --- "M.-A. Lemburg" wrote: >> >>> Are you using the standard mxDateTime build or one >>> with WANT_SUBCLASSABLE_TYPES defined... >> >> >> >> Presumably "the standard", since I just built with 'py24d setup.py >> build', making no attempt to enable special directives. >> >> >>> ... (mxDateTime_Deallocate is only used by the latter)? >> >> >> >> That's true in 2.1.0-2005-04-15, but not in 2.1.0b5. >> >> >>> In any case, please try our latest snapshot: >>> >>> >> >> http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-04-15.zip >> >>> to see if that makes any difference. >> >> >> >> I can't build it out of the box: > > > Hmm, looks like distutils' sdist command doesn't like our new > repository layout which uses symlinks (after we've switched to > subversion). > > We'll have to debug distutils first, I guess :-( Ok, we've found the problem and fixed it. Here's the new release (which does build out of the box at least on our boxes ;-): http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 01 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From davidrushby at yahoo.com Mon May 2 15:49:53 2005 From: davidrushby at yahoo.com (David Rushby) Date: Mon Feb 13 16:01:41 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Ok, we've found the problem and fixed it. Here's the new > release (which does build out of the box at least on our > boxes ;-): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip It does build now, but: py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" still behaves as it did when I submitted my original message: Fatal Python error: UNREF invalid object Aborted This is the same debug build of Python 2.4.1 that I was previously using, running the same configuration (CentOS Linux 4.0/i386, everything compiled with GCC 3.4.3). Have you examined my original claim as to the cause of the bug? __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 10:21:55 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Feb 13 16:01:41 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> References: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> Message-ID: <42772693.8050306@egenix.com> David Rushby wrote: > --- "M.-A. Lemburg" wrote: > >>Ok, we've found the problem and fixed it. Here's the new >>release (which does build out of the box at least on our >>boxes ;-): >> >> > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip > > It does build now, but: > py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" > still behaves as it did when I submitted my original message: > Fatal Python error: UNREF invalid object > Aborted > > This is the same debug build of Python 2.4.1 that I was previously > using, running the same configuration (CentOS Linux 4.0/i386, > everything compiled with GCC 3.4.3). > > Have you examined my original claim as to the cause of the bug? No. We haven't had time for looking into it. I'm not sure whether your analysis of the problem is correct: if you don't define WANT_SUBCLASSABLE_TYPES, the API mxDateTime_Deallocate() is neither defined nor used. Furthermore, PyObject_Del() is only called by mxDateTime_Free() if you have explicitely edited mxDateTime.c to disabled the free list #defines. In a standard build, PyObject_Del() is only called at module finalization time. Note that the reason we call mxDateTime_Free() in the constructor is that we don't want the destructor of the object to be called. Py_DECREF() would call the destructor (mxDateTime_Deallocate). It is possible that the debug code in Python complains about the refcount in the object not being 0 at the time the object is finalized (module finalization time), but I don't see any such checks in PyObject_Free() (which is what PyObject_Del() maps to). Again, all of this does not happen in regular non-debug Python builds. Please be aware that we don't support debug builds, so fixing the problem (if there is one - gcc has some serious optimization problems on some combinations of platform and version) will take a while. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 09:27:37 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Mon Feb 13 16:01:41 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 Message-ID: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Hi all- I am trying to build the mx-base package, v.2.0.6. This will be used with postgresql 7.3.9, psycopg 1.1.18, and Roundup 0.8.2. RHEL 3.0 Python 2.3 egenix-mx-base-2.0.6.tar.gz I performed a: /usr/local/bin/python2.3 setup.py install Everything looks proper with the exeception of this series of warning statements: ----------------- gcc -pthread -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fno-strict-aliasing -fPIC -Imx/BeeBase/mxBeeBase -I/usr/local/incl ude/python2.3 -I/usr/local/include -c mx/BeeBase/mxBeeBase/btr.c -o build/temp.linux-i686-2.3/mx/BeeBase/mxBeeBase/mxBeeBa se/mx/BeeBase/mxBeeBase/btr.o mx/BeeBase/mxBeeBase/btr.c: In function `dumpBuf': mx/BeeBase/mxBeeBase/btr.c:249: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:250: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:255: warning: unsigned int format, long unsigned int arg (arg 4) mx/BeeBase/mxBeeBase/btr.c:256: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c: In function `_validateTree': mx/BeeBase/mxBeeBase/btr.c:330: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:337: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:339: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:349: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:351: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 3) creating build/lib.linux-i686-2.3/mx/BeeBase creating build/lib.linux-i686-2.3/mx/BeeBase/mxBeeBase -------------- Would someone be kind enough to let me know whether these messages were expected, and if not, how I might resolve these? Thanks! DC __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 22:06:33 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Feb 13 16:01:41 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> References: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Message-ID: <4277CBB9.8020302@egenix.com> Dianne Chen wrote: > Hi all- > > I am trying to build the mx-base package, v.2.0.6. > This will be used with postgresql 7.3.9, psycopg > 1.1.18, and Roundup 0.8.2. > > RHEL 3.0 > Python 2.3 > egenix-mx-base-2.0.6.tar.gz > > I performed a: > > /usr/local/bin/python2.3 setup.py install > > Everything looks proper with the exeception of this > series of warning statements: > > ----------------- > ... > -------------- > > Would someone be kind enough to let me know whether > these messages were expected, and if not, how I might > resolve these? These warning can safely be ignored. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 13:41:14 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Mon Feb 13 16:01:41 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: 6667 Message-ID: <20050503194114.72091.qmail@web31414.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Dianne Chen wrote: > > Hi all- > > > > I am trying to build the mx-base package, v.2.0.6. > > This will be used with postgresql 7.3.9, psycopg > > 1.1.18, and Roundup 0.8.2. > > > > RHEL 3.0 > > Python 2.3 > > egenix-mx-base-2.0.6.tar.gz > > > > I performed a: > > > > /usr/local/bin/python2.3 setup.py install > > > > Everything looks proper with the exeception of > this > > series of warning statements: > > > > ----------------- > > ... > > -------------- > > > > Would someone be kind enough to let me know > whether > > these messages were expected, and if not, how I > might > > resolve these? > > These warning can safely be ignored. > > -- > Marc-Andre Lemburg > eGenix.com > Marc- Thank you very much for the reply. It helps greatly. With kind regards, DC __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From davidrushby at yahoo.com Tue May 3 17:18:46 2005 From: davidrushby at yahoo.com (David Rushby) Date: Mon Feb 13 16:01:41 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050503231846.35012.qmail@web30009.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > I'm not sure whether your analysis of the problem is correct... Indeed, my original analysis wasn't correct; I think this one is. The fatal error I'm complaining about only arises if the arguments to DateTime.DateTime are invalid, so that the object is deallocated in the onError block of mxDateTime_FromDateAndTime. If the object is created successfully, and later deallocated by Python's garbage collector, the fatal error doesn't arise. Here's my analysis of the problem: --- If the debugging directive Py_TRACE_REFS is enabled, as it is in my case, the Python interpreter maintains a doubly linked list of all Python objects (named refchain) via the _ob_next and _ob_prev pointers added to PyObject via _PyObject_HEAD_EXTRA. Each object is inserted into refchain by the _Py_AddToAllObjects call in _Py_NewReference, and removed from refchain by the _Py_ForgetReference call in _Py_Dealloc. _Py_ForgetReference performs an integrity check on the object being deallocated (op) to make sure that its neighbors in refchain recognize it. Specifically, _Py_ForgetReference verifies that the _ob_next pointer of the previous object in refchain (op->_ob_prev->_ob_next) points to op, and that the _ob_prev pointer of the next object in refchain (op->_ob_next->_ob_prev) points to op. If either of those conditions is false, the interpreter raises the fatal error I'm seeing. After mxDateTime_New pulls an mxDateTimeObject out of the free list, it calls _Py_NewReference on that object to transform it from a "conceptually deallocated" object to a "conceptually allocated" one. _Py_NewReference inserts the object into refchain. Later, when the object is being "conceptually deallocated", it should be removed from refchain with _Py_ForgetReference. The version of _Py_Dealloc that's active when Py_TRACE_REFS is enabled does this (_Py_Dealloc is the element of Py_DECREF that performs the actual destruction). _Py_Dealloc first calls _Py_ForgetReference to remove the object from refchain, then calls the object's destructor (op->ob_type->tp_dealloc). If WANT_SUBCLASSABLE_TYPES is not defined (it is not in my case), the destructor for mxDateTime_Type is mxDateTime_Free. So, if a DateTime object is deallocated normally, as a result of its reference count falling to zero, _Py_Dealloc is called on the object, which first removes it from refchain, then passes it to mxDateTime_Free. If a DateTime object is destroyed prematurely, as a result of invalid arguments to its destructor, the onError handler calls mxDateTime_Free, so the object is "conceptually deallocated" (placed in the free list), *but* the object is not removed from refchain. So if a refchain-membership-integrity-check is performed on the object in question or one of its immediate neighbors in refchain, that integrity check fails, leading to the fatal error. --- The solution is to 'Py_DECREF(...)' the object in the onError handler of its constructor, instead of passing the object directly to mxDateTime_Free. That change solves two problems: 1) It causes _Py_Dealloc to execute, which in turn executes _Py_ForgetReference, so the object is removed from refchain, as it should be. 2) At present, objects that are created successfully and later deallocated by normal reference count mechanics have a reference count of 0 when they enter the free list, whereas objects whose constructors abort their creation due to invalid arguments have a reference count of 1 when they enter the free list. Although AFAIK this doesn't cause an actual execution problem (because the object's reference count is *explicitly set to 1* rather than *incremented by 1* when the object is later "conceptually allocated" by _Py_NewReference), it is likely to confuse future maintainers and thereby lead to the introduction of an actual execution problem. I assume that if you agree that this is a reasonable solution, you'll want to apply the change not only to mxDateTime_FromDateAndTime, but to all similar constructors in mxDateTime.c. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From rj at maxxian.com Thu May 5 01:57:40 2005 From: rj at maxxian.com (RJ Juneau) Date: Mon Feb 13 16:01:41 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c5512e$f72798c0$6505a8c0@rjlaptop> I'm on the 30 day evaluation for mxodbc_zope_da. I'm getting the following error when I submit some queries: Error Type: KeyError Error Value: 'query' I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 with UCS4. The error seems to be caused by multiple rows being returned. I did see an earlier posting with the same error message. The response suggested a template error, but this is clearly not the case here. The additional evidence I've gathered so far: - I'm running the test directly from the ZSQL method, so there's no template involved. - If I use the same query with an additional "where" clause to ensure that only one row is returned, it works - If I use a value in the 'where' clause with no rows returned, it works - The same ZSQL query is being used on a Windows machine running Zope and the free ZODBC module without a problem - The query has been verified directly in mysql-client-browser Other info: - The database is MySQL 4.1.10A-0 - iODBC is the DB driver RJ Juneau -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050505/68d278bf/attachment-0127.htm From mal at egenix.com Thu May 5 12:37:43 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Feb 13 16:01:41 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c5512e$f72798c0$6505a8c0@rjlaptop> References: <000301c5512e$f72798c0$6505a8c0@rjlaptop> Message-ID: <4279E967.6010904@egenix.com> RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 > with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 09:37:42 2005 From: rj at maxxian.com (RJ Juneau) Date: Mon Feb 13 16:01:41 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000101c5516f$3b96de90$6505a8c0@rjlaptop> More interesting info on the problem: If I execute the query directly in the "test" window of the base eGenix mxODBC Database Connection window, it works fine and returns the 20 lines expected. That could point to a problem in the rendering, which seems to be where the traceback ends. Note that within the same Zope system I also have an ODBC connection to a Sybase database, and I have successfully tested multi-line ZSQL queries there. This is the traceback: Time 2005/05/05 07:55:15.294 GMT-4 Exception Type KeyError Exception Value 'query' Traceback (innermost last): Module ZPublisher.Publish, line 101, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 39, in call_object Module Shared.DC.ZRDB.DA, line 337, in manage_test Module DocumentTemplate.DT_String, line 474, in __call__ Module DocumentTemplate.DT_In, line 602, in renderwb Module DocumentTemplate.DT_Var, line 219, in render KeyError: 'query' I don't think the following is an issue, but I'll include it for completeness.I am also getting the following iODBC warnings and errors in the Zope console log, which are related to the ODBC parameters being passed by iODBC. Note that these errors also appear for all of the successful queries. [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (Setup). [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (UsageCount). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Timeout). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Reuse). As for the ZSQL snippet from the template... Since there's no template involved yet (I'm still testing directly from the ZSQL method), I assume you mean the SQL code? select h.host_name, s.system_name, s.system_handle, count(*) from terminal t, system_map s, host h where t.system_index = s.system_index and s.host_index = h.host_index group by s.system_name order by h.host_name Nothing complicated here. There are no parameters passed to the query. RJ -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: May 5, 2005 5:38 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: Re: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is > 2.3.4 with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ---------------------------------------------------------------------- > -- > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 16:00:32 2005 From: charlie at egenix.com (Charlie Clark) Date: Mon Feb 13 16:01:41 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000101c5516f$3b96de90$6505a8c0@rjlaptop> References: <000101c5516f$3b96de90$6505a8c0@rjlaptop> Message-ID: <20050505150032.644.1@bepc.1115296715.fake> On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base eGenix > mxODBC Database Connection window, it works fine and returns the 20 > lines expected. That could point to a problem in the rendering, which > seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection to > a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 10:22:17 2005 From: rj at maxxian.com (RJ Juneau) Date: Mon Feb 13 16:01:41 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505150032.644.1@bepc.1115296715.fake> Message-ID: <000201c55175$75bcad10$6505a8c0@rjlaptop> At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 11:47:14 2005 From: rj at maxxian.com (RJ Juneau) Date: Mon Feb 13 16:01:41 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c55181$549be0e0$6505a8c0@rjlaptop> Charlie, I found a fix. Here it is in case anyone else runs into this. You were correct - the problem is in another part of Zope. Based on your feedback, I did a bit more searching and found something here: http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. html The problem appears to be in Zope versions after 2.7.0. I'm running 2.7.6, and the post indicates that it also happens in 2.7.4. The solution: Edit file /lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. There are two lines in the file that start with . Edit them as follows: Change first line to: Change second line to: Just to be after, I shut down Zope before I made the changes and restarted it after. Thanks for the help! RJ -----Original Message----- From: RJ Juneau [mailto:rj@maxxian.com] Sent: May 5, 2005 9:22 AM To: 'Charlie Clark' Cc: 'egenix-users@lists.egenix.com' Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 17:57:25 2005 From: charlie at egenix.com (Charlie Clark) Date: Mon Feb 13 16:01:41 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <20050505165725.3380.2@bepc.1115296715.fake> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Thu May 5 09:15:21 2005 From: charlie at egenix.com (Charlie Clark) Date: Mon Feb 13 16:01:41 2006 Subject: [Zope-DB] RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <000001c55185$41477730$6b00a8c0@fonacier.local> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________ Zope-DB mailing list Zope-DB@zope.org http://mail.zope.org/mailman/listinfo/zope-db From rj at maxxian.com Thu May 5 12:38:00 2005 From: rj at maxxian.com (RJ Juneau) Date: Mon Feb 13 16:01:42 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000001c55188$6b841eb0$6505a8c0@rjlaptop> I just double-checked. Zope-2.7.6-final. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 12:49:16 2005 From: rj at maxxian.com (RJ Juneau) Date: Mon Feb 13 16:01:42 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000501c55189$fe149ba0$6505a8c0@rjlaptop> Charlie, The fix has only been applied for 2.7.7, 2.8b2. The info is in the original bug report which is closed and can be found here: http://www.zope.org/Collectors/Zope/1745 RJ -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Fri May 6 11:50:09 2005 From: rj at maxxian.com (RJ Juneau) Date: Mon Feb 13 16:01:43 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC Message-ID: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Still on eval for the product. I cannot get a stable connection to Sybase via the iODBC drivers. - The Sybase ODBC connection - including a query - have been verified at the iODBC level. - The setup is already working well for ODBC connection to MySQL. Symptoms include: - If I click on "Open Connection", it still comes back with "Connection Closed" when I go to a ZSQL method - Using 'Connect on Demand' is not working either. - Clicking "Open Connection" gives me the following error: Connection string: DSN=lixbox_sybase; UID=sa; PWD=XXXXXXX Connection pool entry: 0 Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection rejected by data source', 7952) The odbc.ini definition for DSN "lixbox_sybase" is as follows: [lixbox_sybase] JetFix = No NoRowSetSizeLimit = No Description = Test connection to listbox Options = LIXBOX DSQUERY = SQLSERVER TDSHOST = lixbox TDSPORT = 5000 TDSVER = 5.0 SQLSERVER_CATALOG = N CURSOR_SENSITIVITY = LOW UserName = sa Password = XXXXXXXX ServerType = Sybase 10/11/12 Driver = /opt/openlink/lib/sql_mt_lt.so Database = pubs2 ReadOnly = no NoAutoCommit = No NoLoginBox = No FetchBufferSize = 60 Other relevant data: - Connecting via OpenLink's iODBC - Zope 2.7.6-final - Python 2.3.4 - Connection to Sybase has been successfully tested with iODBC, including issuing a query - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC connection RJ Juneau Chief Technology Officer Maxxian Integration Inc. 155 Westhampton Drive Thornhill, Ontario Canada L4J 7X2 E-mail: rj@maxxian.com Phone: +1 905 482 9429 Cell: +1 416 897 6682 Toll free: +1 866 758 9161 Fax: +1 647 722 2038 -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050506/aef33361/attachment-0127.htm From mal at egenix.com Fri May 6 18:27:37 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Feb 13 16:01:43 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC In-Reply-To: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> References: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Message-ID: <427B8CE9.1010601@egenix.com> RJ Juneau wrote: > Still on eval for the product. > > I cannot get a stable connection to Sybase via the iODBC drivers. > > - The Sybase ODBC connection - including a query - have been verified at > the iODBC level. > - The setup is already working well for ODBC connection to MySQL. > > Symptoms include: > > - If I click on "Open Connection", it still comes back with "Connection > Closed" when I go to a ZSQL method > - Using 'Connect on Demand' is not working either. > - Clicking "Open Connection" gives me the following error: > > Connection string: DSN=lixbox_sybase; > UID=sa; > PWD=XXXXXXX Try writing the connection string on one line and without whitespace. ODBC drivers sometimes have problems with this. > Connection pool entry: 0 > Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection > rejected by data source', 7952) This is a generic error that relates to authentication or firewall problems. It is possible that turning on ODBC tracing the ODBC manager will give more clues as to the real cause of the problem. > The odbc.ini definition for DSN "lixbox_sybase" is as follows: > > [lixbox_sybase] > JetFix = No > NoRowSetSizeLimit = No > Description = Test connection to listbox > Options = LIXBOX > DSQUERY = SQLSERVER > TDSHOST = lixbox > TDSPORT = 5000 > TDSVER = 5.0 > SQLSERVER_CATALOG = N > CURSOR_SENSITIVITY = LOW > UserName = sa > Password = XXXXXXXX > ServerType = Sybase 10/11/12 > Driver = /opt/openlink/lib/sql_mt_lt.so > Database = pubs2 > ReadOnly = no > NoAutoCommit = No > NoLoginBox = No > FetchBufferSize = 60 > > > Other relevant data: > - Connecting via OpenLink's iODBC > - Zope 2.7.6-final > - Python 2.3.4 > - Connection to Sybase has been successfully tested with iODBC, > including issuing a query > - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC > connection > > > > RJ Juneau > Chief Technology Officer > Maxxian Integration Inc. > 155 Westhampton Drive > Thornhill, Ontario > Canada L4J 7X2 > E-mail: rj@maxxian.com > Phone: +1 905 482 9429 > Cell: +1 416 897 6682 > Toll free: +1 866 758 9161 > Fax: +1 647 722 2038 > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 06 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From calisp at gmail.com Sun May 15 23:49:03 2005 From: calisp at gmail.com (calisp@gmail.com) Date: Mon Feb 13 16:01:43 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK Message-ID: Hi, I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the following error... 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the last phase of a two-phase commit. This shouldn't happen. Traceback (most recent call last): File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one jar.tpc_finish(self) File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish try: self._finish() File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could not perform COMMIT or ROLLBACK', 1023) What could be causing this? Can I get the mxODBCZopeDA source from somewhere? It would make debugging this much easier. Thanks, Calisp. From mal at egenix.com Mon May 16 13:52:12 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Feb 13 16:01:43 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK In-Reply-To: References: Message-ID: <42887B5C.4010109@egenix.com> calisp@gmail.com wrote: > Hi, > > I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with > unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the > following error... > > 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the > last phase of a two-phase commit. This shouldn't happen. > Traceback (most recent call last): > File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one > jar.tpc_finish(self) > File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish > try: self._finish() > File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish > File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler > ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could > not perform COMMIT or ROLLBACK', 1023) You should have a look at the database logs to see what prevented the commit from being completed. > What could be causing this? Hard to say: mxODBCZopeDA is trying to commit the transaction, but the driver or database failed to complete the request. The above error was generated by the ODBC driver. This could be network or DNS problems, or be related to a bug in FreeTDS (which is getting more stable with every new release, but should still be considered beta quality software at the moment). > Can I get the mxODBCZopeDA source from > somewhere? It would make debugging this much easier. Getting the source is not an option and won't help much either since the source of the problem is not mxODBCZopeDA. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 16 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Sun May 1 21:29:25 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Feb 13 20:01:23 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <427259F3.4090806@egenix.com> References: <20050427130906.52878.qmail@web30008.mail.mud.yahoo.com> <427259F3.4090806@egenix.com> Message-ID: <42752005.7080904@egenix.com> M.-A. Lemburg wrote: > David Rushby wrote: > >> --- "M.-A. Lemburg" wrote: >> >>> Are you using the standard mxDateTime build or one >>> with WANT_SUBCLASSABLE_TYPES defined... >> >> >> >> Presumably "the standard", since I just built with 'py24d setup.py >> build', making no attempt to enable special directives. >> >> >>> ... (mxDateTime_Deallocate is only used by the latter)? >> >> >> >> That's true in 2.1.0-2005-04-15, but not in 2.1.0b5. >> >> >>> In any case, please try our latest snapshot: >>> >>> >> >> http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-04-15.zip >> >>> to see if that makes any difference. >> >> >> >> I can't build it out of the box: > > > Hmm, looks like distutils' sdist command doesn't like our new > repository layout which uses symlinks (after we've switched to > subversion). > > We'll have to debug distutils first, I guess :-( Ok, we've found the problem and fixed it. Here's the new release (which does build out of the box at least on our boxes ;-): http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 01 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From davidrushby at yahoo.com Mon May 2 15:49:53 2005 From: davidrushby at yahoo.com (David Rushby) Date: Mon Feb 13 20:01:23 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Ok, we've found the problem and fixed it. Here's the new > release (which does build out of the box at least on our > boxes ;-): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip It does build now, but: py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" still behaves as it did when I submitted my original message: Fatal Python error: UNREF invalid object Aborted This is the same debug build of Python 2.4.1 that I was previously using, running the same configuration (CentOS Linux 4.0/i386, everything compiled with GCC 3.4.3). Have you examined my original claim as to the cause of the bug? __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 10:21:55 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Feb 13 20:01:23 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> References: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> Message-ID: <42772693.8050306@egenix.com> David Rushby wrote: > --- "M.-A. Lemburg" wrote: > >>Ok, we've found the problem and fixed it. Here's the new >>release (which does build out of the box at least on our >>boxes ;-): >> >> > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip > > It does build now, but: > py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" > still behaves as it did when I submitted my original message: > Fatal Python error: UNREF invalid object > Aborted > > This is the same debug build of Python 2.4.1 that I was previously > using, running the same configuration (CentOS Linux 4.0/i386, > everything compiled with GCC 3.4.3). > > Have you examined my original claim as to the cause of the bug? No. We haven't had time for looking into it. I'm not sure whether your analysis of the problem is correct: if you don't define WANT_SUBCLASSABLE_TYPES, the API mxDateTime_Deallocate() is neither defined nor used. Furthermore, PyObject_Del() is only called by mxDateTime_Free() if you have explicitely edited mxDateTime.c to disabled the free list #defines. In a standard build, PyObject_Del() is only called at module finalization time. Note that the reason we call mxDateTime_Free() in the constructor is that we don't want the destructor of the object to be called. Py_DECREF() would call the destructor (mxDateTime_Deallocate). It is possible that the debug code in Python complains about the refcount in the object not being 0 at the time the object is finalized (module finalization time), but I don't see any such checks in PyObject_Free() (which is what PyObject_Del() maps to). Again, all of this does not happen in regular non-debug Python builds. Please be aware that we don't support debug builds, so fixing the problem (if there is one - gcc has some serious optimization problems on some combinations of platform and version) will take a while. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 09:27:37 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Mon Feb 13 20:01:23 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 Message-ID: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Hi all- I am trying to build the mx-base package, v.2.0.6. This will be used with postgresql 7.3.9, psycopg 1.1.18, and Roundup 0.8.2. RHEL 3.0 Python 2.3 egenix-mx-base-2.0.6.tar.gz I performed a: /usr/local/bin/python2.3 setup.py install Everything looks proper with the exeception of this series of warning statements: ----------------- gcc -pthread -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fno-strict-aliasing -fPIC -Imx/BeeBase/mxBeeBase -I/usr/local/incl ude/python2.3 -I/usr/local/include -c mx/BeeBase/mxBeeBase/btr.c -o build/temp.linux-i686-2.3/mx/BeeBase/mxBeeBase/mxBeeBa se/mx/BeeBase/mxBeeBase/btr.o mx/BeeBase/mxBeeBase/btr.c: In function `dumpBuf': mx/BeeBase/mxBeeBase/btr.c:249: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:250: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:255: warning: unsigned int format, long unsigned int arg (arg 4) mx/BeeBase/mxBeeBase/btr.c:256: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c: In function `_validateTree': mx/BeeBase/mxBeeBase/btr.c:330: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:337: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:339: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:349: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:351: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 3) creating build/lib.linux-i686-2.3/mx/BeeBase creating build/lib.linux-i686-2.3/mx/BeeBase/mxBeeBase -------------- Would someone be kind enough to let me know whether these messages were expected, and if not, how I might resolve these? Thanks! DC __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 22:06:33 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Feb 13 20:01:23 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> References: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Message-ID: <4277CBB9.8020302@egenix.com> Dianne Chen wrote: > Hi all- > > I am trying to build the mx-base package, v.2.0.6. > This will be used with postgresql 7.3.9, psycopg > 1.1.18, and Roundup 0.8.2. > > RHEL 3.0 > Python 2.3 > egenix-mx-base-2.0.6.tar.gz > > I performed a: > > /usr/local/bin/python2.3 setup.py install > > Everything looks proper with the exeception of this > series of warning statements: > > ----------------- > ... > -------------- > > Would someone be kind enough to let me know whether > these messages were expected, and if not, how I might > resolve these? These warning can safely be ignored. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 13:41:14 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Mon Feb 13 20:01:23 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: 6667 Message-ID: <20050503194114.72091.qmail@web31414.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Dianne Chen wrote: > > Hi all- > > > > I am trying to build the mx-base package, v.2.0.6. > > This will be used with postgresql 7.3.9, psycopg > > 1.1.18, and Roundup 0.8.2. > > > > RHEL 3.0 > > Python 2.3 > > egenix-mx-base-2.0.6.tar.gz > > > > I performed a: > > > > /usr/local/bin/python2.3 setup.py install > > > > Everything looks proper with the exeception of > this > > series of warning statements: > > > > ----------------- > > ... > > -------------- > > > > Would someone be kind enough to let me know > whether > > these messages were expected, and if not, how I > might > > resolve these? > > These warning can safely be ignored. > > -- > Marc-Andre Lemburg > eGenix.com > Marc- Thank you very much for the reply. It helps greatly. With kind regards, DC __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From davidrushby at yahoo.com Tue May 3 17:18:46 2005 From: davidrushby at yahoo.com (David Rushby) Date: Mon Feb 13 20:01:23 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050503231846.35012.qmail@web30009.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > I'm not sure whether your analysis of the problem is correct... Indeed, my original analysis wasn't correct; I think this one is. The fatal error I'm complaining about only arises if the arguments to DateTime.DateTime are invalid, so that the object is deallocated in the onError block of mxDateTime_FromDateAndTime. If the object is created successfully, and later deallocated by Python's garbage collector, the fatal error doesn't arise. Here's my analysis of the problem: --- If the debugging directive Py_TRACE_REFS is enabled, as it is in my case, the Python interpreter maintains a doubly linked list of all Python objects (named refchain) via the _ob_next and _ob_prev pointers added to PyObject via _PyObject_HEAD_EXTRA. Each object is inserted into refchain by the _Py_AddToAllObjects call in _Py_NewReference, and removed from refchain by the _Py_ForgetReference call in _Py_Dealloc. _Py_ForgetReference performs an integrity check on the object being deallocated (op) to make sure that its neighbors in refchain recognize it. Specifically, _Py_ForgetReference verifies that the _ob_next pointer of the previous object in refchain (op->_ob_prev->_ob_next) points to op, and that the _ob_prev pointer of the next object in refchain (op->_ob_next->_ob_prev) points to op. If either of those conditions is false, the interpreter raises the fatal error I'm seeing. After mxDateTime_New pulls an mxDateTimeObject out of the free list, it calls _Py_NewReference on that object to transform it from a "conceptually deallocated" object to a "conceptually allocated" one. _Py_NewReference inserts the object into refchain. Later, when the object is being "conceptually deallocated", it should be removed from refchain with _Py_ForgetReference. The version of _Py_Dealloc that's active when Py_TRACE_REFS is enabled does this (_Py_Dealloc is the element of Py_DECREF that performs the actual destruction). _Py_Dealloc first calls _Py_ForgetReference to remove the object from refchain, then calls the object's destructor (op->ob_type->tp_dealloc). If WANT_SUBCLASSABLE_TYPES is not defined (it is not in my case), the destructor for mxDateTime_Type is mxDateTime_Free. So, if a DateTime object is deallocated normally, as a result of its reference count falling to zero, _Py_Dealloc is called on the object, which first removes it from refchain, then passes it to mxDateTime_Free. If a DateTime object is destroyed prematurely, as a result of invalid arguments to its destructor, the onError handler calls mxDateTime_Free, so the object is "conceptually deallocated" (placed in the free list), *but* the object is not removed from refchain. So if a refchain-membership-integrity-check is performed on the object in question or one of its immediate neighbors in refchain, that integrity check fails, leading to the fatal error. --- The solution is to 'Py_DECREF(...)' the object in the onError handler of its constructor, instead of passing the object directly to mxDateTime_Free. That change solves two problems: 1) It causes _Py_Dealloc to execute, which in turn executes _Py_ForgetReference, so the object is removed from refchain, as it should be. 2) At present, objects that are created successfully and later deallocated by normal reference count mechanics have a reference count of 0 when they enter the free list, whereas objects whose constructors abort their creation due to invalid arguments have a reference count of 1 when they enter the free list. Although AFAIK this doesn't cause an actual execution problem (because the object's reference count is *explicitly set to 1* rather than *incremented by 1* when the object is later "conceptually allocated" by _Py_NewReference), it is likely to confuse future maintainers and thereby lead to the introduction of an actual execution problem. I assume that if you agree that this is a reasonable solution, you'll want to apply the change not only to mxDateTime_FromDateAndTime, but to all similar constructors in mxDateTime.c. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From rj at maxxian.com Thu May 5 01:57:40 2005 From: rj at maxxian.com (RJ Juneau) Date: Mon Feb 13 20:01:23 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c5512e$f72798c0$6505a8c0@rjlaptop> I'm on the 30 day evaluation for mxodbc_zope_da. I'm getting the following error when I submit some queries: Error Type: KeyError Error Value: 'query' I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 with UCS4. The error seems to be caused by multiple rows being returned. I did see an earlier posting with the same error message. The response suggested a template error, but this is clearly not the case here. The additional evidence I've gathered so far: - I'm running the test directly from the ZSQL method, so there's no template involved. - If I use the same query with an additional "where" clause to ensure that only one row is returned, it works - If I use a value in the 'where' clause with no rows returned, it works - The same ZSQL query is being used on a Windows machine running Zope and the free ZODBC module without a problem - The query has been verified directly in mysql-client-browser Other info: - The database is MySQL 4.1.10A-0 - iODBC is the DB driver RJ Juneau -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050505/68d278bf/attachment-0128.htm From mal at egenix.com Thu May 5 12:37:43 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Feb 13 20:01:23 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c5512e$f72798c0$6505a8c0@rjlaptop> References: <000301c5512e$f72798c0$6505a8c0@rjlaptop> Message-ID: <4279E967.6010904@egenix.com> RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 > with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 09:37:42 2005 From: rj at maxxian.com (RJ Juneau) Date: Mon Feb 13 20:01:23 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000101c5516f$3b96de90$6505a8c0@rjlaptop> More interesting info on the problem: If I execute the query directly in the "test" window of the base eGenix mxODBC Database Connection window, it works fine and returns the 20 lines expected. That could point to a problem in the rendering, which seems to be where the traceback ends. Note that within the same Zope system I also have an ODBC connection to a Sybase database, and I have successfully tested multi-line ZSQL queries there. This is the traceback: Time 2005/05/05 07:55:15.294 GMT-4 Exception Type KeyError Exception Value 'query' Traceback (innermost last): Module ZPublisher.Publish, line 101, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 39, in call_object Module Shared.DC.ZRDB.DA, line 337, in manage_test Module DocumentTemplate.DT_String, line 474, in __call__ Module DocumentTemplate.DT_In, line 602, in renderwb Module DocumentTemplate.DT_Var, line 219, in render KeyError: 'query' I don't think the following is an issue, but I'll include it for completeness.I am also getting the following iODBC warnings and errors in the Zope console log, which are related to the ODBC parameters being passed by iODBC. Note that these errors also appear for all of the successful queries. [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (Setup). [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (UsageCount). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Timeout). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Reuse). As for the ZSQL snippet from the template... Since there's no template involved yet (I'm still testing directly from the ZSQL method), I assume you mean the SQL code? select h.host_name, s.system_name, s.system_handle, count(*) from terminal t, system_map s, host h where t.system_index = s.system_index and s.host_index = h.host_index group by s.system_name order by h.host_name Nothing complicated here. There are no parameters passed to the query. RJ -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: May 5, 2005 5:38 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: Re: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is > 2.3.4 with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ---------------------------------------------------------------------- > -- > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 16:00:32 2005 From: charlie at egenix.com (Charlie Clark) Date: Mon Feb 13 20:01:23 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000101c5516f$3b96de90$6505a8c0@rjlaptop> References: <000101c5516f$3b96de90$6505a8c0@rjlaptop> Message-ID: <20050505150032.644.1@bepc.1115296715.fake> On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base eGenix > mxODBC Database Connection window, it works fine and returns the 20 > lines expected. That could point to a problem in the rendering, which > seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection to > a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 10:22:17 2005 From: rj at maxxian.com (RJ Juneau) Date: Mon Feb 13 20:01:23 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505150032.644.1@bepc.1115296715.fake> Message-ID: <000201c55175$75bcad10$6505a8c0@rjlaptop> At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 11:47:14 2005 From: rj at maxxian.com (RJ Juneau) Date: Mon Feb 13 20:01:23 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c55181$549be0e0$6505a8c0@rjlaptop> Charlie, I found a fix. Here it is in case anyone else runs into this. You were correct - the problem is in another part of Zope. Based on your feedback, I did a bit more searching and found something here: http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. html The problem appears to be in Zope versions after 2.7.0. I'm running 2.7.6, and the post indicates that it also happens in 2.7.4. The solution: Edit file /lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. There are two lines in the file that start with . Edit them as follows: Change first line to: Change second line to: Just to be after, I shut down Zope before I made the changes and restarted it after. Thanks for the help! RJ -----Original Message----- From: RJ Juneau [mailto:rj@maxxian.com] Sent: May 5, 2005 9:22 AM To: 'Charlie Clark' Cc: 'egenix-users@lists.egenix.com' Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 17:57:25 2005 From: charlie at egenix.com (Charlie Clark) Date: Mon Feb 13 20:01:23 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <20050505165725.3380.2@bepc.1115296715.fake> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Thu May 5 09:15:21 2005 From: charlie at egenix.com (Charlie Clark) Date: Mon Feb 13 20:01:23 2006 Subject: [Zope-DB] RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <000001c55185$41477730$6b00a8c0@fonacier.local> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________ Zope-DB mailing list Zope-DB@zope.org http://mail.zope.org/mailman/listinfo/zope-db From rj at maxxian.com Thu May 5 12:38:00 2005 From: rj at maxxian.com (RJ Juneau) Date: Mon Feb 13 20:01:23 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000001c55188$6b841eb0$6505a8c0@rjlaptop> I just double-checked. Zope-2.7.6-final. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 12:49:16 2005 From: rj at maxxian.com (RJ Juneau) Date: Mon Feb 13 20:01:23 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000501c55189$fe149ba0$6505a8c0@rjlaptop> Charlie, The fix has only been applied for 2.7.7, 2.8b2. The info is in the original bug report which is closed and can be found here: http://www.zope.org/Collectors/Zope/1745 RJ -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Fri May 6 11:50:09 2005 From: rj at maxxian.com (RJ Juneau) Date: Mon Feb 13 20:01:23 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC Message-ID: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Still on eval for the product. I cannot get a stable connection to Sybase via the iODBC drivers. - The Sybase ODBC connection - including a query - have been verified at the iODBC level. - The setup is already working well for ODBC connection to MySQL. Symptoms include: - If I click on "Open Connection", it still comes back with "Connection Closed" when I go to a ZSQL method - Using 'Connect on Demand' is not working either. - Clicking "Open Connection" gives me the following error: Connection string: DSN=lixbox_sybase; UID=sa; PWD=XXXXXXX Connection pool entry: 0 Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection rejected by data source', 7952) The odbc.ini definition for DSN "lixbox_sybase" is as follows: [lixbox_sybase] JetFix = No NoRowSetSizeLimit = No Description = Test connection to listbox Options = LIXBOX DSQUERY = SQLSERVER TDSHOST = lixbox TDSPORT = 5000 TDSVER = 5.0 SQLSERVER_CATALOG = N CURSOR_SENSITIVITY = LOW UserName = sa Password = XXXXXXXX ServerType = Sybase 10/11/12 Driver = /opt/openlink/lib/sql_mt_lt.so Database = pubs2 ReadOnly = no NoAutoCommit = No NoLoginBox = No FetchBufferSize = 60 Other relevant data: - Connecting via OpenLink's iODBC - Zope 2.7.6-final - Python 2.3.4 - Connection to Sybase has been successfully tested with iODBC, including issuing a query - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC connection RJ Juneau Chief Technology Officer Maxxian Integration Inc. 155 Westhampton Drive Thornhill, Ontario Canada L4J 7X2 E-mail: rj@maxxian.com Phone: +1 905 482 9429 Cell: +1 416 897 6682 Toll free: +1 866 758 9161 Fax: +1 647 722 2038 -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050506/aef33361/attachment-0128.htm From mal at egenix.com Fri May 6 18:27:37 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Feb 13 20:01:23 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC In-Reply-To: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> References: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Message-ID: <427B8CE9.1010601@egenix.com> RJ Juneau wrote: > Still on eval for the product. > > I cannot get a stable connection to Sybase via the iODBC drivers. > > - The Sybase ODBC connection - including a query - have been verified at > the iODBC level. > - The setup is already working well for ODBC connection to MySQL. > > Symptoms include: > > - If I click on "Open Connection", it still comes back with "Connection > Closed" when I go to a ZSQL method > - Using 'Connect on Demand' is not working either. > - Clicking "Open Connection" gives me the following error: > > Connection string: DSN=lixbox_sybase; > UID=sa; > PWD=XXXXXXX Try writing the connection string on one line and without whitespace. ODBC drivers sometimes have problems with this. > Connection pool entry: 0 > Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection > rejected by data source', 7952) This is a generic error that relates to authentication or firewall problems. It is possible that turning on ODBC tracing the ODBC manager will give more clues as to the real cause of the problem. > The odbc.ini definition for DSN "lixbox_sybase" is as follows: > > [lixbox_sybase] > JetFix = No > NoRowSetSizeLimit = No > Description = Test connection to listbox > Options = LIXBOX > DSQUERY = SQLSERVER > TDSHOST = lixbox > TDSPORT = 5000 > TDSVER = 5.0 > SQLSERVER_CATALOG = N > CURSOR_SENSITIVITY = LOW > UserName = sa > Password = XXXXXXXX > ServerType = Sybase 10/11/12 > Driver = /opt/openlink/lib/sql_mt_lt.so > Database = pubs2 > ReadOnly = no > NoAutoCommit = No > NoLoginBox = No > FetchBufferSize = 60 > > > Other relevant data: > - Connecting via OpenLink's iODBC > - Zope 2.7.6-final > - Python 2.3.4 > - Connection to Sybase has been successfully tested with iODBC, > including issuing a query > - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC > connection > > > > RJ Juneau > Chief Technology Officer > Maxxian Integration Inc. > 155 Westhampton Drive > Thornhill, Ontario > Canada L4J 7X2 > E-mail: rj@maxxian.com > Phone: +1 905 482 9429 > Cell: +1 416 897 6682 > Toll free: +1 866 758 9161 > Fax: +1 647 722 2038 > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 06 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From calisp at gmail.com Sun May 15 23:49:03 2005 From: calisp at gmail.com (calisp@gmail.com) Date: Mon Feb 13 20:01:23 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK Message-ID: Hi, I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the following error... 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the last phase of a two-phase commit. This shouldn't happen. Traceback (most recent call last): File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one jar.tpc_finish(self) File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish try: self._finish() File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could not perform COMMIT or ROLLBACK', 1023) What could be causing this? Can I get the mxODBCZopeDA source from somewhere? It would make debugging this much easier. Thanks, Calisp. From mal at egenix.com Mon May 16 13:52:12 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Feb 13 20:01:23 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK In-Reply-To: References: Message-ID: <42887B5C.4010109@egenix.com> calisp@gmail.com wrote: > Hi, > > I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with > unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the > following error... > > 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the > last phase of a two-phase commit. This shouldn't happen. > Traceback (most recent call last): > File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one > jar.tpc_finish(self) > File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish > try: self._finish() > File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish > File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler > ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could > not perform COMMIT or ROLLBACK', 1023) You should have a look at the database logs to see what prevented the commit from being completed. > What could be causing this? Hard to say: mxODBCZopeDA is trying to commit the transaction, but the driver or database failed to complete the request. The above error was generated by the ODBC driver. This could be network or DNS problems, or be related to a bug in FreeTDS (which is getting more stable with every new release, but should still be considered beta quality software at the moment). > Can I get the mxODBCZopeDA source from > somewhere? It would make debugging this much easier. Getting the source is not an option and won't help much either since the source of the problem is not mxODBCZopeDA. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 16 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Sun May 1 21:29:25 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Feb 14 08:21:32 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <427259F3.4090806@egenix.com> References: <20050427130906.52878.qmail@web30008.mail.mud.yahoo.com> <427259F3.4090806@egenix.com> Message-ID: <42752005.7080904@egenix.com> M.-A. Lemburg wrote: > David Rushby wrote: > >> --- "M.-A. Lemburg" wrote: >> >>> Are you using the standard mxDateTime build or one >>> with WANT_SUBCLASSABLE_TYPES defined... >> >> >> >> Presumably "the standard", since I just built with 'py24d setup.py >> build', making no attempt to enable special directives. >> >> >>> ... (mxDateTime_Deallocate is only used by the latter)? >> >> >> >> That's true in 2.1.0-2005-04-15, but not in 2.1.0b5. >> >> >>> In any case, please try our latest snapshot: >>> >>> >> >> http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-04-15.zip >> >>> to see if that makes any difference. >> >> >> >> I can't build it out of the box: > > > Hmm, looks like distutils' sdist command doesn't like our new > repository layout which uses symlinks (after we've switched to > subversion). > > We'll have to debug distutils first, I guess :-( Ok, we've found the problem and fixed it. Here's the new release (which does build out of the box at least on our boxes ;-): http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 01 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From davidrushby at yahoo.com Mon May 2 15:49:53 2005 From: davidrushby at yahoo.com (David Rushby) Date: Tue Feb 14 08:21:32 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Ok, we've found the problem and fixed it. Here's the new > release (which does build out of the box at least on our > boxes ;-): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip It does build now, but: py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" still behaves as it did when I submitted my original message: Fatal Python error: UNREF invalid object Aborted This is the same debug build of Python 2.4.1 that I was previously using, running the same configuration (CentOS Linux 4.0/i386, everything compiled with GCC 3.4.3). Have you examined my original claim as to the cause of the bug? __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 10:21:55 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Feb 14 08:21:32 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> References: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> Message-ID: <42772693.8050306@egenix.com> David Rushby wrote: > --- "M.-A. Lemburg" wrote: > >>Ok, we've found the problem and fixed it. Here's the new >>release (which does build out of the box at least on our >>boxes ;-): >> >> > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip > > It does build now, but: > py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" > still behaves as it did when I submitted my original message: > Fatal Python error: UNREF invalid object > Aborted > > This is the same debug build of Python 2.4.1 that I was previously > using, running the same configuration (CentOS Linux 4.0/i386, > everything compiled with GCC 3.4.3). > > Have you examined my original claim as to the cause of the bug? No. We haven't had time for looking into it. I'm not sure whether your analysis of the problem is correct: if you don't define WANT_SUBCLASSABLE_TYPES, the API mxDateTime_Deallocate() is neither defined nor used. Furthermore, PyObject_Del() is only called by mxDateTime_Free() if you have explicitely edited mxDateTime.c to disabled the free list #defines. In a standard build, PyObject_Del() is only called at module finalization time. Note that the reason we call mxDateTime_Free() in the constructor is that we don't want the destructor of the object to be called. Py_DECREF() would call the destructor (mxDateTime_Deallocate). It is possible that the debug code in Python complains about the refcount in the object not being 0 at the time the object is finalized (module finalization time), but I don't see any such checks in PyObject_Free() (which is what PyObject_Del() maps to). Again, all of this does not happen in regular non-debug Python builds. Please be aware that we don't support debug builds, so fixing the problem (if there is one - gcc has some serious optimization problems on some combinations of platform and version) will take a while. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 09:27:37 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Tue Feb 14 08:21:32 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 Message-ID: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Hi all- I am trying to build the mx-base package, v.2.0.6. This will be used with postgresql 7.3.9, psycopg 1.1.18, and Roundup 0.8.2. RHEL 3.0 Python 2.3 egenix-mx-base-2.0.6.tar.gz I performed a: /usr/local/bin/python2.3 setup.py install Everything looks proper with the exeception of this series of warning statements: ----------------- gcc -pthread -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fno-strict-aliasing -fPIC -Imx/BeeBase/mxBeeBase -I/usr/local/incl ude/python2.3 -I/usr/local/include -c mx/BeeBase/mxBeeBase/btr.c -o build/temp.linux-i686-2.3/mx/BeeBase/mxBeeBase/mxBeeBa se/mx/BeeBase/mxBeeBase/btr.o mx/BeeBase/mxBeeBase/btr.c: In function `dumpBuf': mx/BeeBase/mxBeeBase/btr.c:249: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:250: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:255: warning: unsigned int format, long unsigned int arg (arg 4) mx/BeeBase/mxBeeBase/btr.c:256: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c: In function `_validateTree': mx/BeeBase/mxBeeBase/btr.c:330: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:337: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:339: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:349: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:351: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 3) creating build/lib.linux-i686-2.3/mx/BeeBase creating build/lib.linux-i686-2.3/mx/BeeBase/mxBeeBase -------------- Would someone be kind enough to let me know whether these messages were expected, and if not, how I might resolve these? Thanks! DC __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 22:06:33 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Feb 14 08:21:32 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> References: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Message-ID: <4277CBB9.8020302@egenix.com> Dianne Chen wrote: > Hi all- > > I am trying to build the mx-base package, v.2.0.6. > This will be used with postgresql 7.3.9, psycopg > 1.1.18, and Roundup 0.8.2. > > RHEL 3.0 > Python 2.3 > egenix-mx-base-2.0.6.tar.gz > > I performed a: > > /usr/local/bin/python2.3 setup.py install > > Everything looks proper with the exeception of this > series of warning statements: > > ----------------- > ... > -------------- > > Would someone be kind enough to let me know whether > these messages were expected, and if not, how I might > resolve these? These warning can safely be ignored. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 13:41:14 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Tue Feb 14 08:21:33 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: 6667 Message-ID: <20050503194114.72091.qmail@web31414.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Dianne Chen wrote: > > Hi all- > > > > I am trying to build the mx-base package, v.2.0.6. > > This will be used with postgresql 7.3.9, psycopg > > 1.1.18, and Roundup 0.8.2. > > > > RHEL 3.0 > > Python 2.3 > > egenix-mx-base-2.0.6.tar.gz > > > > I performed a: > > > > /usr/local/bin/python2.3 setup.py install > > > > Everything looks proper with the exeception of > this > > series of warning statements: > > > > ----------------- > > ... > > -------------- > > > > Would someone be kind enough to let me know > whether > > these messages were expected, and if not, how I > might > > resolve these? > > These warning can safely be ignored. > > -- > Marc-Andre Lemburg > eGenix.com > Marc- Thank you very much for the reply. It helps greatly. With kind regards, DC __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From davidrushby at yahoo.com Tue May 3 17:18:46 2005 From: davidrushby at yahoo.com (David Rushby) Date: Tue Feb 14 08:21:33 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050503231846.35012.qmail@web30009.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > I'm not sure whether your analysis of the problem is correct... Indeed, my original analysis wasn't correct; I think this one is. The fatal error I'm complaining about only arises if the arguments to DateTime.DateTime are invalid, so that the object is deallocated in the onError block of mxDateTime_FromDateAndTime. If the object is created successfully, and later deallocated by Python's garbage collector, the fatal error doesn't arise. Here's my analysis of the problem: --- If the debugging directive Py_TRACE_REFS is enabled, as it is in my case, the Python interpreter maintains a doubly linked list of all Python objects (named refchain) via the _ob_next and _ob_prev pointers added to PyObject via _PyObject_HEAD_EXTRA. Each object is inserted into refchain by the _Py_AddToAllObjects call in _Py_NewReference, and removed from refchain by the _Py_ForgetReference call in _Py_Dealloc. _Py_ForgetReference performs an integrity check on the object being deallocated (op) to make sure that its neighbors in refchain recognize it. Specifically, _Py_ForgetReference verifies that the _ob_next pointer of the previous object in refchain (op->_ob_prev->_ob_next) points to op, and that the _ob_prev pointer of the next object in refchain (op->_ob_next->_ob_prev) points to op. If either of those conditions is false, the interpreter raises the fatal error I'm seeing. After mxDateTime_New pulls an mxDateTimeObject out of the free list, it calls _Py_NewReference on that object to transform it from a "conceptually deallocated" object to a "conceptually allocated" one. _Py_NewReference inserts the object into refchain. Later, when the object is being "conceptually deallocated", it should be removed from refchain with _Py_ForgetReference. The version of _Py_Dealloc that's active when Py_TRACE_REFS is enabled does this (_Py_Dealloc is the element of Py_DECREF that performs the actual destruction). _Py_Dealloc first calls _Py_ForgetReference to remove the object from refchain, then calls the object's destructor (op->ob_type->tp_dealloc). If WANT_SUBCLASSABLE_TYPES is not defined (it is not in my case), the destructor for mxDateTime_Type is mxDateTime_Free. So, if a DateTime object is deallocated normally, as a result of its reference count falling to zero, _Py_Dealloc is called on the object, which first removes it from refchain, then passes it to mxDateTime_Free. If a DateTime object is destroyed prematurely, as a result of invalid arguments to its destructor, the onError handler calls mxDateTime_Free, so the object is "conceptually deallocated" (placed in the free list), *but* the object is not removed from refchain. So if a refchain-membership-integrity-check is performed on the object in question or one of its immediate neighbors in refchain, that integrity check fails, leading to the fatal error. --- The solution is to 'Py_DECREF(...)' the object in the onError handler of its constructor, instead of passing the object directly to mxDateTime_Free. That change solves two problems: 1) It causes _Py_Dealloc to execute, which in turn executes _Py_ForgetReference, so the object is removed from refchain, as it should be. 2) At present, objects that are created successfully and later deallocated by normal reference count mechanics have a reference count of 0 when they enter the free list, whereas objects whose constructors abort their creation due to invalid arguments have a reference count of 1 when they enter the free list. Although AFAIK this doesn't cause an actual execution problem (because the object's reference count is *explicitly set to 1* rather than *incremented by 1* when the object is later "conceptually allocated" by _Py_NewReference), it is likely to confuse future maintainers and thereby lead to the introduction of an actual execution problem. I assume that if you agree that this is a reasonable solution, you'll want to apply the change not only to mxDateTime_FromDateAndTime, but to all similar constructors in mxDateTime.c. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From rj at maxxian.com Thu May 5 01:57:40 2005 From: rj at maxxian.com (RJ Juneau) Date: Tue Feb 14 08:21:33 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c5512e$f72798c0$6505a8c0@rjlaptop> I'm on the 30 day evaluation for mxodbc_zope_da. I'm getting the following error when I submit some queries: Error Type: KeyError Error Value: 'query' I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 with UCS4. The error seems to be caused by multiple rows being returned. I did see an earlier posting with the same error message. The response suggested a template error, but this is clearly not the case here. The additional evidence I've gathered so far: - I'm running the test directly from the ZSQL method, so there's no template involved. - If I use the same query with an additional "where" clause to ensure that only one row is returned, it works - If I use a value in the 'where' clause with no rows returned, it works - The same ZSQL query is being used on a Windows machine running Zope and the free ZODBC module without a problem - The query has been verified directly in mysql-client-browser Other info: - The database is MySQL 4.1.10A-0 - iODBC is the DB driver RJ Juneau -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050505/68d278bf/attachment-0129.htm From mal at egenix.com Thu May 5 12:37:43 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Feb 14 08:21:33 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c5512e$f72798c0$6505a8c0@rjlaptop> References: <000301c5512e$f72798c0$6505a8c0@rjlaptop> Message-ID: <4279E967.6010904@egenix.com> RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 > with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 09:37:42 2005 From: rj at maxxian.com (RJ Juneau) Date: Tue Feb 14 08:21:33 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000101c5516f$3b96de90$6505a8c0@rjlaptop> More interesting info on the problem: If I execute the query directly in the "test" window of the base eGenix mxODBC Database Connection window, it works fine and returns the 20 lines expected. That could point to a problem in the rendering, which seems to be where the traceback ends. Note that within the same Zope system I also have an ODBC connection to a Sybase database, and I have successfully tested multi-line ZSQL queries there. This is the traceback: Time 2005/05/05 07:55:15.294 GMT-4 Exception Type KeyError Exception Value 'query' Traceback (innermost last): Module ZPublisher.Publish, line 101, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 39, in call_object Module Shared.DC.ZRDB.DA, line 337, in manage_test Module DocumentTemplate.DT_String, line 474, in __call__ Module DocumentTemplate.DT_In, line 602, in renderwb Module DocumentTemplate.DT_Var, line 219, in render KeyError: 'query' I don't think the following is an issue, but I'll include it for completeness.I am also getting the following iODBC warnings and errors in the Zope console log, which are related to the ODBC parameters being passed by iODBC. Note that these errors also appear for all of the successful queries. [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (Setup). [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (UsageCount). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Timeout). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Reuse). As for the ZSQL snippet from the template... Since there's no template involved yet (I'm still testing directly from the ZSQL method), I assume you mean the SQL code? select h.host_name, s.system_name, s.system_handle, count(*) from terminal t, system_map s, host h where t.system_index = s.system_index and s.host_index = h.host_index group by s.system_name order by h.host_name Nothing complicated here. There are no parameters passed to the query. RJ -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: May 5, 2005 5:38 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: Re: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is > 2.3.4 with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ---------------------------------------------------------------------- > -- > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 16:00:32 2005 From: charlie at egenix.com (Charlie Clark) Date: Tue Feb 14 08:21:33 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000101c5516f$3b96de90$6505a8c0@rjlaptop> References: <000101c5516f$3b96de90$6505a8c0@rjlaptop> Message-ID: <20050505150032.644.1@bepc.1115296715.fake> On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base eGenix > mxODBC Database Connection window, it works fine and returns the 20 > lines expected. That could point to a problem in the rendering, which > seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection to > a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 10:22:17 2005 From: rj at maxxian.com (RJ Juneau) Date: Tue Feb 14 08:21:33 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505150032.644.1@bepc.1115296715.fake> Message-ID: <000201c55175$75bcad10$6505a8c0@rjlaptop> At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 11:47:14 2005 From: rj at maxxian.com (RJ Juneau) Date: Tue Feb 14 08:21:33 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c55181$549be0e0$6505a8c0@rjlaptop> Charlie, I found a fix. Here it is in case anyone else runs into this. You were correct - the problem is in another part of Zope. Based on your feedback, I did a bit more searching and found something here: http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. html The problem appears to be in Zope versions after 2.7.0. I'm running 2.7.6, and the post indicates that it also happens in 2.7.4. The solution: Edit file /lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. There are two lines in the file that start with . Edit them as follows: Change first line to: Change second line to: Just to be after, I shut down Zope before I made the changes and restarted it after. Thanks for the help! RJ -----Original Message----- From: RJ Juneau [mailto:rj@maxxian.com] Sent: May 5, 2005 9:22 AM To: 'Charlie Clark' Cc: 'egenix-users@lists.egenix.com' Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 17:57:25 2005 From: charlie at egenix.com (Charlie Clark) Date: Tue Feb 14 08:21:33 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <20050505165725.3380.2@bepc.1115296715.fake> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Thu May 5 09:15:21 2005 From: charlie at egenix.com (Charlie Clark) Date: Tue Feb 14 08:21:34 2006 Subject: [Zope-DB] RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <000001c55185$41477730$6b00a8c0@fonacier.local> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________ Zope-DB mailing list Zope-DB@zope.org http://mail.zope.org/mailman/listinfo/zope-db From rj at maxxian.com Thu May 5 12:38:00 2005 From: rj at maxxian.com (RJ Juneau) Date: Tue Feb 14 08:21:34 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000001c55188$6b841eb0$6505a8c0@rjlaptop> I just double-checked. Zope-2.7.6-final. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 12:49:16 2005 From: rj at maxxian.com (RJ Juneau) Date: Tue Feb 14 08:21:34 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000501c55189$fe149ba0$6505a8c0@rjlaptop> Charlie, The fix has only been applied for 2.7.7, 2.8b2. The info is in the original bug report which is closed and can be found here: http://www.zope.org/Collectors/Zope/1745 RJ -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Fri May 6 11:50:09 2005 From: rj at maxxian.com (RJ Juneau) Date: Tue Feb 14 08:21:36 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC Message-ID: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Still on eval for the product. I cannot get a stable connection to Sybase via the iODBC drivers. - The Sybase ODBC connection - including a query - have been verified at the iODBC level. - The setup is already working well for ODBC connection to MySQL. Symptoms include: - If I click on "Open Connection", it still comes back with "Connection Closed" when I go to a ZSQL method - Using 'Connect on Demand' is not working either. - Clicking "Open Connection" gives me the following error: Connection string: DSN=lixbox_sybase; UID=sa; PWD=XXXXXXX Connection pool entry: 0 Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection rejected by data source', 7952) The odbc.ini definition for DSN "lixbox_sybase" is as follows: [lixbox_sybase] JetFix = No NoRowSetSizeLimit = No Description = Test connection to listbox Options = LIXBOX DSQUERY = SQLSERVER TDSHOST = lixbox TDSPORT = 5000 TDSVER = 5.0 SQLSERVER_CATALOG = N CURSOR_SENSITIVITY = LOW UserName = sa Password = XXXXXXXX ServerType = Sybase 10/11/12 Driver = /opt/openlink/lib/sql_mt_lt.so Database = pubs2 ReadOnly = no NoAutoCommit = No NoLoginBox = No FetchBufferSize = 60 Other relevant data: - Connecting via OpenLink's iODBC - Zope 2.7.6-final - Python 2.3.4 - Connection to Sybase has been successfully tested with iODBC, including issuing a query - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC connection RJ Juneau Chief Technology Officer Maxxian Integration Inc. 155 Westhampton Drive Thornhill, Ontario Canada L4J 7X2 E-mail: rj@maxxian.com Phone: +1 905 482 9429 Cell: +1 416 897 6682 Toll free: +1 866 758 9161 Fax: +1 647 722 2038 -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050506/aef33361/attachment-0129.htm From mal at egenix.com Fri May 6 18:27:37 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Feb 14 08:21:36 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC In-Reply-To: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> References: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Message-ID: <427B8CE9.1010601@egenix.com> RJ Juneau wrote: > Still on eval for the product. > > I cannot get a stable connection to Sybase via the iODBC drivers. > > - The Sybase ODBC connection - including a query - have been verified at > the iODBC level. > - The setup is already working well for ODBC connection to MySQL. > > Symptoms include: > > - If I click on "Open Connection", it still comes back with "Connection > Closed" when I go to a ZSQL method > - Using 'Connect on Demand' is not working either. > - Clicking "Open Connection" gives me the following error: > > Connection string: DSN=lixbox_sybase; > UID=sa; > PWD=XXXXXXX Try writing the connection string on one line and without whitespace. ODBC drivers sometimes have problems with this. > Connection pool entry: 0 > Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection > rejected by data source', 7952) This is a generic error that relates to authentication or firewall problems. It is possible that turning on ODBC tracing the ODBC manager will give more clues as to the real cause of the problem. > The odbc.ini definition for DSN "lixbox_sybase" is as follows: > > [lixbox_sybase] > JetFix = No > NoRowSetSizeLimit = No > Description = Test connection to listbox > Options = LIXBOX > DSQUERY = SQLSERVER > TDSHOST = lixbox > TDSPORT = 5000 > TDSVER = 5.0 > SQLSERVER_CATALOG = N > CURSOR_SENSITIVITY = LOW > UserName = sa > Password = XXXXXXXX > ServerType = Sybase 10/11/12 > Driver = /opt/openlink/lib/sql_mt_lt.so > Database = pubs2 > ReadOnly = no > NoAutoCommit = No > NoLoginBox = No > FetchBufferSize = 60 > > > Other relevant data: > - Connecting via OpenLink's iODBC > - Zope 2.7.6-final > - Python 2.3.4 > - Connection to Sybase has been successfully tested with iODBC, > including issuing a query > - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC > connection > > > > RJ Juneau > Chief Technology Officer > Maxxian Integration Inc. > 155 Westhampton Drive > Thornhill, Ontario > Canada L4J 7X2 > E-mail: rj@maxxian.com > Phone: +1 905 482 9429 > Cell: +1 416 897 6682 > Toll free: +1 866 758 9161 > Fax: +1 647 722 2038 > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 06 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From calisp at gmail.com Sun May 15 23:49:03 2005 From: calisp at gmail.com (calisp@gmail.com) Date: Tue Feb 14 08:21:36 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK Message-ID: Hi, I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the following error... 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the last phase of a two-phase commit. This shouldn't happen. Traceback (most recent call last): File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one jar.tpc_finish(self) File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish try: self._finish() File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could not perform COMMIT or ROLLBACK', 1023) What could be causing this? Can I get the mxODBCZopeDA source from somewhere? It would make debugging this much easier. Thanks, Calisp. From mal at egenix.com Mon May 16 13:52:12 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Feb 14 08:21:36 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK In-Reply-To: References: Message-ID: <42887B5C.4010109@egenix.com> calisp@gmail.com wrote: > Hi, > > I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with > unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the > following error... > > 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the > last phase of a two-phase commit. This shouldn't happen. > Traceback (most recent call last): > File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one > jar.tpc_finish(self) > File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish > try: self._finish() > File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish > File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler > ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could > not perform COMMIT or ROLLBACK', 1023) You should have a look at the database logs to see what prevented the commit from being completed. > What could be causing this? Hard to say: mxODBCZopeDA is trying to commit the transaction, but the driver or database failed to complete the request. The above error was generated by the ODBC driver. This could be network or DNS problems, or be related to a bug in FreeTDS (which is getting more stable with every new release, but should still be considered beta quality software at the moment). > Can I get the mxODBCZopeDA source from > somewhere? It would make debugging this much easier. Getting the source is not an option and won't help much either since the source of the problem is not mxODBCZopeDA. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 16 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Sun May 1 21:29:25 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Feb 14 12:03:53 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <427259F3.4090806@egenix.com> References: <20050427130906.52878.qmail@web30008.mail.mud.yahoo.com> <427259F3.4090806@egenix.com> Message-ID: <42752005.7080904@egenix.com> M.-A. Lemburg wrote: > David Rushby wrote: > >> --- "M.-A. Lemburg" wrote: >> >>> Are you using the standard mxDateTime build or one >>> with WANT_SUBCLASSABLE_TYPES defined... >> >> >> >> Presumably "the standard", since I just built with 'py24d setup.py >> build', making no attempt to enable special directives. >> >> >>> ... (mxDateTime_Deallocate is only used by the latter)? >> >> >> >> That's true in 2.1.0-2005-04-15, but not in 2.1.0b5. >> >> >>> In any case, please try our latest snapshot: >>> >>> >> >> http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-04-15.zip >> >>> to see if that makes any difference. >> >> >> >> I can't build it out of the box: > > > Hmm, looks like distutils' sdist command doesn't like our new > repository layout which uses symlinks (after we've switched to > subversion). > > We'll have to debug distutils first, I guess :-( Ok, we've found the problem and fixed it. Here's the new release (which does build out of the box at least on our boxes ;-): http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 01 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From davidrushby at yahoo.com Mon May 2 15:49:53 2005 From: davidrushby at yahoo.com (David Rushby) Date: Tue Feb 14 12:03:54 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Ok, we've found the problem and fixed it. Here's the new > release (which does build out of the box at least on our > boxes ;-): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip It does build now, but: py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" still behaves as it did when I submitted my original message: Fatal Python error: UNREF invalid object Aborted This is the same debug build of Python 2.4.1 that I was previously using, running the same configuration (CentOS Linux 4.0/i386, everything compiled with GCC 3.4.3). Have you examined my original claim as to the cause of the bug? __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 10:21:55 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Feb 14 12:03:54 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> References: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> Message-ID: <42772693.8050306@egenix.com> David Rushby wrote: > --- "M.-A. Lemburg" wrote: > >>Ok, we've found the problem and fixed it. Here's the new >>release (which does build out of the box at least on our >>boxes ;-): >> >> > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip > > It does build now, but: > py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" > still behaves as it did when I submitted my original message: > Fatal Python error: UNREF invalid object > Aborted > > This is the same debug build of Python 2.4.1 that I was previously > using, running the same configuration (CentOS Linux 4.0/i386, > everything compiled with GCC 3.4.3). > > Have you examined my original claim as to the cause of the bug? No. We haven't had time for looking into it. I'm not sure whether your analysis of the problem is correct: if you don't define WANT_SUBCLASSABLE_TYPES, the API mxDateTime_Deallocate() is neither defined nor used. Furthermore, PyObject_Del() is only called by mxDateTime_Free() if you have explicitely edited mxDateTime.c to disabled the free list #defines. In a standard build, PyObject_Del() is only called at module finalization time. Note that the reason we call mxDateTime_Free() in the constructor is that we don't want the destructor of the object to be called. Py_DECREF() would call the destructor (mxDateTime_Deallocate). It is possible that the debug code in Python complains about the refcount in the object not being 0 at the time the object is finalized (module finalization time), but I don't see any such checks in PyObject_Free() (which is what PyObject_Del() maps to). Again, all of this does not happen in regular non-debug Python builds. Please be aware that we don't support debug builds, so fixing the problem (if there is one - gcc has some serious optimization problems on some combinations of platform and version) will take a while. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 09:27:37 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Tue Feb 14 12:03:54 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 Message-ID: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Hi all- I am trying to build the mx-base package, v.2.0.6. This will be used with postgresql 7.3.9, psycopg 1.1.18, and Roundup 0.8.2. RHEL 3.0 Python 2.3 egenix-mx-base-2.0.6.tar.gz I performed a: /usr/local/bin/python2.3 setup.py install Everything looks proper with the exeception of this series of warning statements: ----------------- gcc -pthread -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fno-strict-aliasing -fPIC -Imx/BeeBase/mxBeeBase -I/usr/local/incl ude/python2.3 -I/usr/local/include -c mx/BeeBase/mxBeeBase/btr.c -o build/temp.linux-i686-2.3/mx/BeeBase/mxBeeBase/mxBeeBa se/mx/BeeBase/mxBeeBase/btr.o mx/BeeBase/mxBeeBase/btr.c: In function `dumpBuf': mx/BeeBase/mxBeeBase/btr.c:249: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:250: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:255: warning: unsigned int format, long unsigned int arg (arg 4) mx/BeeBase/mxBeeBase/btr.c:256: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c: In function `_validateTree': mx/BeeBase/mxBeeBase/btr.c:330: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:337: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:339: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:349: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:351: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 3) creating build/lib.linux-i686-2.3/mx/BeeBase creating build/lib.linux-i686-2.3/mx/BeeBase/mxBeeBase -------------- Would someone be kind enough to let me know whether these messages were expected, and if not, how I might resolve these? Thanks! DC __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 22:06:33 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Feb 14 12:03:54 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> References: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Message-ID: <4277CBB9.8020302@egenix.com> Dianne Chen wrote: > Hi all- > > I am trying to build the mx-base package, v.2.0.6. > This will be used with postgresql 7.3.9, psycopg > 1.1.18, and Roundup 0.8.2. > > RHEL 3.0 > Python 2.3 > egenix-mx-base-2.0.6.tar.gz > > I performed a: > > /usr/local/bin/python2.3 setup.py install > > Everything looks proper with the exeception of this > series of warning statements: > > ----------------- > ... > -------------- > > Would someone be kind enough to let me know whether > these messages were expected, and if not, how I might > resolve these? These warning can safely be ignored. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 13:41:14 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Tue Feb 14 12:03:54 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: 6667 Message-ID: <20050503194114.72091.qmail@web31414.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Dianne Chen wrote: > > Hi all- > > > > I am trying to build the mx-base package, v.2.0.6. > > This will be used with postgresql 7.3.9, psycopg > > 1.1.18, and Roundup 0.8.2. > > > > RHEL 3.0 > > Python 2.3 > > egenix-mx-base-2.0.6.tar.gz > > > > I performed a: > > > > /usr/local/bin/python2.3 setup.py install > > > > Everything looks proper with the exeception of > this > > series of warning statements: > > > > ----------------- > > ... > > -------------- > > > > Would someone be kind enough to let me know > whether > > these messages were expected, and if not, how I > might > > resolve these? > > These warning can safely be ignored. > > -- > Marc-Andre Lemburg > eGenix.com > Marc- Thank you very much for the reply. It helps greatly. With kind regards, DC __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From davidrushby at yahoo.com Tue May 3 17:18:46 2005 From: davidrushby at yahoo.com (David Rushby) Date: Tue Feb 14 12:03:54 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050503231846.35012.qmail@web30009.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > I'm not sure whether your analysis of the problem is correct... Indeed, my original analysis wasn't correct; I think this one is. The fatal error I'm complaining about only arises if the arguments to DateTime.DateTime are invalid, so that the object is deallocated in the onError block of mxDateTime_FromDateAndTime. If the object is created successfully, and later deallocated by Python's garbage collector, the fatal error doesn't arise. Here's my analysis of the problem: --- If the debugging directive Py_TRACE_REFS is enabled, as it is in my case, the Python interpreter maintains a doubly linked list of all Python objects (named refchain) via the _ob_next and _ob_prev pointers added to PyObject via _PyObject_HEAD_EXTRA. Each object is inserted into refchain by the _Py_AddToAllObjects call in _Py_NewReference, and removed from refchain by the _Py_ForgetReference call in _Py_Dealloc. _Py_ForgetReference performs an integrity check on the object being deallocated (op) to make sure that its neighbors in refchain recognize it. Specifically, _Py_ForgetReference verifies that the _ob_next pointer of the previous object in refchain (op->_ob_prev->_ob_next) points to op, and that the _ob_prev pointer of the next object in refchain (op->_ob_next->_ob_prev) points to op. If either of those conditions is false, the interpreter raises the fatal error I'm seeing. After mxDateTime_New pulls an mxDateTimeObject out of the free list, it calls _Py_NewReference on that object to transform it from a "conceptually deallocated" object to a "conceptually allocated" one. _Py_NewReference inserts the object into refchain. Later, when the object is being "conceptually deallocated", it should be removed from refchain with _Py_ForgetReference. The version of _Py_Dealloc that's active when Py_TRACE_REFS is enabled does this (_Py_Dealloc is the element of Py_DECREF that performs the actual destruction). _Py_Dealloc first calls _Py_ForgetReference to remove the object from refchain, then calls the object's destructor (op->ob_type->tp_dealloc). If WANT_SUBCLASSABLE_TYPES is not defined (it is not in my case), the destructor for mxDateTime_Type is mxDateTime_Free. So, if a DateTime object is deallocated normally, as a result of its reference count falling to zero, _Py_Dealloc is called on the object, which first removes it from refchain, then passes it to mxDateTime_Free. If a DateTime object is destroyed prematurely, as a result of invalid arguments to its destructor, the onError handler calls mxDateTime_Free, so the object is "conceptually deallocated" (placed in the free list), *but* the object is not removed from refchain. So if a refchain-membership-integrity-check is performed on the object in question or one of its immediate neighbors in refchain, that integrity check fails, leading to the fatal error. --- The solution is to 'Py_DECREF(...)' the object in the onError handler of its constructor, instead of passing the object directly to mxDateTime_Free. That change solves two problems: 1) It causes _Py_Dealloc to execute, which in turn executes _Py_ForgetReference, so the object is removed from refchain, as it should be. 2) At present, objects that are created successfully and later deallocated by normal reference count mechanics have a reference count of 0 when they enter the free list, whereas objects whose constructors abort their creation due to invalid arguments have a reference count of 1 when they enter the free list. Although AFAIK this doesn't cause an actual execution problem (because the object's reference count is *explicitly set to 1* rather than *incremented by 1* when the object is later "conceptually allocated" by _Py_NewReference), it is likely to confuse future maintainers and thereby lead to the introduction of an actual execution problem. I assume that if you agree that this is a reasonable solution, you'll want to apply the change not only to mxDateTime_FromDateAndTime, but to all similar constructors in mxDateTime.c. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From rj at maxxian.com Thu May 5 01:57:40 2005 From: rj at maxxian.com (RJ Juneau) Date: Tue Feb 14 12:03:55 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c5512e$f72798c0$6505a8c0@rjlaptop> I'm on the 30 day evaluation for mxodbc_zope_da. I'm getting the following error when I submit some queries: Error Type: KeyError Error Value: 'query' I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 with UCS4. The error seems to be caused by multiple rows being returned. I did see an earlier posting with the same error message. The response suggested a template error, but this is clearly not the case here. The additional evidence I've gathered so far: - I'm running the test directly from the ZSQL method, so there's no template involved. - If I use the same query with an additional "where" clause to ensure that only one row is returned, it works - If I use a value in the 'where' clause with no rows returned, it works - The same ZSQL query is being used on a Windows machine running Zope and the free ZODBC module without a problem - The query has been verified directly in mysql-client-browser Other info: - The database is MySQL 4.1.10A-0 - iODBC is the DB driver RJ Juneau -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050505/68d278bf/attachment-0130.htm From mal at egenix.com Thu May 5 12:37:43 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Feb 14 12:03:55 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c5512e$f72798c0$6505a8c0@rjlaptop> References: <000301c5512e$f72798c0$6505a8c0@rjlaptop> Message-ID: <4279E967.6010904@egenix.com> RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 > with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 09:37:42 2005 From: rj at maxxian.com (RJ Juneau) Date: Tue Feb 14 12:03:55 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000101c5516f$3b96de90$6505a8c0@rjlaptop> More interesting info on the problem: If I execute the query directly in the "test" window of the base eGenix mxODBC Database Connection window, it works fine and returns the 20 lines expected. That could point to a problem in the rendering, which seems to be where the traceback ends. Note that within the same Zope system I also have an ODBC connection to a Sybase database, and I have successfully tested multi-line ZSQL queries there. This is the traceback: Time 2005/05/05 07:55:15.294 GMT-4 Exception Type KeyError Exception Value 'query' Traceback (innermost last): Module ZPublisher.Publish, line 101, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 39, in call_object Module Shared.DC.ZRDB.DA, line 337, in manage_test Module DocumentTemplate.DT_String, line 474, in __call__ Module DocumentTemplate.DT_In, line 602, in renderwb Module DocumentTemplate.DT_Var, line 219, in render KeyError: 'query' I don't think the following is an issue, but I'll include it for completeness.I am also getting the following iODBC warnings and errors in the Zope console log, which are related to the ODBC parameters being passed by iODBC. Note that these errors also appear for all of the successful queries. [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (Setup). [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (UsageCount). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Timeout). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Reuse). As for the ZSQL snippet from the template... Since there's no template involved yet (I'm still testing directly from the ZSQL method), I assume you mean the SQL code? select h.host_name, s.system_name, s.system_handle, count(*) from terminal t, system_map s, host h where t.system_index = s.system_index and s.host_index = h.host_index group by s.system_name order by h.host_name Nothing complicated here. There are no parameters passed to the query. RJ -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: May 5, 2005 5:38 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: Re: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is > 2.3.4 with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ---------------------------------------------------------------------- > -- > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 16:00:32 2005 From: charlie at egenix.com (Charlie Clark) Date: Tue Feb 14 12:03:55 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000101c5516f$3b96de90$6505a8c0@rjlaptop> References: <000101c5516f$3b96de90$6505a8c0@rjlaptop> Message-ID: <20050505150032.644.1@bepc.1115296715.fake> On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base eGenix > mxODBC Database Connection window, it works fine and returns the 20 > lines expected. That could point to a problem in the rendering, which > seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection to > a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 10:22:17 2005 From: rj at maxxian.com (RJ Juneau) Date: Tue Feb 14 12:03:55 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505150032.644.1@bepc.1115296715.fake> Message-ID: <000201c55175$75bcad10$6505a8c0@rjlaptop> At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 11:47:14 2005 From: rj at maxxian.com (RJ Juneau) Date: Tue Feb 14 12:03:55 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c55181$549be0e0$6505a8c0@rjlaptop> Charlie, I found a fix. Here it is in case anyone else runs into this. You were correct - the problem is in another part of Zope. Based on your feedback, I did a bit more searching and found something here: http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. html The problem appears to be in Zope versions after 2.7.0. I'm running 2.7.6, and the post indicates that it also happens in 2.7.4. The solution: Edit file /lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. There are two lines in the file that start with . Edit them as follows: Change first line to: Change second line to: Just to be after, I shut down Zope before I made the changes and restarted it after. Thanks for the help! RJ -----Original Message----- From: RJ Juneau [mailto:rj@maxxian.com] Sent: May 5, 2005 9:22 AM To: 'Charlie Clark' Cc: 'egenix-users@lists.egenix.com' Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 17:57:25 2005 From: charlie at egenix.com (Charlie Clark) Date: Tue Feb 14 12:03:55 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <20050505165725.3380.2@bepc.1115296715.fake> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Thu May 5 09:15:21 2005 From: charlie at egenix.com (Charlie Clark) Date: Tue Feb 14 12:03:55 2006 Subject: [Zope-DB] RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <000001c55185$41477730$6b00a8c0@fonacier.local> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________ Zope-DB mailing list Zope-DB@zope.org http://mail.zope.org/mailman/listinfo/zope-db From rj at maxxian.com Thu May 5 12:38:00 2005 From: rj at maxxian.com (RJ Juneau) Date: Tue Feb 14 12:03:55 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000001c55188$6b841eb0$6505a8c0@rjlaptop> I just double-checked. Zope-2.7.6-final. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 12:49:16 2005 From: rj at maxxian.com (RJ Juneau) Date: Tue Feb 14 12:03:55 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000501c55189$fe149ba0$6505a8c0@rjlaptop> Charlie, The fix has only been applied for 2.7.7, 2.8b2. The info is in the original bug report which is closed and can be found here: http://www.zope.org/Collectors/Zope/1745 RJ -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Fri May 6 11:50:09 2005 From: rj at maxxian.com (RJ Juneau) Date: Tue Feb 14 12:03:55 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC Message-ID: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Still on eval for the product. I cannot get a stable connection to Sybase via the iODBC drivers. - The Sybase ODBC connection - including a query - have been verified at the iODBC level. - The setup is already working well for ODBC connection to MySQL. Symptoms include: - If I click on "Open Connection", it still comes back with "Connection Closed" when I go to a ZSQL method - Using 'Connect on Demand' is not working either. - Clicking "Open Connection" gives me the following error: Connection string: DSN=lixbox_sybase; UID=sa; PWD=XXXXXXX Connection pool entry: 0 Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection rejected by data source', 7952) The odbc.ini definition for DSN "lixbox_sybase" is as follows: [lixbox_sybase] JetFix = No NoRowSetSizeLimit = No Description = Test connection to listbox Options = LIXBOX DSQUERY = SQLSERVER TDSHOST = lixbox TDSPORT = 5000 TDSVER = 5.0 SQLSERVER_CATALOG = N CURSOR_SENSITIVITY = LOW UserName = sa Password = XXXXXXXX ServerType = Sybase 10/11/12 Driver = /opt/openlink/lib/sql_mt_lt.so Database = pubs2 ReadOnly = no NoAutoCommit = No NoLoginBox = No FetchBufferSize = 60 Other relevant data: - Connecting via OpenLink's iODBC - Zope 2.7.6-final - Python 2.3.4 - Connection to Sybase has been successfully tested with iODBC, including issuing a query - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC connection RJ Juneau Chief Technology Officer Maxxian Integration Inc. 155 Westhampton Drive Thornhill, Ontario Canada L4J 7X2 E-mail: rj@maxxian.com Phone: +1 905 482 9429 Cell: +1 416 897 6682 Toll free: +1 866 758 9161 Fax: +1 647 722 2038 -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050506/aef33361/attachment-0130.htm From mal at egenix.com Fri May 6 18:27:37 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Feb 14 12:03:55 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC In-Reply-To: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> References: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Message-ID: <427B8CE9.1010601@egenix.com> RJ Juneau wrote: > Still on eval for the product. > > I cannot get a stable connection to Sybase via the iODBC drivers. > > - The Sybase ODBC connection - including a query - have been verified at > the iODBC level. > - The setup is already working well for ODBC connection to MySQL. > > Symptoms include: > > - If I click on "Open Connection", it still comes back with "Connection > Closed" when I go to a ZSQL method > - Using 'Connect on Demand' is not working either. > - Clicking "Open Connection" gives me the following error: > > Connection string: DSN=lixbox_sybase; > UID=sa; > PWD=XXXXXXX Try writing the connection string on one line and without whitespace. ODBC drivers sometimes have problems with this. > Connection pool entry: 0 > Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection > rejected by data source', 7952) This is a generic error that relates to authentication or firewall problems. It is possible that turning on ODBC tracing the ODBC manager will give more clues as to the real cause of the problem. > The odbc.ini definition for DSN "lixbox_sybase" is as follows: > > [lixbox_sybase] > JetFix = No > NoRowSetSizeLimit = No > Description = Test connection to listbox > Options = LIXBOX > DSQUERY = SQLSERVER > TDSHOST = lixbox > TDSPORT = 5000 > TDSVER = 5.0 > SQLSERVER_CATALOG = N > CURSOR_SENSITIVITY = LOW > UserName = sa > Password = XXXXXXXX > ServerType = Sybase 10/11/12 > Driver = /opt/openlink/lib/sql_mt_lt.so > Database = pubs2 > ReadOnly = no > NoAutoCommit = No > NoLoginBox = No > FetchBufferSize = 60 > > > Other relevant data: > - Connecting via OpenLink's iODBC > - Zope 2.7.6-final > - Python 2.3.4 > - Connection to Sybase has been successfully tested with iODBC, > including issuing a query > - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC > connection > > > > RJ Juneau > Chief Technology Officer > Maxxian Integration Inc. > 155 Westhampton Drive > Thornhill, Ontario > Canada L4J 7X2 > E-mail: rj@maxxian.com > Phone: +1 905 482 9429 > Cell: +1 416 897 6682 > Toll free: +1 866 758 9161 > Fax: +1 647 722 2038 > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 06 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From calisp at gmail.com Sun May 15 23:49:03 2005 From: calisp at gmail.com (calisp@gmail.com) Date: Tue Feb 14 12:03:55 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK Message-ID: Hi, I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the following error... 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the last phase of a two-phase commit. This shouldn't happen. Traceback (most recent call last): File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one jar.tpc_finish(self) File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish try: self._finish() File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could not perform COMMIT or ROLLBACK', 1023) What could be causing this? Can I get the mxODBCZopeDA source from somewhere? It would make debugging this much easier. Thanks, Calisp. From mal at egenix.com Mon May 16 13:52:12 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Feb 14 12:03:55 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK In-Reply-To: References: Message-ID: <42887B5C.4010109@egenix.com> calisp@gmail.com wrote: > Hi, > > I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with > unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the > following error... > > 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the > last phase of a two-phase commit. This shouldn't happen. > Traceback (most recent call last): > File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one > jar.tpc_finish(self) > File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish > try: self._finish() > File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish > File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler > ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could > not perform COMMIT or ROLLBACK', 1023) You should have a look at the database logs to see what prevented the commit from being completed. > What could be causing this? Hard to say: mxODBCZopeDA is trying to commit the transaction, but the driver or database failed to complete the request. The above error was generated by the ODBC driver. This could be network or DNS problems, or be related to a bug in FreeTDS (which is getting more stable with every new release, but should still be considered beta quality software at the moment). > Can I get the mxODBCZopeDA source from > somewhere? It would make debugging this much easier. Getting the source is not an option and won't help much either since the source of the problem is not mxODBCZopeDA. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 16 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Sun May 1 21:29:25 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Feb 14 16:01:56 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <427259F3.4090806@egenix.com> References: <20050427130906.52878.qmail@web30008.mail.mud.yahoo.com> <427259F3.4090806@egenix.com> Message-ID: <42752005.7080904@egenix.com> M.-A. Lemburg wrote: > David Rushby wrote: > >> --- "M.-A. Lemburg" wrote: >> >>> Are you using the standard mxDateTime build or one >>> with WANT_SUBCLASSABLE_TYPES defined... >> >> >> >> Presumably "the standard", since I just built with 'py24d setup.py >> build', making no attempt to enable special directives. >> >> >>> ... (mxDateTime_Deallocate is only used by the latter)? >> >> >> >> That's true in 2.1.0-2005-04-15, but not in 2.1.0b5. >> >> >>> In any case, please try our latest snapshot: >>> >>> >> >> http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-04-15.zip >> >>> to see if that makes any difference. >> >> >> >> I can't build it out of the box: > > > Hmm, looks like distutils' sdist command doesn't like our new > repository layout which uses symlinks (after we've switched to > subversion). > > We'll have to debug distutils first, I guess :-( Ok, we've found the problem and fixed it. Here's the new release (which does build out of the box at least on our boxes ;-): http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 01 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From davidrushby at yahoo.com Mon May 2 15:49:53 2005 From: davidrushby at yahoo.com (David Rushby) Date: Tue Feb 14 16:01:56 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Ok, we've found the problem and fixed it. Here's the new > release (which does build out of the box at least on our > boxes ;-): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip It does build now, but: py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" still behaves as it did when I submitted my original message: Fatal Python error: UNREF invalid object Aborted This is the same debug build of Python 2.4.1 that I was previously using, running the same configuration (CentOS Linux 4.0/i386, everything compiled with GCC 3.4.3). Have you examined my original claim as to the cause of the bug? __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 10:21:55 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Feb 14 16:01:56 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> References: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> Message-ID: <42772693.8050306@egenix.com> David Rushby wrote: > --- "M.-A. Lemburg" wrote: > >>Ok, we've found the problem and fixed it. Here's the new >>release (which does build out of the box at least on our >>boxes ;-): >> >> > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip > > It does build now, but: > py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" > still behaves as it did when I submitted my original message: > Fatal Python error: UNREF invalid object > Aborted > > This is the same debug build of Python 2.4.1 that I was previously > using, running the same configuration (CentOS Linux 4.0/i386, > everything compiled with GCC 3.4.3). > > Have you examined my original claim as to the cause of the bug? No. We haven't had time for looking into it. I'm not sure whether your analysis of the problem is correct: if you don't define WANT_SUBCLASSABLE_TYPES, the API mxDateTime_Deallocate() is neither defined nor used. Furthermore, PyObject_Del() is only called by mxDateTime_Free() if you have explicitely edited mxDateTime.c to disabled the free list #defines. In a standard build, PyObject_Del() is only called at module finalization time. Note that the reason we call mxDateTime_Free() in the constructor is that we don't want the destructor of the object to be called. Py_DECREF() would call the destructor (mxDateTime_Deallocate). It is possible that the debug code in Python complains about the refcount in the object not being 0 at the time the object is finalized (module finalization time), but I don't see any such checks in PyObject_Free() (which is what PyObject_Del() maps to). Again, all of this does not happen in regular non-debug Python builds. Please be aware that we don't support debug builds, so fixing the problem (if there is one - gcc has some serious optimization problems on some combinations of platform and version) will take a while. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 09:27:37 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Tue Feb 14 16:01:56 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 Message-ID: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Hi all- I am trying to build the mx-base package, v.2.0.6. This will be used with postgresql 7.3.9, psycopg 1.1.18, and Roundup 0.8.2. RHEL 3.0 Python 2.3 egenix-mx-base-2.0.6.tar.gz I performed a: /usr/local/bin/python2.3 setup.py install Everything looks proper with the exeception of this series of warning statements: ----------------- gcc -pthread -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fno-strict-aliasing -fPIC -Imx/BeeBase/mxBeeBase -I/usr/local/incl ude/python2.3 -I/usr/local/include -c mx/BeeBase/mxBeeBase/btr.c -o build/temp.linux-i686-2.3/mx/BeeBase/mxBeeBase/mxBeeBa se/mx/BeeBase/mxBeeBase/btr.o mx/BeeBase/mxBeeBase/btr.c: In function `dumpBuf': mx/BeeBase/mxBeeBase/btr.c:249: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:250: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:255: warning: unsigned int format, long unsigned int arg (arg 4) mx/BeeBase/mxBeeBase/btr.c:256: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c: In function `_validateTree': mx/BeeBase/mxBeeBase/btr.c:330: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:337: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:339: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:349: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:351: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 3) creating build/lib.linux-i686-2.3/mx/BeeBase creating build/lib.linux-i686-2.3/mx/BeeBase/mxBeeBase -------------- Would someone be kind enough to let me know whether these messages were expected, and if not, how I might resolve these? Thanks! DC __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 22:06:33 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Feb 14 16:01:56 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> References: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Message-ID: <4277CBB9.8020302@egenix.com> Dianne Chen wrote: > Hi all- > > I am trying to build the mx-base package, v.2.0.6. > This will be used with postgresql 7.3.9, psycopg > 1.1.18, and Roundup 0.8.2. > > RHEL 3.0 > Python 2.3 > egenix-mx-base-2.0.6.tar.gz > > I performed a: > > /usr/local/bin/python2.3 setup.py install > > Everything looks proper with the exeception of this > series of warning statements: > > ----------------- > ... > -------------- > > Would someone be kind enough to let me know whether > these messages were expected, and if not, how I might > resolve these? These warning can safely be ignored. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 13:41:14 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Tue Feb 14 16:01:57 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: 6667 Message-ID: <20050503194114.72091.qmail@web31414.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Dianne Chen wrote: > > Hi all- > > > > I am trying to build the mx-base package, v.2.0.6. > > This will be used with postgresql 7.3.9, psycopg > > 1.1.18, and Roundup 0.8.2. > > > > RHEL 3.0 > > Python 2.3 > > egenix-mx-base-2.0.6.tar.gz > > > > I performed a: > > > > /usr/local/bin/python2.3 setup.py install > > > > Everything looks proper with the exeception of > this > > series of warning statements: > > > > ----------------- > > ... > > -------------- > > > > Would someone be kind enough to let me know > whether > > these messages were expected, and if not, how I > might > > resolve these? > > These warning can safely be ignored. > > -- > Marc-Andre Lemburg > eGenix.com > Marc- Thank you very much for the reply. It helps greatly. With kind regards, DC __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From davidrushby at yahoo.com Tue May 3 17:18:46 2005 From: davidrushby at yahoo.com (David Rushby) Date: Tue Feb 14 16:01:57 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050503231846.35012.qmail@web30009.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > I'm not sure whether your analysis of the problem is correct... Indeed, my original analysis wasn't correct; I think this one is. The fatal error I'm complaining about only arises if the arguments to DateTime.DateTime are invalid, so that the object is deallocated in the onError block of mxDateTime_FromDateAndTime. If the object is created successfully, and later deallocated by Python's garbage collector, the fatal error doesn't arise. Here's my analysis of the problem: --- If the debugging directive Py_TRACE_REFS is enabled, as it is in my case, the Python interpreter maintains a doubly linked list of all Python objects (named refchain) via the _ob_next and _ob_prev pointers added to PyObject via _PyObject_HEAD_EXTRA. Each object is inserted into refchain by the _Py_AddToAllObjects call in _Py_NewReference, and removed from refchain by the _Py_ForgetReference call in _Py_Dealloc. _Py_ForgetReference performs an integrity check on the object being deallocated (op) to make sure that its neighbors in refchain recognize it. Specifically, _Py_ForgetReference verifies that the _ob_next pointer of the previous object in refchain (op->_ob_prev->_ob_next) points to op, and that the _ob_prev pointer of the next object in refchain (op->_ob_next->_ob_prev) points to op. If either of those conditions is false, the interpreter raises the fatal error I'm seeing. After mxDateTime_New pulls an mxDateTimeObject out of the free list, it calls _Py_NewReference on that object to transform it from a "conceptually deallocated" object to a "conceptually allocated" one. _Py_NewReference inserts the object into refchain. Later, when the object is being "conceptually deallocated", it should be removed from refchain with _Py_ForgetReference. The version of _Py_Dealloc that's active when Py_TRACE_REFS is enabled does this (_Py_Dealloc is the element of Py_DECREF that performs the actual destruction). _Py_Dealloc first calls _Py_ForgetReference to remove the object from refchain, then calls the object's destructor (op->ob_type->tp_dealloc). If WANT_SUBCLASSABLE_TYPES is not defined (it is not in my case), the destructor for mxDateTime_Type is mxDateTime_Free. So, if a DateTime object is deallocated normally, as a result of its reference count falling to zero, _Py_Dealloc is called on the object, which first removes it from refchain, then passes it to mxDateTime_Free. If a DateTime object is destroyed prematurely, as a result of invalid arguments to its destructor, the onError handler calls mxDateTime_Free, so the object is "conceptually deallocated" (placed in the free list), *but* the object is not removed from refchain. So if a refchain-membership-integrity-check is performed on the object in question or one of its immediate neighbors in refchain, that integrity check fails, leading to the fatal error. --- The solution is to 'Py_DECREF(...)' the object in the onError handler of its constructor, instead of passing the object directly to mxDateTime_Free. That change solves two problems: 1) It causes _Py_Dealloc to execute, which in turn executes _Py_ForgetReference, so the object is removed from refchain, as it should be. 2) At present, objects that are created successfully and later deallocated by normal reference count mechanics have a reference count of 0 when they enter the free list, whereas objects whose constructors abort their creation due to invalid arguments have a reference count of 1 when they enter the free list. Although AFAIK this doesn't cause an actual execution problem (because the object's reference count is *explicitly set to 1* rather than *incremented by 1* when the object is later "conceptually allocated" by _Py_NewReference), it is likely to confuse future maintainers and thereby lead to the introduction of an actual execution problem. I assume that if you agree that this is a reasonable solution, you'll want to apply the change not only to mxDateTime_FromDateAndTime, but to all similar constructors in mxDateTime.c. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From rj at maxxian.com Thu May 5 01:57:40 2005 From: rj at maxxian.com (RJ Juneau) Date: Tue Feb 14 16:01:57 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c5512e$f72798c0$6505a8c0@rjlaptop> I'm on the 30 day evaluation for mxodbc_zope_da. I'm getting the following error when I submit some queries: Error Type: KeyError Error Value: 'query' I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 with UCS4. The error seems to be caused by multiple rows being returned. I did see an earlier posting with the same error message. The response suggested a template error, but this is clearly not the case here. The additional evidence I've gathered so far: - I'm running the test directly from the ZSQL method, so there's no template involved. - If I use the same query with an additional "where" clause to ensure that only one row is returned, it works - If I use a value in the 'where' clause with no rows returned, it works - The same ZSQL query is being used on a Windows machine running Zope and the free ZODBC module without a problem - The query has been verified directly in mysql-client-browser Other info: - The database is MySQL 4.1.10A-0 - iODBC is the DB driver RJ Juneau -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050505/68d278bf/attachment-0131.htm From mal at egenix.com Thu May 5 12:37:43 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Feb 14 16:01:57 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c5512e$f72798c0$6505a8c0@rjlaptop> References: <000301c5512e$f72798c0$6505a8c0@rjlaptop> Message-ID: <4279E967.6010904@egenix.com> RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 > with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 09:37:42 2005 From: rj at maxxian.com (RJ Juneau) Date: Tue Feb 14 16:01:57 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000101c5516f$3b96de90$6505a8c0@rjlaptop> More interesting info on the problem: If I execute the query directly in the "test" window of the base eGenix mxODBC Database Connection window, it works fine and returns the 20 lines expected. That could point to a problem in the rendering, which seems to be where the traceback ends. Note that within the same Zope system I also have an ODBC connection to a Sybase database, and I have successfully tested multi-line ZSQL queries there. This is the traceback: Time 2005/05/05 07:55:15.294 GMT-4 Exception Type KeyError Exception Value 'query' Traceback (innermost last): Module ZPublisher.Publish, line 101, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 39, in call_object Module Shared.DC.ZRDB.DA, line 337, in manage_test Module DocumentTemplate.DT_String, line 474, in __call__ Module DocumentTemplate.DT_In, line 602, in renderwb Module DocumentTemplate.DT_Var, line 219, in render KeyError: 'query' I don't think the following is an issue, but I'll include it for completeness.I am also getting the following iODBC warnings and errors in the Zope console log, which are related to the ODBC parameters being passed by iODBC. Note that these errors also appear for all of the successful queries. [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (Setup). [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (UsageCount). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Timeout). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Reuse). As for the ZSQL snippet from the template... Since there's no template involved yet (I'm still testing directly from the ZSQL method), I assume you mean the SQL code? select h.host_name, s.system_name, s.system_handle, count(*) from terminal t, system_map s, host h where t.system_index = s.system_index and s.host_index = h.host_index group by s.system_name order by h.host_name Nothing complicated here. There are no parameters passed to the query. RJ -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: May 5, 2005 5:38 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: Re: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is > 2.3.4 with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ---------------------------------------------------------------------- > -- > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 16:00:32 2005 From: charlie at egenix.com (Charlie Clark) Date: Tue Feb 14 16:01:57 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000101c5516f$3b96de90$6505a8c0@rjlaptop> References: <000101c5516f$3b96de90$6505a8c0@rjlaptop> Message-ID: <20050505150032.644.1@bepc.1115296715.fake> On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base eGenix > mxODBC Database Connection window, it works fine and returns the 20 > lines expected. That could point to a problem in the rendering, which > seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection to > a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 10:22:17 2005 From: rj at maxxian.com (RJ Juneau) Date: Tue Feb 14 16:01:57 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505150032.644.1@bepc.1115296715.fake> Message-ID: <000201c55175$75bcad10$6505a8c0@rjlaptop> At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 11:47:14 2005 From: rj at maxxian.com (RJ Juneau) Date: Tue Feb 14 16:01:57 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c55181$549be0e0$6505a8c0@rjlaptop> Charlie, I found a fix. Here it is in case anyone else runs into this. You were correct - the problem is in another part of Zope. Based on your feedback, I did a bit more searching and found something here: http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. html The problem appears to be in Zope versions after 2.7.0. I'm running 2.7.6, and the post indicates that it also happens in 2.7.4. The solution: Edit file /lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. There are two lines in the file that start with . Edit them as follows: Change first line to: Change second line to: Just to be after, I shut down Zope before I made the changes and restarted it after. Thanks for the help! RJ -----Original Message----- From: RJ Juneau [mailto:rj@maxxian.com] Sent: May 5, 2005 9:22 AM To: 'Charlie Clark' Cc: 'egenix-users@lists.egenix.com' Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 17:57:25 2005 From: charlie at egenix.com (Charlie Clark) Date: Tue Feb 14 16:01:57 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <20050505165725.3380.2@bepc.1115296715.fake> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Thu May 5 09:15:21 2005 From: charlie at egenix.com (Charlie Clark) Date: Tue Feb 14 16:01:57 2006 Subject: [Zope-DB] RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <000001c55185$41477730$6b00a8c0@fonacier.local> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________ Zope-DB mailing list Zope-DB@zope.org http://mail.zope.org/mailman/listinfo/zope-db From rj at maxxian.com Thu May 5 12:38:00 2005 From: rj at maxxian.com (RJ Juneau) Date: Tue Feb 14 16:01:57 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000001c55188$6b841eb0$6505a8c0@rjlaptop> I just double-checked. Zope-2.7.6-final. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 12:49:16 2005 From: rj at maxxian.com (RJ Juneau) Date: Tue Feb 14 16:01:57 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000501c55189$fe149ba0$6505a8c0@rjlaptop> Charlie, The fix has only been applied for 2.7.7, 2.8b2. The info is in the original bug report which is closed and can be found here: http://www.zope.org/Collectors/Zope/1745 RJ -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Fri May 6 11:50:09 2005 From: rj at maxxian.com (RJ Juneau) Date: Tue Feb 14 16:01:57 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC Message-ID: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Still on eval for the product. I cannot get a stable connection to Sybase via the iODBC drivers. - The Sybase ODBC connection - including a query - have been verified at the iODBC level. - The setup is already working well for ODBC connection to MySQL. Symptoms include: - If I click on "Open Connection", it still comes back with "Connection Closed" when I go to a ZSQL method - Using 'Connect on Demand' is not working either. - Clicking "Open Connection" gives me the following error: Connection string: DSN=lixbox_sybase; UID=sa; PWD=XXXXXXX Connection pool entry: 0 Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection rejected by data source', 7952) The odbc.ini definition for DSN "lixbox_sybase" is as follows: [lixbox_sybase] JetFix = No NoRowSetSizeLimit = No Description = Test connection to listbox Options = LIXBOX DSQUERY = SQLSERVER TDSHOST = lixbox TDSPORT = 5000 TDSVER = 5.0 SQLSERVER_CATALOG = N CURSOR_SENSITIVITY = LOW UserName = sa Password = XXXXXXXX ServerType = Sybase 10/11/12 Driver = /opt/openlink/lib/sql_mt_lt.so Database = pubs2 ReadOnly = no NoAutoCommit = No NoLoginBox = No FetchBufferSize = 60 Other relevant data: - Connecting via OpenLink's iODBC - Zope 2.7.6-final - Python 2.3.4 - Connection to Sybase has been successfully tested with iODBC, including issuing a query - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC connection RJ Juneau Chief Technology Officer Maxxian Integration Inc. 155 Westhampton Drive Thornhill, Ontario Canada L4J 7X2 E-mail: rj@maxxian.com Phone: +1 905 482 9429 Cell: +1 416 897 6682 Toll free: +1 866 758 9161 Fax: +1 647 722 2038 -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050506/aef33361/attachment-0131.htm From mal at egenix.com Fri May 6 18:27:37 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Feb 14 16:01:57 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC In-Reply-To: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> References: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Message-ID: <427B8CE9.1010601@egenix.com> RJ Juneau wrote: > Still on eval for the product. > > I cannot get a stable connection to Sybase via the iODBC drivers. > > - The Sybase ODBC connection - including a query - have been verified at > the iODBC level. > - The setup is already working well for ODBC connection to MySQL. > > Symptoms include: > > - If I click on "Open Connection", it still comes back with "Connection > Closed" when I go to a ZSQL method > - Using 'Connect on Demand' is not working either. > - Clicking "Open Connection" gives me the following error: > > Connection string: DSN=lixbox_sybase; > UID=sa; > PWD=XXXXXXX Try writing the connection string on one line and without whitespace. ODBC drivers sometimes have problems with this. > Connection pool entry: 0 > Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection > rejected by data source', 7952) This is a generic error that relates to authentication or firewall problems. It is possible that turning on ODBC tracing the ODBC manager will give more clues as to the real cause of the problem. > The odbc.ini definition for DSN "lixbox_sybase" is as follows: > > [lixbox_sybase] > JetFix = No > NoRowSetSizeLimit = No > Description = Test connection to listbox > Options = LIXBOX > DSQUERY = SQLSERVER > TDSHOST = lixbox > TDSPORT = 5000 > TDSVER = 5.0 > SQLSERVER_CATALOG = N > CURSOR_SENSITIVITY = LOW > UserName = sa > Password = XXXXXXXX > ServerType = Sybase 10/11/12 > Driver = /opt/openlink/lib/sql_mt_lt.so > Database = pubs2 > ReadOnly = no > NoAutoCommit = No > NoLoginBox = No > FetchBufferSize = 60 > > > Other relevant data: > - Connecting via OpenLink's iODBC > - Zope 2.7.6-final > - Python 2.3.4 > - Connection to Sybase has been successfully tested with iODBC, > including issuing a query > - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC > connection > > > > RJ Juneau > Chief Technology Officer > Maxxian Integration Inc. > 155 Westhampton Drive > Thornhill, Ontario > Canada L4J 7X2 > E-mail: rj@maxxian.com > Phone: +1 905 482 9429 > Cell: +1 416 897 6682 > Toll free: +1 866 758 9161 > Fax: +1 647 722 2038 > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 06 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From calisp at gmail.com Sun May 15 23:49:03 2005 From: calisp at gmail.com (calisp@gmail.com) Date: Tue Feb 14 16:01:57 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK Message-ID: Hi, I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the following error... 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the last phase of a two-phase commit. This shouldn't happen. Traceback (most recent call last): File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one jar.tpc_finish(self) File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish try: self._finish() File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could not perform COMMIT or ROLLBACK', 1023) What could be causing this? Can I get the mxODBCZopeDA source from somewhere? It would make debugging this much easier. Thanks, Calisp. From mal at egenix.com Mon May 16 13:52:12 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Feb 14 16:01:57 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK In-Reply-To: References: Message-ID: <42887B5C.4010109@egenix.com> calisp@gmail.com wrote: > Hi, > > I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with > unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the > following error... > > 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the > last phase of a two-phase commit. This shouldn't happen. > Traceback (most recent call last): > File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one > jar.tpc_finish(self) > File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish > try: self._finish() > File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish > File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler > ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could > not perform COMMIT or ROLLBACK', 1023) You should have a look at the database logs to see what prevented the commit from being completed. > What could be causing this? Hard to say: mxODBCZopeDA is trying to commit the transaction, but the driver or database failed to complete the request. The above error was generated by the ODBC driver. This could be network or DNS problems, or be related to a bug in FreeTDS (which is getting more stable with every new release, but should still be considered beta quality software at the moment). > Can I get the mxODBCZopeDA source from > somewhere? It would make debugging this much easier. Getting the source is not an option and won't help much either since the source of the problem is not mxODBCZopeDA. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 16 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Sun May 1 21:29:25 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Feb 14 20:01:24 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <427259F3.4090806@egenix.com> References: <20050427130906.52878.qmail@web30008.mail.mud.yahoo.com> <427259F3.4090806@egenix.com> Message-ID: <42752005.7080904@egenix.com> M.-A. Lemburg wrote: > David Rushby wrote: > >> --- "M.-A. Lemburg" wrote: >> >>> Are you using the standard mxDateTime build or one >>> with WANT_SUBCLASSABLE_TYPES defined... >> >> >> >> Presumably "the standard", since I just built with 'py24d setup.py >> build', making no attempt to enable special directives. >> >> >>> ... (mxDateTime_Deallocate is only used by the latter)? >> >> >> >> That's true in 2.1.0-2005-04-15, but not in 2.1.0b5. >> >> >>> In any case, please try our latest snapshot: >>> >>> >> >> http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-04-15.zip >> >>> to see if that makes any difference. >> >> >> >> I can't build it out of the box: > > > Hmm, looks like distutils' sdist command doesn't like our new > repository layout which uses symlinks (after we've switched to > subversion). > > We'll have to debug distutils first, I guess :-( Ok, we've found the problem and fixed it. Here's the new release (which does build out of the box at least on our boxes ;-): http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 01 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From davidrushby at yahoo.com Mon May 2 15:49:53 2005 From: davidrushby at yahoo.com (David Rushby) Date: Tue Feb 14 20:01:24 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Ok, we've found the problem and fixed it. Here's the new > release (which does build out of the box at least on our > boxes ;-): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip It does build now, but: py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" still behaves as it did when I submitted my original message: Fatal Python error: UNREF invalid object Aborted This is the same debug build of Python 2.4.1 that I was previously using, running the same configuration (CentOS Linux 4.0/i386, everything compiled with GCC 3.4.3). Have you examined my original claim as to the cause of the bug? __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 10:21:55 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Feb 14 20:01:24 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> References: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> Message-ID: <42772693.8050306@egenix.com> David Rushby wrote: > --- "M.-A. Lemburg" wrote: > >>Ok, we've found the problem and fixed it. Here's the new >>release (which does build out of the box at least on our >>boxes ;-): >> >> > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip > > It does build now, but: > py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" > still behaves as it did when I submitted my original message: > Fatal Python error: UNREF invalid object > Aborted > > This is the same debug build of Python 2.4.1 that I was previously > using, running the same configuration (CentOS Linux 4.0/i386, > everything compiled with GCC 3.4.3). > > Have you examined my original claim as to the cause of the bug? No. We haven't had time for looking into it. I'm not sure whether your analysis of the problem is correct: if you don't define WANT_SUBCLASSABLE_TYPES, the API mxDateTime_Deallocate() is neither defined nor used. Furthermore, PyObject_Del() is only called by mxDateTime_Free() if you have explicitely edited mxDateTime.c to disabled the free list #defines. In a standard build, PyObject_Del() is only called at module finalization time. Note that the reason we call mxDateTime_Free() in the constructor is that we don't want the destructor of the object to be called. Py_DECREF() would call the destructor (mxDateTime_Deallocate). It is possible that the debug code in Python complains about the refcount in the object not being 0 at the time the object is finalized (module finalization time), but I don't see any such checks in PyObject_Free() (which is what PyObject_Del() maps to). Again, all of this does not happen in regular non-debug Python builds. Please be aware that we don't support debug builds, so fixing the problem (if there is one - gcc has some serious optimization problems on some combinations of platform and version) will take a while. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 09:27:37 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Tue Feb 14 20:01:24 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 Message-ID: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Hi all- I am trying to build the mx-base package, v.2.0.6. This will be used with postgresql 7.3.9, psycopg 1.1.18, and Roundup 0.8.2. RHEL 3.0 Python 2.3 egenix-mx-base-2.0.6.tar.gz I performed a: /usr/local/bin/python2.3 setup.py install Everything looks proper with the exeception of this series of warning statements: ----------------- gcc -pthread -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fno-strict-aliasing -fPIC -Imx/BeeBase/mxBeeBase -I/usr/local/incl ude/python2.3 -I/usr/local/include -c mx/BeeBase/mxBeeBase/btr.c -o build/temp.linux-i686-2.3/mx/BeeBase/mxBeeBase/mxBeeBa se/mx/BeeBase/mxBeeBase/btr.o mx/BeeBase/mxBeeBase/btr.c: In function `dumpBuf': mx/BeeBase/mxBeeBase/btr.c:249: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:250: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:255: warning: unsigned int format, long unsigned int arg (arg 4) mx/BeeBase/mxBeeBase/btr.c:256: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c: In function `_validateTree': mx/BeeBase/mxBeeBase/btr.c:330: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:337: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:339: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:349: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:351: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 3) creating build/lib.linux-i686-2.3/mx/BeeBase creating build/lib.linux-i686-2.3/mx/BeeBase/mxBeeBase -------------- Would someone be kind enough to let me know whether these messages were expected, and if not, how I might resolve these? Thanks! DC __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 22:06:33 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Feb 14 20:01:24 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> References: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Message-ID: <4277CBB9.8020302@egenix.com> Dianne Chen wrote: > Hi all- > > I am trying to build the mx-base package, v.2.0.6. > This will be used with postgresql 7.3.9, psycopg > 1.1.18, and Roundup 0.8.2. > > RHEL 3.0 > Python 2.3 > egenix-mx-base-2.0.6.tar.gz > > I performed a: > > /usr/local/bin/python2.3 setup.py install > > Everything looks proper with the exeception of this > series of warning statements: > > ----------------- > ... > -------------- > > Would someone be kind enough to let me know whether > these messages were expected, and if not, how I might > resolve these? These warning can safely be ignored. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 13:41:14 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Tue Feb 14 20:01:24 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: 6667 Message-ID: <20050503194114.72091.qmail@web31414.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Dianne Chen wrote: > > Hi all- > > > > I am trying to build the mx-base package, v.2.0.6. > > This will be used with postgresql 7.3.9, psycopg > > 1.1.18, and Roundup 0.8.2. > > > > RHEL 3.0 > > Python 2.3 > > egenix-mx-base-2.0.6.tar.gz > > > > I performed a: > > > > /usr/local/bin/python2.3 setup.py install > > > > Everything looks proper with the exeception of > this > > series of warning statements: > > > > ----------------- > > ... > > -------------- > > > > Would someone be kind enough to let me know > whether > > these messages were expected, and if not, how I > might > > resolve these? > > These warning can safely be ignored. > > -- > Marc-Andre Lemburg > eGenix.com > Marc- Thank you very much for the reply. It helps greatly. With kind regards, DC __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From davidrushby at yahoo.com Tue May 3 17:18:46 2005 From: davidrushby at yahoo.com (David Rushby) Date: Tue Feb 14 20:01:24 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050503231846.35012.qmail@web30009.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > I'm not sure whether your analysis of the problem is correct... Indeed, my original analysis wasn't correct; I think this one is. The fatal error I'm complaining about only arises if the arguments to DateTime.DateTime are invalid, so that the object is deallocated in the onError block of mxDateTime_FromDateAndTime. If the object is created successfully, and later deallocated by Python's garbage collector, the fatal error doesn't arise. Here's my analysis of the problem: --- If the debugging directive Py_TRACE_REFS is enabled, as it is in my case, the Python interpreter maintains a doubly linked list of all Python objects (named refchain) via the _ob_next and _ob_prev pointers added to PyObject via _PyObject_HEAD_EXTRA. Each object is inserted into refchain by the _Py_AddToAllObjects call in _Py_NewReference, and removed from refchain by the _Py_ForgetReference call in _Py_Dealloc. _Py_ForgetReference performs an integrity check on the object being deallocated (op) to make sure that its neighbors in refchain recognize it. Specifically, _Py_ForgetReference verifies that the _ob_next pointer of the previous object in refchain (op->_ob_prev->_ob_next) points to op, and that the _ob_prev pointer of the next object in refchain (op->_ob_next->_ob_prev) points to op. If either of those conditions is false, the interpreter raises the fatal error I'm seeing. After mxDateTime_New pulls an mxDateTimeObject out of the free list, it calls _Py_NewReference on that object to transform it from a "conceptually deallocated" object to a "conceptually allocated" one. _Py_NewReference inserts the object into refchain. Later, when the object is being "conceptually deallocated", it should be removed from refchain with _Py_ForgetReference. The version of _Py_Dealloc that's active when Py_TRACE_REFS is enabled does this (_Py_Dealloc is the element of Py_DECREF that performs the actual destruction). _Py_Dealloc first calls _Py_ForgetReference to remove the object from refchain, then calls the object's destructor (op->ob_type->tp_dealloc). If WANT_SUBCLASSABLE_TYPES is not defined (it is not in my case), the destructor for mxDateTime_Type is mxDateTime_Free. So, if a DateTime object is deallocated normally, as a result of its reference count falling to zero, _Py_Dealloc is called on the object, which first removes it from refchain, then passes it to mxDateTime_Free. If a DateTime object is destroyed prematurely, as a result of invalid arguments to its destructor, the onError handler calls mxDateTime_Free, so the object is "conceptually deallocated" (placed in the free list), *but* the object is not removed from refchain. So if a refchain-membership-integrity-check is performed on the object in question or one of its immediate neighbors in refchain, that integrity check fails, leading to the fatal error. --- The solution is to 'Py_DECREF(...)' the object in the onError handler of its constructor, instead of passing the object directly to mxDateTime_Free. That change solves two problems: 1) It causes _Py_Dealloc to execute, which in turn executes _Py_ForgetReference, so the object is removed from refchain, as it should be. 2) At present, objects that are created successfully and later deallocated by normal reference count mechanics have a reference count of 0 when they enter the free list, whereas objects whose constructors abort their creation due to invalid arguments have a reference count of 1 when they enter the free list. Although AFAIK this doesn't cause an actual execution problem (because the object's reference count is *explicitly set to 1* rather than *incremented by 1* when the object is later "conceptually allocated" by _Py_NewReference), it is likely to confuse future maintainers and thereby lead to the introduction of an actual execution problem. I assume that if you agree that this is a reasonable solution, you'll want to apply the change not only to mxDateTime_FromDateAndTime, but to all similar constructors in mxDateTime.c. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From rj at maxxian.com Thu May 5 01:57:40 2005 From: rj at maxxian.com (RJ Juneau) Date: Tue Feb 14 20:01:24 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c5512e$f72798c0$6505a8c0@rjlaptop> I'm on the 30 day evaluation for mxodbc_zope_da. I'm getting the following error when I submit some queries: Error Type: KeyError Error Value: 'query' I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 with UCS4. The error seems to be caused by multiple rows being returned. I did see an earlier posting with the same error message. The response suggested a template error, but this is clearly not the case here. The additional evidence I've gathered so far: - I'm running the test directly from the ZSQL method, so there's no template involved. - If I use the same query with an additional "where" clause to ensure that only one row is returned, it works - If I use a value in the 'where' clause with no rows returned, it works - The same ZSQL query is being used on a Windows machine running Zope and the free ZODBC module without a problem - The query has been verified directly in mysql-client-browser Other info: - The database is MySQL 4.1.10A-0 - iODBC is the DB driver RJ Juneau -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050505/68d278bf/attachment-0132.htm From mal at egenix.com Thu May 5 12:37:43 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Feb 14 20:01:24 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c5512e$f72798c0$6505a8c0@rjlaptop> References: <000301c5512e$f72798c0$6505a8c0@rjlaptop> Message-ID: <4279E967.6010904@egenix.com> RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 > with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 09:37:42 2005 From: rj at maxxian.com (RJ Juneau) Date: Tue Feb 14 20:01:24 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000101c5516f$3b96de90$6505a8c0@rjlaptop> More interesting info on the problem: If I execute the query directly in the "test" window of the base eGenix mxODBC Database Connection window, it works fine and returns the 20 lines expected. That could point to a problem in the rendering, which seems to be where the traceback ends. Note that within the same Zope system I also have an ODBC connection to a Sybase database, and I have successfully tested multi-line ZSQL queries there. This is the traceback: Time 2005/05/05 07:55:15.294 GMT-4 Exception Type KeyError Exception Value 'query' Traceback (innermost last): Module ZPublisher.Publish, line 101, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 39, in call_object Module Shared.DC.ZRDB.DA, line 337, in manage_test Module DocumentTemplate.DT_String, line 474, in __call__ Module DocumentTemplate.DT_In, line 602, in renderwb Module DocumentTemplate.DT_Var, line 219, in render KeyError: 'query' I don't think the following is an issue, but I'll include it for completeness.I am also getting the following iODBC warnings and errors in the Zope console log, which are related to the ODBC parameters being passed by iODBC. Note that these errors also appear for all of the successful queries. [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (Setup). [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (UsageCount). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Timeout). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Reuse). As for the ZSQL snippet from the template... Since there's no template involved yet (I'm still testing directly from the ZSQL method), I assume you mean the SQL code? select h.host_name, s.system_name, s.system_handle, count(*) from terminal t, system_map s, host h where t.system_index = s.system_index and s.host_index = h.host_index group by s.system_name order by h.host_name Nothing complicated here. There are no parameters passed to the query. RJ -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: May 5, 2005 5:38 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: Re: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is > 2.3.4 with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ---------------------------------------------------------------------- > -- > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 16:00:32 2005 From: charlie at egenix.com (Charlie Clark) Date: Tue Feb 14 20:01:28 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000101c5516f$3b96de90$6505a8c0@rjlaptop> References: <000101c5516f$3b96de90$6505a8c0@rjlaptop> Message-ID: <20050505150032.644.1@bepc.1115296715.fake> On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base eGenix > mxODBC Database Connection window, it works fine and returns the 20 > lines expected. That could point to a problem in the rendering, which > seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection to > a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 10:22:17 2005 From: rj at maxxian.com (RJ Juneau) Date: Tue Feb 14 20:01:28 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505150032.644.1@bepc.1115296715.fake> Message-ID: <000201c55175$75bcad10$6505a8c0@rjlaptop> At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 11:47:14 2005 From: rj at maxxian.com (RJ Juneau) Date: Tue Feb 14 20:01:28 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c55181$549be0e0$6505a8c0@rjlaptop> Charlie, I found a fix. Here it is in case anyone else runs into this. You were correct - the problem is in another part of Zope. Based on your feedback, I did a bit more searching and found something here: http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. html The problem appears to be in Zope versions after 2.7.0. I'm running 2.7.6, and the post indicates that it also happens in 2.7.4. The solution: Edit file /lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. There are two lines in the file that start with . Edit them as follows: Change first line to: Change second line to: Just to be after, I shut down Zope before I made the changes and restarted it after. Thanks for the help! RJ -----Original Message----- From: RJ Juneau [mailto:rj@maxxian.com] Sent: May 5, 2005 9:22 AM To: 'Charlie Clark' Cc: 'egenix-users@lists.egenix.com' Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 17:57:25 2005 From: charlie at egenix.com (Charlie Clark) Date: Tue Feb 14 20:01:28 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <20050505165725.3380.2@bepc.1115296715.fake> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Thu May 5 09:15:21 2005 From: charlie at egenix.com (Charlie Clark) Date: Tue Feb 14 20:01:28 2006 Subject: [Zope-DB] RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <000001c55185$41477730$6b00a8c0@fonacier.local> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________ Zope-DB mailing list Zope-DB@zope.org http://mail.zope.org/mailman/listinfo/zope-db From rj at maxxian.com Thu May 5 12:38:00 2005 From: rj at maxxian.com (RJ Juneau) Date: Tue Feb 14 20:01:28 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000001c55188$6b841eb0$6505a8c0@rjlaptop> I just double-checked. Zope-2.7.6-final. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 12:49:16 2005 From: rj at maxxian.com (RJ Juneau) Date: Tue Feb 14 20:01:28 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000501c55189$fe149ba0$6505a8c0@rjlaptop> Charlie, The fix has only been applied for 2.7.7, 2.8b2. The info is in the original bug report which is closed and can be found here: http://www.zope.org/Collectors/Zope/1745 RJ -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Fri May 6 11:50:09 2005 From: rj at maxxian.com (RJ Juneau) Date: Tue Feb 14 20:01:28 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC Message-ID: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Still on eval for the product. I cannot get a stable connection to Sybase via the iODBC drivers. - The Sybase ODBC connection - including a query - have been verified at the iODBC level. - The setup is already working well for ODBC connection to MySQL. Symptoms include: - If I click on "Open Connection", it still comes back with "Connection Closed" when I go to a ZSQL method - Using 'Connect on Demand' is not working either. - Clicking "Open Connection" gives me the following error: Connection string: DSN=lixbox_sybase; UID=sa; PWD=XXXXXXX Connection pool entry: 0 Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection rejected by data source', 7952) The odbc.ini definition for DSN "lixbox_sybase" is as follows: [lixbox_sybase] JetFix = No NoRowSetSizeLimit = No Description = Test connection to listbox Options = LIXBOX DSQUERY = SQLSERVER TDSHOST = lixbox TDSPORT = 5000 TDSVER = 5.0 SQLSERVER_CATALOG = N CURSOR_SENSITIVITY = LOW UserName = sa Password = XXXXXXXX ServerType = Sybase 10/11/12 Driver = /opt/openlink/lib/sql_mt_lt.so Database = pubs2 ReadOnly = no NoAutoCommit = No NoLoginBox = No FetchBufferSize = 60 Other relevant data: - Connecting via OpenLink's iODBC - Zope 2.7.6-final - Python 2.3.4 - Connection to Sybase has been successfully tested with iODBC, including issuing a query - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC connection RJ Juneau Chief Technology Officer Maxxian Integration Inc. 155 Westhampton Drive Thornhill, Ontario Canada L4J 7X2 E-mail: rj@maxxian.com Phone: +1 905 482 9429 Cell: +1 416 897 6682 Toll free: +1 866 758 9161 Fax: +1 647 722 2038 -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050506/aef33361/attachment-0132.htm From mal at egenix.com Fri May 6 18:27:37 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Feb 14 20:01:28 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC In-Reply-To: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> References: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Message-ID: <427B8CE9.1010601@egenix.com> RJ Juneau wrote: > Still on eval for the product. > > I cannot get a stable connection to Sybase via the iODBC drivers. > > - The Sybase ODBC connection - including a query - have been verified at > the iODBC level. > - The setup is already working well for ODBC connection to MySQL. > > Symptoms include: > > - If I click on "Open Connection", it still comes back with "Connection > Closed" when I go to a ZSQL method > - Using 'Connect on Demand' is not working either. > - Clicking "Open Connection" gives me the following error: > > Connection string: DSN=lixbox_sybase; > UID=sa; > PWD=XXXXXXX Try writing the connection string on one line and without whitespace. ODBC drivers sometimes have problems with this. > Connection pool entry: 0 > Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection > rejected by data source', 7952) This is a generic error that relates to authentication or firewall problems. It is possible that turning on ODBC tracing the ODBC manager will give more clues as to the real cause of the problem. > The odbc.ini definition for DSN "lixbox_sybase" is as follows: > > [lixbox_sybase] > JetFix = No > NoRowSetSizeLimit = No > Description = Test connection to listbox > Options = LIXBOX > DSQUERY = SQLSERVER > TDSHOST = lixbox > TDSPORT = 5000 > TDSVER = 5.0 > SQLSERVER_CATALOG = N > CURSOR_SENSITIVITY = LOW > UserName = sa > Password = XXXXXXXX > ServerType = Sybase 10/11/12 > Driver = /opt/openlink/lib/sql_mt_lt.so > Database = pubs2 > ReadOnly = no > NoAutoCommit = No > NoLoginBox = No > FetchBufferSize = 60 > > > Other relevant data: > - Connecting via OpenLink's iODBC > - Zope 2.7.6-final > - Python 2.3.4 > - Connection to Sybase has been successfully tested with iODBC, > including issuing a query > - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC > connection > > > > RJ Juneau > Chief Technology Officer > Maxxian Integration Inc. > 155 Westhampton Drive > Thornhill, Ontario > Canada L4J 7X2 > E-mail: rj@maxxian.com > Phone: +1 905 482 9429 > Cell: +1 416 897 6682 > Toll free: +1 866 758 9161 > Fax: +1 647 722 2038 > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 06 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From calisp at gmail.com Sun May 15 23:49:03 2005 From: calisp at gmail.com (calisp@gmail.com) Date: Tue Feb 14 20:01:28 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK Message-ID: Hi, I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the following error... 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the last phase of a two-phase commit. This shouldn't happen. Traceback (most recent call last): File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one jar.tpc_finish(self) File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish try: self._finish() File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could not perform COMMIT or ROLLBACK', 1023) What could be causing this? Can I get the mxODBCZopeDA source from somewhere? It would make debugging this much easier. Thanks, Calisp. From mal at egenix.com Mon May 16 13:52:12 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Feb 14 20:01:28 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK In-Reply-To: References: Message-ID: <42887B5C.4010109@egenix.com> calisp@gmail.com wrote: > Hi, > > I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with > unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the > following error... > > 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the > last phase of a two-phase commit. This shouldn't happen. > Traceback (most recent call last): > File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one > jar.tpc_finish(self) > File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish > try: self._finish() > File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish > File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler > ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could > not perform COMMIT or ROLLBACK', 1023) You should have a look at the database logs to see what prevented the commit from being completed. > What could be causing this? Hard to say: mxODBCZopeDA is trying to commit the transaction, but the driver or database failed to complete the request. The above error was generated by the ODBC driver. This could be network or DNS problems, or be related to a bug in FreeTDS (which is getting more stable with every new release, but should still be considered beta quality software at the moment). > Can I get the mxODBCZopeDA source from > somewhere? It would make debugging this much easier. Getting the source is not an option and won't help much either since the source of the problem is not mxODBCZopeDA. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 16 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Sun May 1 21:29:25 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 15 08:33:03 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <427259F3.4090806@egenix.com> References: <20050427130906.52878.qmail@web30008.mail.mud.yahoo.com> <427259F3.4090806@egenix.com> Message-ID: <42752005.7080904@egenix.com> M.-A. Lemburg wrote: > David Rushby wrote: > >> --- "M.-A. Lemburg" wrote: >> >>> Are you using the standard mxDateTime build or one >>> with WANT_SUBCLASSABLE_TYPES defined... >> >> >> >> Presumably "the standard", since I just built with 'py24d setup.py >> build', making no attempt to enable special directives. >> >> >>> ... (mxDateTime_Deallocate is only used by the latter)? >> >> >> >> That's true in 2.1.0-2005-04-15, but not in 2.1.0b5. >> >> >>> In any case, please try our latest snapshot: >>> >>> >> >> http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-04-15.zip >> >>> to see if that makes any difference. >> >> >> >> I can't build it out of the box: > > > Hmm, looks like distutils' sdist command doesn't like our new > repository layout which uses symlinks (after we've switched to > subversion). > > We'll have to debug distutils first, I guess :-( Ok, we've found the problem and fixed it. Here's the new release (which does build out of the box at least on our boxes ;-): http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 01 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From davidrushby at yahoo.com Mon May 2 15:49:53 2005 From: davidrushby at yahoo.com (David Rushby) Date: Wed Feb 15 08:33:05 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Ok, we've found the problem and fixed it. Here's the new > release (which does build out of the box at least on our > boxes ;-): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip It does build now, but: py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" still behaves as it did when I submitted my original message: Fatal Python error: UNREF invalid object Aborted This is the same debug build of Python 2.4.1 that I was previously using, running the same configuration (CentOS Linux 4.0/i386, everything compiled with GCC 3.4.3). Have you examined my original claim as to the cause of the bug? __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 10:21:55 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 15 08:33:05 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> References: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> Message-ID: <42772693.8050306@egenix.com> David Rushby wrote: > --- "M.-A. Lemburg" wrote: > >>Ok, we've found the problem and fixed it. Here's the new >>release (which does build out of the box at least on our >>boxes ;-): >> >> > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip > > It does build now, but: > py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" > still behaves as it did when I submitted my original message: > Fatal Python error: UNREF invalid object > Aborted > > This is the same debug build of Python 2.4.1 that I was previously > using, running the same configuration (CentOS Linux 4.0/i386, > everything compiled with GCC 3.4.3). > > Have you examined my original claim as to the cause of the bug? No. We haven't had time for looking into it. I'm not sure whether your analysis of the problem is correct: if you don't define WANT_SUBCLASSABLE_TYPES, the API mxDateTime_Deallocate() is neither defined nor used. Furthermore, PyObject_Del() is only called by mxDateTime_Free() if you have explicitely edited mxDateTime.c to disabled the free list #defines. In a standard build, PyObject_Del() is only called at module finalization time. Note that the reason we call mxDateTime_Free() in the constructor is that we don't want the destructor of the object to be called. Py_DECREF() would call the destructor (mxDateTime_Deallocate). It is possible that the debug code in Python complains about the refcount in the object not being 0 at the time the object is finalized (module finalization time), but I don't see any such checks in PyObject_Free() (which is what PyObject_Del() maps to). Again, all of this does not happen in regular non-debug Python builds. Please be aware that we don't support debug builds, so fixing the problem (if there is one - gcc has some serious optimization problems on some combinations of platform and version) will take a while. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 09:27:37 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Wed Feb 15 08:33:05 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 Message-ID: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Hi all- I am trying to build the mx-base package, v.2.0.6. This will be used with postgresql 7.3.9, psycopg 1.1.18, and Roundup 0.8.2. RHEL 3.0 Python 2.3 egenix-mx-base-2.0.6.tar.gz I performed a: /usr/local/bin/python2.3 setup.py install Everything looks proper with the exeception of this series of warning statements: ----------------- gcc -pthread -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fno-strict-aliasing -fPIC -Imx/BeeBase/mxBeeBase -I/usr/local/incl ude/python2.3 -I/usr/local/include -c mx/BeeBase/mxBeeBase/btr.c -o build/temp.linux-i686-2.3/mx/BeeBase/mxBeeBase/mxBeeBa se/mx/BeeBase/mxBeeBase/btr.o mx/BeeBase/mxBeeBase/btr.c: In function `dumpBuf': mx/BeeBase/mxBeeBase/btr.c:249: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:250: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:255: warning: unsigned int format, long unsigned int arg (arg 4) mx/BeeBase/mxBeeBase/btr.c:256: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c: In function `_validateTree': mx/BeeBase/mxBeeBase/btr.c:330: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:337: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:339: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:349: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:351: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 3) creating build/lib.linux-i686-2.3/mx/BeeBase creating build/lib.linux-i686-2.3/mx/BeeBase/mxBeeBase -------------- Would someone be kind enough to let me know whether these messages were expected, and if not, how I might resolve these? Thanks! DC __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 22:06:33 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 15 08:33:05 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> References: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Message-ID: <4277CBB9.8020302@egenix.com> Dianne Chen wrote: > Hi all- > > I am trying to build the mx-base package, v.2.0.6. > This will be used with postgresql 7.3.9, psycopg > 1.1.18, and Roundup 0.8.2. > > RHEL 3.0 > Python 2.3 > egenix-mx-base-2.0.6.tar.gz > > I performed a: > > /usr/local/bin/python2.3 setup.py install > > Everything looks proper with the exeception of this > series of warning statements: > > ----------------- > ... > -------------- > > Would someone be kind enough to let me know whether > these messages were expected, and if not, how I might > resolve these? These warning can safely be ignored. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 13:41:14 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Wed Feb 15 08:33:06 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: 6667 Message-ID: <20050503194114.72091.qmail@web31414.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Dianne Chen wrote: > > Hi all- > > > > I am trying to build the mx-base package, v.2.0.6. > > This will be used with postgresql 7.3.9, psycopg > > 1.1.18, and Roundup 0.8.2. > > > > RHEL 3.0 > > Python 2.3 > > egenix-mx-base-2.0.6.tar.gz > > > > I performed a: > > > > /usr/local/bin/python2.3 setup.py install > > > > Everything looks proper with the exeception of > this > > series of warning statements: > > > > ----------------- > > ... > > -------------- > > > > Would someone be kind enough to let me know > whether > > these messages were expected, and if not, how I > might > > resolve these? > > These warning can safely be ignored. > > -- > Marc-Andre Lemburg > eGenix.com > Marc- Thank you very much for the reply. It helps greatly. With kind regards, DC __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From davidrushby at yahoo.com Tue May 3 17:18:46 2005 From: davidrushby at yahoo.com (David Rushby) Date: Wed Feb 15 08:33:06 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050503231846.35012.qmail@web30009.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > I'm not sure whether your analysis of the problem is correct... Indeed, my original analysis wasn't correct; I think this one is. The fatal error I'm complaining about only arises if the arguments to DateTime.DateTime are invalid, so that the object is deallocated in the onError block of mxDateTime_FromDateAndTime. If the object is created successfully, and later deallocated by Python's garbage collector, the fatal error doesn't arise. Here's my analysis of the problem: --- If the debugging directive Py_TRACE_REFS is enabled, as it is in my case, the Python interpreter maintains a doubly linked list of all Python objects (named refchain) via the _ob_next and _ob_prev pointers added to PyObject via _PyObject_HEAD_EXTRA. Each object is inserted into refchain by the _Py_AddToAllObjects call in _Py_NewReference, and removed from refchain by the _Py_ForgetReference call in _Py_Dealloc. _Py_ForgetReference performs an integrity check on the object being deallocated (op) to make sure that its neighbors in refchain recognize it. Specifically, _Py_ForgetReference verifies that the _ob_next pointer of the previous object in refchain (op->_ob_prev->_ob_next) points to op, and that the _ob_prev pointer of the next object in refchain (op->_ob_next->_ob_prev) points to op. If either of those conditions is false, the interpreter raises the fatal error I'm seeing. After mxDateTime_New pulls an mxDateTimeObject out of the free list, it calls _Py_NewReference on that object to transform it from a "conceptually deallocated" object to a "conceptually allocated" one. _Py_NewReference inserts the object into refchain. Later, when the object is being "conceptually deallocated", it should be removed from refchain with _Py_ForgetReference. The version of _Py_Dealloc that's active when Py_TRACE_REFS is enabled does this (_Py_Dealloc is the element of Py_DECREF that performs the actual destruction). _Py_Dealloc first calls _Py_ForgetReference to remove the object from refchain, then calls the object's destructor (op->ob_type->tp_dealloc). If WANT_SUBCLASSABLE_TYPES is not defined (it is not in my case), the destructor for mxDateTime_Type is mxDateTime_Free. So, if a DateTime object is deallocated normally, as a result of its reference count falling to zero, _Py_Dealloc is called on the object, which first removes it from refchain, then passes it to mxDateTime_Free. If a DateTime object is destroyed prematurely, as a result of invalid arguments to its destructor, the onError handler calls mxDateTime_Free, so the object is "conceptually deallocated" (placed in the free list), *but* the object is not removed from refchain. So if a refchain-membership-integrity-check is performed on the object in question or one of its immediate neighbors in refchain, that integrity check fails, leading to the fatal error. --- The solution is to 'Py_DECREF(...)' the object in the onError handler of its constructor, instead of passing the object directly to mxDateTime_Free. That change solves two problems: 1) It causes _Py_Dealloc to execute, which in turn executes _Py_ForgetReference, so the object is removed from refchain, as it should be. 2) At present, objects that are created successfully and later deallocated by normal reference count mechanics have a reference count of 0 when they enter the free list, whereas objects whose constructors abort their creation due to invalid arguments have a reference count of 1 when they enter the free list. Although AFAIK this doesn't cause an actual execution problem (because the object's reference count is *explicitly set to 1* rather than *incremented by 1* when the object is later "conceptually allocated" by _Py_NewReference), it is likely to confuse future maintainers and thereby lead to the introduction of an actual execution problem. I assume that if you agree that this is a reasonable solution, you'll want to apply the change not only to mxDateTime_FromDateAndTime, but to all similar constructors in mxDateTime.c. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From rj at maxxian.com Thu May 5 01:57:40 2005 From: rj at maxxian.com (RJ Juneau) Date: Wed Feb 15 08:33:09 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c5512e$f72798c0$6505a8c0@rjlaptop> I'm on the 30 day evaluation for mxodbc_zope_da. I'm getting the following error when I submit some queries: Error Type: KeyError Error Value: 'query' I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 with UCS4. The error seems to be caused by multiple rows being returned. I did see an earlier posting with the same error message. The response suggested a template error, but this is clearly not the case here. The additional evidence I've gathered so far: - I'm running the test directly from the ZSQL method, so there's no template involved. - If I use the same query with an additional "where" clause to ensure that only one row is returned, it works - If I use a value in the 'where' clause with no rows returned, it works - The same ZSQL query is being used on a Windows machine running Zope and the free ZODBC module without a problem - The query has been verified directly in mysql-client-browser Other info: - The database is MySQL 4.1.10A-0 - iODBC is the DB driver RJ Juneau -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050505/68d278bf/attachment-0133.htm From mal at egenix.com Thu May 5 12:37:43 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 15 08:33:09 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c5512e$f72798c0$6505a8c0@rjlaptop> References: <000301c5512e$f72798c0$6505a8c0@rjlaptop> Message-ID: <4279E967.6010904@egenix.com> RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 > with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 09:37:42 2005 From: rj at maxxian.com (RJ Juneau) Date: Wed Feb 15 08:33:09 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000101c5516f$3b96de90$6505a8c0@rjlaptop> More interesting info on the problem: If I execute the query directly in the "test" window of the base eGenix mxODBC Database Connection window, it works fine and returns the 20 lines expected. That could point to a problem in the rendering, which seems to be where the traceback ends. Note that within the same Zope system I also have an ODBC connection to a Sybase database, and I have successfully tested multi-line ZSQL queries there. This is the traceback: Time 2005/05/05 07:55:15.294 GMT-4 Exception Type KeyError Exception Value 'query' Traceback (innermost last): Module ZPublisher.Publish, line 101, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 39, in call_object Module Shared.DC.ZRDB.DA, line 337, in manage_test Module DocumentTemplate.DT_String, line 474, in __call__ Module DocumentTemplate.DT_In, line 602, in renderwb Module DocumentTemplate.DT_Var, line 219, in render KeyError: 'query' I don't think the following is an issue, but I'll include it for completeness.I am also getting the following iODBC warnings and errors in the Zope console log, which are related to the ODBC parameters being passed by iODBC. Note that these errors also appear for all of the successful queries. [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (Setup). [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (UsageCount). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Timeout). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Reuse). As for the ZSQL snippet from the template... Since there's no template involved yet (I'm still testing directly from the ZSQL method), I assume you mean the SQL code? select h.host_name, s.system_name, s.system_handle, count(*) from terminal t, system_map s, host h where t.system_index = s.system_index and s.host_index = h.host_index group by s.system_name order by h.host_name Nothing complicated here. There are no parameters passed to the query. RJ -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: May 5, 2005 5:38 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: Re: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is > 2.3.4 with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ---------------------------------------------------------------------- > -- > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 16:00:32 2005 From: charlie at egenix.com (Charlie Clark) Date: Wed Feb 15 08:33:09 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000101c5516f$3b96de90$6505a8c0@rjlaptop> References: <000101c5516f$3b96de90$6505a8c0@rjlaptop> Message-ID: <20050505150032.644.1@bepc.1115296715.fake> On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base eGenix > mxODBC Database Connection window, it works fine and returns the 20 > lines expected. That could point to a problem in the rendering, which > seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection to > a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 10:22:17 2005 From: rj at maxxian.com (RJ Juneau) Date: Wed Feb 15 08:33:09 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505150032.644.1@bepc.1115296715.fake> Message-ID: <000201c55175$75bcad10$6505a8c0@rjlaptop> At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 11:47:14 2005 From: rj at maxxian.com (RJ Juneau) Date: Wed Feb 15 08:33:09 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c55181$549be0e0$6505a8c0@rjlaptop> Charlie, I found a fix. Here it is in case anyone else runs into this. You were correct - the problem is in another part of Zope. Based on your feedback, I did a bit more searching and found something here: http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. html The problem appears to be in Zope versions after 2.7.0. I'm running 2.7.6, and the post indicates that it also happens in 2.7.4. The solution: Edit file /lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. There are two lines in the file that start with . Edit them as follows: Change first line to: Change second line to: Just to be after, I shut down Zope before I made the changes and restarted it after. Thanks for the help! RJ -----Original Message----- From: RJ Juneau [mailto:rj@maxxian.com] Sent: May 5, 2005 9:22 AM To: 'Charlie Clark' Cc: 'egenix-users@lists.egenix.com' Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 17:57:25 2005 From: charlie at egenix.com (Charlie Clark) Date: Wed Feb 15 08:33:09 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <20050505165725.3380.2@bepc.1115296715.fake> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Thu May 5 09:15:21 2005 From: charlie at egenix.com (Charlie Clark) Date: Wed Feb 15 08:33:10 2006 Subject: [Zope-DB] RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <000001c55185$41477730$6b00a8c0@fonacier.local> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________ Zope-DB mailing list Zope-DB@zope.org http://mail.zope.org/mailman/listinfo/zope-db From rj at maxxian.com Thu May 5 12:38:00 2005 From: rj at maxxian.com (RJ Juneau) Date: Wed Feb 15 08:33:10 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000001c55188$6b841eb0$6505a8c0@rjlaptop> I just double-checked. Zope-2.7.6-final. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 12:49:16 2005 From: rj at maxxian.com (RJ Juneau) Date: Wed Feb 15 08:33:10 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000501c55189$fe149ba0$6505a8c0@rjlaptop> Charlie, The fix has only been applied for 2.7.7, 2.8b2. The info is in the original bug report which is closed and can be found here: http://www.zope.org/Collectors/Zope/1745 RJ -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Fri May 6 11:50:09 2005 From: rj at maxxian.com (RJ Juneau) Date: Wed Feb 15 08:33:10 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC Message-ID: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Still on eval for the product. I cannot get a stable connection to Sybase via the iODBC drivers. - The Sybase ODBC connection - including a query - have been verified at the iODBC level. - The setup is already working well for ODBC connection to MySQL. Symptoms include: - If I click on "Open Connection", it still comes back with "Connection Closed" when I go to a ZSQL method - Using 'Connect on Demand' is not working either. - Clicking "Open Connection" gives me the following error: Connection string: DSN=lixbox_sybase; UID=sa; PWD=XXXXXXX Connection pool entry: 0 Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection rejected by data source', 7952) The odbc.ini definition for DSN "lixbox_sybase" is as follows: [lixbox_sybase] JetFix = No NoRowSetSizeLimit = No Description = Test connection to listbox Options = LIXBOX DSQUERY = SQLSERVER TDSHOST = lixbox TDSPORT = 5000 TDSVER = 5.0 SQLSERVER_CATALOG = N CURSOR_SENSITIVITY = LOW UserName = sa Password = XXXXXXXX ServerType = Sybase 10/11/12 Driver = /opt/openlink/lib/sql_mt_lt.so Database = pubs2 ReadOnly = no NoAutoCommit = No NoLoginBox = No FetchBufferSize = 60 Other relevant data: - Connecting via OpenLink's iODBC - Zope 2.7.6-final - Python 2.3.4 - Connection to Sybase has been successfully tested with iODBC, including issuing a query - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC connection RJ Juneau Chief Technology Officer Maxxian Integration Inc. 155 Westhampton Drive Thornhill, Ontario Canada L4J 7X2 E-mail: rj@maxxian.com Phone: +1 905 482 9429 Cell: +1 416 897 6682 Toll free: +1 866 758 9161 Fax: +1 647 722 2038 -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050506/aef33361/attachment-0133.htm From mal at egenix.com Fri May 6 18:27:37 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 15 08:33:11 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC In-Reply-To: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> References: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Message-ID: <427B8CE9.1010601@egenix.com> RJ Juneau wrote: > Still on eval for the product. > > I cannot get a stable connection to Sybase via the iODBC drivers. > > - The Sybase ODBC connection - including a query - have been verified at > the iODBC level. > - The setup is already working well for ODBC connection to MySQL. > > Symptoms include: > > - If I click on "Open Connection", it still comes back with "Connection > Closed" when I go to a ZSQL method > - Using 'Connect on Demand' is not working either. > - Clicking "Open Connection" gives me the following error: > > Connection string: DSN=lixbox_sybase; > UID=sa; > PWD=XXXXXXX Try writing the connection string on one line and without whitespace. ODBC drivers sometimes have problems with this. > Connection pool entry: 0 > Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection > rejected by data source', 7952) This is a generic error that relates to authentication or firewall problems. It is possible that turning on ODBC tracing the ODBC manager will give more clues as to the real cause of the problem. > The odbc.ini definition for DSN "lixbox_sybase" is as follows: > > [lixbox_sybase] > JetFix = No > NoRowSetSizeLimit = No > Description = Test connection to listbox > Options = LIXBOX > DSQUERY = SQLSERVER > TDSHOST = lixbox > TDSPORT = 5000 > TDSVER = 5.0 > SQLSERVER_CATALOG = N > CURSOR_SENSITIVITY = LOW > UserName = sa > Password = XXXXXXXX > ServerType = Sybase 10/11/12 > Driver = /opt/openlink/lib/sql_mt_lt.so > Database = pubs2 > ReadOnly = no > NoAutoCommit = No > NoLoginBox = No > FetchBufferSize = 60 > > > Other relevant data: > - Connecting via OpenLink's iODBC > - Zope 2.7.6-final > - Python 2.3.4 > - Connection to Sybase has been successfully tested with iODBC, > including issuing a query > - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC > connection > > > > RJ Juneau > Chief Technology Officer > Maxxian Integration Inc. > 155 Westhampton Drive > Thornhill, Ontario > Canada L4J 7X2 > E-mail: rj@maxxian.com > Phone: +1 905 482 9429 > Cell: +1 416 897 6682 > Toll free: +1 866 758 9161 > Fax: +1 647 722 2038 > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 06 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From calisp at gmail.com Sun May 15 23:49:03 2005 From: calisp at gmail.com (calisp@gmail.com) Date: Wed Feb 15 08:33:11 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK Message-ID: Hi, I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the following error... 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the last phase of a two-phase commit. This shouldn't happen. Traceback (most recent call last): File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one jar.tpc_finish(self) File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish try: self._finish() File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could not perform COMMIT or ROLLBACK', 1023) What could be causing this? Can I get the mxODBCZopeDA source from somewhere? It would make debugging this much easier. Thanks, Calisp. From mal at egenix.com Mon May 16 13:52:12 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 15 08:33:11 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK In-Reply-To: References: Message-ID: <42887B5C.4010109@egenix.com> calisp@gmail.com wrote: > Hi, > > I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with > unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the > following error... > > 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the > last phase of a two-phase commit. This shouldn't happen. > Traceback (most recent call last): > File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one > jar.tpc_finish(self) > File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish > try: self._finish() > File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish > File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler > ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could > not perform COMMIT or ROLLBACK', 1023) You should have a look at the database logs to see what prevented the commit from being completed. > What could be causing this? Hard to say: mxODBCZopeDA is trying to commit the transaction, but the driver or database failed to complete the request. The above error was generated by the ODBC driver. This could be network or DNS problems, or be related to a bug in FreeTDS (which is getting more stable with every new release, but should still be considered beta quality software at the moment). > Can I get the mxODBCZopeDA source from > somewhere? It would make debugging this much easier. Getting the source is not an option and won't help much either since the source of the problem is not mxODBCZopeDA. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 16 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Sun May 1 21:29:25 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 15 12:06:09 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <427259F3.4090806@egenix.com> References: <20050427130906.52878.qmail@web30008.mail.mud.yahoo.com> <427259F3.4090806@egenix.com> Message-ID: <42752005.7080904@egenix.com> M.-A. Lemburg wrote: > David Rushby wrote: > >> --- "M.-A. Lemburg" wrote: >> >>> Are you using the standard mxDateTime build or one >>> with WANT_SUBCLASSABLE_TYPES defined... >> >> >> >> Presumably "the standard", since I just built with 'py24d setup.py >> build', making no attempt to enable special directives. >> >> >>> ... (mxDateTime_Deallocate is only used by the latter)? >> >> >> >> That's true in 2.1.0-2005-04-15, but not in 2.1.0b5. >> >> >>> In any case, please try our latest snapshot: >>> >>> >> >> http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-04-15.zip >> >>> to see if that makes any difference. >> >> >> >> I can't build it out of the box: > > > Hmm, looks like distutils' sdist command doesn't like our new > repository layout which uses symlinks (after we've switched to > subversion). > > We'll have to debug distutils first, I guess :-( Ok, we've found the problem and fixed it. Here's the new release (which does build out of the box at least on our boxes ;-): http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 01 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From davidrushby at yahoo.com Mon May 2 15:49:53 2005 From: davidrushby at yahoo.com (David Rushby) Date: Wed Feb 15 12:06:09 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Ok, we've found the problem and fixed it. Here's the new > release (which does build out of the box at least on our > boxes ;-): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip It does build now, but: py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" still behaves as it did when I submitted my original message: Fatal Python error: UNREF invalid object Aborted This is the same debug build of Python 2.4.1 that I was previously using, running the same configuration (CentOS Linux 4.0/i386, everything compiled with GCC 3.4.3). Have you examined my original claim as to the cause of the bug? __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 10:21:55 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 15 12:06:09 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> References: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> Message-ID: <42772693.8050306@egenix.com> David Rushby wrote: > --- "M.-A. Lemburg" wrote: > >>Ok, we've found the problem and fixed it. Here's the new >>release (which does build out of the box at least on our >>boxes ;-): >> >> > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip > > It does build now, but: > py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" > still behaves as it did when I submitted my original message: > Fatal Python error: UNREF invalid object > Aborted > > This is the same debug build of Python 2.4.1 that I was previously > using, running the same configuration (CentOS Linux 4.0/i386, > everything compiled with GCC 3.4.3). > > Have you examined my original claim as to the cause of the bug? No. We haven't had time for looking into it. I'm not sure whether your analysis of the problem is correct: if you don't define WANT_SUBCLASSABLE_TYPES, the API mxDateTime_Deallocate() is neither defined nor used. Furthermore, PyObject_Del() is only called by mxDateTime_Free() if you have explicitely edited mxDateTime.c to disabled the free list #defines. In a standard build, PyObject_Del() is only called at module finalization time. Note that the reason we call mxDateTime_Free() in the constructor is that we don't want the destructor of the object to be called. Py_DECREF() would call the destructor (mxDateTime_Deallocate). It is possible that the debug code in Python complains about the refcount in the object not being 0 at the time the object is finalized (module finalization time), but I don't see any such checks in PyObject_Free() (which is what PyObject_Del() maps to). Again, all of this does not happen in regular non-debug Python builds. Please be aware that we don't support debug builds, so fixing the problem (if there is one - gcc has some serious optimization problems on some combinations of platform and version) will take a while. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 09:27:37 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Wed Feb 15 12:06:09 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 Message-ID: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Hi all- I am trying to build the mx-base package, v.2.0.6. This will be used with postgresql 7.3.9, psycopg 1.1.18, and Roundup 0.8.2. RHEL 3.0 Python 2.3 egenix-mx-base-2.0.6.tar.gz I performed a: /usr/local/bin/python2.3 setup.py install Everything looks proper with the exeception of this series of warning statements: ----------------- gcc -pthread -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fno-strict-aliasing -fPIC -Imx/BeeBase/mxBeeBase -I/usr/local/incl ude/python2.3 -I/usr/local/include -c mx/BeeBase/mxBeeBase/btr.c -o build/temp.linux-i686-2.3/mx/BeeBase/mxBeeBase/mxBeeBa se/mx/BeeBase/mxBeeBase/btr.o mx/BeeBase/mxBeeBase/btr.c: In function `dumpBuf': mx/BeeBase/mxBeeBase/btr.c:249: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:250: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:255: warning: unsigned int format, long unsigned int arg (arg 4) mx/BeeBase/mxBeeBase/btr.c:256: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c: In function `_validateTree': mx/BeeBase/mxBeeBase/btr.c:330: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:337: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:339: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:349: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:351: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 3) creating build/lib.linux-i686-2.3/mx/BeeBase creating build/lib.linux-i686-2.3/mx/BeeBase/mxBeeBase -------------- Would someone be kind enough to let me know whether these messages were expected, and if not, how I might resolve these? Thanks! DC __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 22:06:33 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 15 12:06:09 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> References: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Message-ID: <4277CBB9.8020302@egenix.com> Dianne Chen wrote: > Hi all- > > I am trying to build the mx-base package, v.2.0.6. > This will be used with postgresql 7.3.9, psycopg > 1.1.18, and Roundup 0.8.2. > > RHEL 3.0 > Python 2.3 > egenix-mx-base-2.0.6.tar.gz > > I performed a: > > /usr/local/bin/python2.3 setup.py install > > Everything looks proper with the exeception of this > series of warning statements: > > ----------------- > ... > -------------- > > Would someone be kind enough to let me know whether > these messages were expected, and if not, how I might > resolve these? These warning can safely be ignored. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 13:41:14 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Wed Feb 15 12:06:09 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: 6667 Message-ID: <20050503194114.72091.qmail@web31414.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Dianne Chen wrote: > > Hi all- > > > > I am trying to build the mx-base package, v.2.0.6. > > This will be used with postgresql 7.3.9, psycopg > > 1.1.18, and Roundup 0.8.2. > > > > RHEL 3.0 > > Python 2.3 > > egenix-mx-base-2.0.6.tar.gz > > > > I performed a: > > > > /usr/local/bin/python2.3 setup.py install > > > > Everything looks proper with the exeception of > this > > series of warning statements: > > > > ----------------- > > ... > > -------------- > > > > Would someone be kind enough to let me know > whether > > these messages were expected, and if not, how I > might > > resolve these? > > These warning can safely be ignored. > > -- > Marc-Andre Lemburg > eGenix.com > Marc- Thank you very much for the reply. It helps greatly. With kind regards, DC __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From davidrushby at yahoo.com Tue May 3 17:18:46 2005 From: davidrushby at yahoo.com (David Rushby) Date: Wed Feb 15 12:06:09 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050503231846.35012.qmail@web30009.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > I'm not sure whether your analysis of the problem is correct... Indeed, my original analysis wasn't correct; I think this one is. The fatal error I'm complaining about only arises if the arguments to DateTime.DateTime are invalid, so that the object is deallocated in the onError block of mxDateTime_FromDateAndTime. If the object is created successfully, and later deallocated by Python's garbage collector, the fatal error doesn't arise. Here's my analysis of the problem: --- If the debugging directive Py_TRACE_REFS is enabled, as it is in my case, the Python interpreter maintains a doubly linked list of all Python objects (named refchain) via the _ob_next and _ob_prev pointers added to PyObject via _PyObject_HEAD_EXTRA. Each object is inserted into refchain by the _Py_AddToAllObjects call in _Py_NewReference, and removed from refchain by the _Py_ForgetReference call in _Py_Dealloc. _Py_ForgetReference performs an integrity check on the object being deallocated (op) to make sure that its neighbors in refchain recognize it. Specifically, _Py_ForgetReference verifies that the _ob_next pointer of the previous object in refchain (op->_ob_prev->_ob_next) points to op, and that the _ob_prev pointer of the next object in refchain (op->_ob_next->_ob_prev) points to op. If either of those conditions is false, the interpreter raises the fatal error I'm seeing. After mxDateTime_New pulls an mxDateTimeObject out of the free list, it calls _Py_NewReference on that object to transform it from a "conceptually deallocated" object to a "conceptually allocated" one. _Py_NewReference inserts the object into refchain. Later, when the object is being "conceptually deallocated", it should be removed from refchain with _Py_ForgetReference. The version of _Py_Dealloc that's active when Py_TRACE_REFS is enabled does this (_Py_Dealloc is the element of Py_DECREF that performs the actual destruction). _Py_Dealloc first calls _Py_ForgetReference to remove the object from refchain, then calls the object's destructor (op->ob_type->tp_dealloc). If WANT_SUBCLASSABLE_TYPES is not defined (it is not in my case), the destructor for mxDateTime_Type is mxDateTime_Free. So, if a DateTime object is deallocated normally, as a result of its reference count falling to zero, _Py_Dealloc is called on the object, which first removes it from refchain, then passes it to mxDateTime_Free. If a DateTime object is destroyed prematurely, as a result of invalid arguments to its destructor, the onError handler calls mxDateTime_Free, so the object is "conceptually deallocated" (placed in the free list), *but* the object is not removed from refchain. So if a refchain-membership-integrity-check is performed on the object in question or one of its immediate neighbors in refchain, that integrity check fails, leading to the fatal error. --- The solution is to 'Py_DECREF(...)' the object in the onError handler of its constructor, instead of passing the object directly to mxDateTime_Free. That change solves two problems: 1) It causes _Py_Dealloc to execute, which in turn executes _Py_ForgetReference, so the object is removed from refchain, as it should be. 2) At present, objects that are created successfully and later deallocated by normal reference count mechanics have a reference count of 0 when they enter the free list, whereas objects whose constructors abort their creation due to invalid arguments have a reference count of 1 when they enter the free list. Although AFAIK this doesn't cause an actual execution problem (because the object's reference count is *explicitly set to 1* rather than *incremented by 1* when the object is later "conceptually allocated" by _Py_NewReference), it is likely to confuse future maintainers and thereby lead to the introduction of an actual execution problem. I assume that if you agree that this is a reasonable solution, you'll want to apply the change not only to mxDateTime_FromDateAndTime, but to all similar constructors in mxDateTime.c. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From rj at maxxian.com Thu May 5 01:57:40 2005 From: rj at maxxian.com (RJ Juneau) Date: Wed Feb 15 12:06:10 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c5512e$f72798c0$6505a8c0@rjlaptop> I'm on the 30 day evaluation for mxodbc_zope_da. I'm getting the following error when I submit some queries: Error Type: KeyError Error Value: 'query' I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 with UCS4. The error seems to be caused by multiple rows being returned. I did see an earlier posting with the same error message. The response suggested a template error, but this is clearly not the case here. The additional evidence I've gathered so far: - I'm running the test directly from the ZSQL method, so there's no template involved. - If I use the same query with an additional "where" clause to ensure that only one row is returned, it works - If I use a value in the 'where' clause with no rows returned, it works - The same ZSQL query is being used on a Windows machine running Zope and the free ZODBC module without a problem - The query has been verified directly in mysql-client-browser Other info: - The database is MySQL 4.1.10A-0 - iODBC is the DB driver RJ Juneau -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050505/68d278bf/attachment-0134.htm From mal at egenix.com Thu May 5 12:37:43 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 15 12:06:10 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c5512e$f72798c0$6505a8c0@rjlaptop> References: <000301c5512e$f72798c0$6505a8c0@rjlaptop> Message-ID: <4279E967.6010904@egenix.com> RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 > with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 09:37:42 2005 From: rj at maxxian.com (RJ Juneau) Date: Wed Feb 15 12:06:10 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000101c5516f$3b96de90$6505a8c0@rjlaptop> More interesting info on the problem: If I execute the query directly in the "test" window of the base eGenix mxODBC Database Connection window, it works fine and returns the 20 lines expected. That could point to a problem in the rendering, which seems to be where the traceback ends. Note that within the same Zope system I also have an ODBC connection to a Sybase database, and I have successfully tested multi-line ZSQL queries there. This is the traceback: Time 2005/05/05 07:55:15.294 GMT-4 Exception Type KeyError Exception Value 'query' Traceback (innermost last): Module ZPublisher.Publish, line 101, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 39, in call_object Module Shared.DC.ZRDB.DA, line 337, in manage_test Module DocumentTemplate.DT_String, line 474, in __call__ Module DocumentTemplate.DT_In, line 602, in renderwb Module DocumentTemplate.DT_Var, line 219, in render KeyError: 'query' I don't think the following is an issue, but I'll include it for completeness.I am also getting the following iODBC warnings and errors in the Zope console log, which are related to the ODBC parameters being passed by iODBC. Note that these errors also appear for all of the successful queries. [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (Setup). [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (UsageCount). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Timeout). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Reuse). As for the ZSQL snippet from the template... Since there's no template involved yet (I'm still testing directly from the ZSQL method), I assume you mean the SQL code? select h.host_name, s.system_name, s.system_handle, count(*) from terminal t, system_map s, host h where t.system_index = s.system_index and s.host_index = h.host_index group by s.system_name order by h.host_name Nothing complicated here. There are no parameters passed to the query. RJ -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: May 5, 2005 5:38 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: Re: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is > 2.3.4 with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ---------------------------------------------------------------------- > -- > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 16:00:32 2005 From: charlie at egenix.com (Charlie Clark) Date: Wed Feb 15 12:06:10 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000101c5516f$3b96de90$6505a8c0@rjlaptop> References: <000101c5516f$3b96de90$6505a8c0@rjlaptop> Message-ID: <20050505150032.644.1@bepc.1115296715.fake> On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base eGenix > mxODBC Database Connection window, it works fine and returns the 20 > lines expected. That could point to a problem in the rendering, which > seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection to > a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 10:22:17 2005 From: rj at maxxian.com (RJ Juneau) Date: Wed Feb 15 12:06:11 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505150032.644.1@bepc.1115296715.fake> Message-ID: <000201c55175$75bcad10$6505a8c0@rjlaptop> At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 11:47:14 2005 From: rj at maxxian.com (RJ Juneau) Date: Wed Feb 15 12:06:11 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c55181$549be0e0$6505a8c0@rjlaptop> Charlie, I found a fix. Here it is in case anyone else runs into this. You were correct - the problem is in another part of Zope. Based on your feedback, I did a bit more searching and found something here: http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. html The problem appears to be in Zope versions after 2.7.0. I'm running 2.7.6, and the post indicates that it also happens in 2.7.4. The solution: Edit file /lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. There are two lines in the file that start with . Edit them as follows: Change first line to: Change second line to: Just to be after, I shut down Zope before I made the changes and restarted it after. Thanks for the help! RJ -----Original Message----- From: RJ Juneau [mailto:rj@maxxian.com] Sent: May 5, 2005 9:22 AM To: 'Charlie Clark' Cc: 'egenix-users@lists.egenix.com' Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 17:57:25 2005 From: charlie at egenix.com (Charlie Clark) Date: Wed Feb 15 12:06:11 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <20050505165725.3380.2@bepc.1115296715.fake> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Thu May 5 09:15:21 2005 From: charlie at egenix.com (Charlie Clark) Date: Wed Feb 15 12:06:11 2006 Subject: [Zope-DB] RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <000001c55185$41477730$6b00a8c0@fonacier.local> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________ Zope-DB mailing list Zope-DB@zope.org http://mail.zope.org/mailman/listinfo/zope-db From rj at maxxian.com Thu May 5 12:38:00 2005 From: rj at maxxian.com (RJ Juneau) Date: Wed Feb 15 12:06:11 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000001c55188$6b841eb0$6505a8c0@rjlaptop> I just double-checked. Zope-2.7.6-final. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 12:49:16 2005 From: rj at maxxian.com (RJ Juneau) Date: Wed Feb 15 12:06:11 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000501c55189$fe149ba0$6505a8c0@rjlaptop> Charlie, The fix has only been applied for 2.7.7, 2.8b2. The info is in the original bug report which is closed and can be found here: http://www.zope.org/Collectors/Zope/1745 RJ -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Fri May 6 11:50:09 2005 From: rj at maxxian.com (RJ Juneau) Date: Wed Feb 15 12:06:11 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC Message-ID: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Still on eval for the product. I cannot get a stable connection to Sybase via the iODBC drivers. - The Sybase ODBC connection - including a query - have been verified at the iODBC level. - The setup is already working well for ODBC connection to MySQL. Symptoms include: - If I click on "Open Connection", it still comes back with "Connection Closed" when I go to a ZSQL method - Using 'Connect on Demand' is not working either. - Clicking "Open Connection" gives me the following error: Connection string: DSN=lixbox_sybase; UID=sa; PWD=XXXXXXX Connection pool entry: 0 Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection rejected by data source', 7952) The odbc.ini definition for DSN "lixbox_sybase" is as follows: [lixbox_sybase] JetFix = No NoRowSetSizeLimit = No Description = Test connection to listbox Options = LIXBOX DSQUERY = SQLSERVER TDSHOST = lixbox TDSPORT = 5000 TDSVER = 5.0 SQLSERVER_CATALOG = N CURSOR_SENSITIVITY = LOW UserName = sa Password = XXXXXXXX ServerType = Sybase 10/11/12 Driver = /opt/openlink/lib/sql_mt_lt.so Database = pubs2 ReadOnly = no NoAutoCommit = No NoLoginBox = No FetchBufferSize = 60 Other relevant data: - Connecting via OpenLink's iODBC - Zope 2.7.6-final - Python 2.3.4 - Connection to Sybase has been successfully tested with iODBC, including issuing a query - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC connection RJ Juneau Chief Technology Officer Maxxian Integration Inc. 155 Westhampton Drive Thornhill, Ontario Canada L4J 7X2 E-mail: rj@maxxian.com Phone: +1 905 482 9429 Cell: +1 416 897 6682 Toll free: +1 866 758 9161 Fax: +1 647 722 2038 -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050506/aef33361/attachment-0134.htm From mal at egenix.com Fri May 6 18:27:37 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 15 12:06:11 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC In-Reply-To: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> References: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Message-ID: <427B8CE9.1010601@egenix.com> RJ Juneau wrote: > Still on eval for the product. > > I cannot get a stable connection to Sybase via the iODBC drivers. > > - The Sybase ODBC connection - including a query - have been verified at > the iODBC level. > - The setup is already working well for ODBC connection to MySQL. > > Symptoms include: > > - If I click on "Open Connection", it still comes back with "Connection > Closed" when I go to a ZSQL method > - Using 'Connect on Demand' is not working either. > - Clicking "Open Connection" gives me the following error: > > Connection string: DSN=lixbox_sybase; > UID=sa; > PWD=XXXXXXX Try writing the connection string on one line and without whitespace. ODBC drivers sometimes have problems with this. > Connection pool entry: 0 > Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection > rejected by data source', 7952) This is a generic error that relates to authentication or firewall problems. It is possible that turning on ODBC tracing the ODBC manager will give more clues as to the real cause of the problem. > The odbc.ini definition for DSN "lixbox_sybase" is as follows: > > [lixbox_sybase] > JetFix = No > NoRowSetSizeLimit = No > Description = Test connection to listbox > Options = LIXBOX > DSQUERY = SQLSERVER > TDSHOST = lixbox > TDSPORT = 5000 > TDSVER = 5.0 > SQLSERVER_CATALOG = N > CURSOR_SENSITIVITY = LOW > UserName = sa > Password = XXXXXXXX > ServerType = Sybase 10/11/12 > Driver = /opt/openlink/lib/sql_mt_lt.so > Database = pubs2 > ReadOnly = no > NoAutoCommit = No > NoLoginBox = No > FetchBufferSize = 60 > > > Other relevant data: > - Connecting via OpenLink's iODBC > - Zope 2.7.6-final > - Python 2.3.4 > - Connection to Sybase has been successfully tested with iODBC, > including issuing a query > - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC > connection > > > > RJ Juneau > Chief Technology Officer > Maxxian Integration Inc. > 155 Westhampton Drive > Thornhill, Ontario > Canada L4J 7X2 > E-mail: rj@maxxian.com > Phone: +1 905 482 9429 > Cell: +1 416 897 6682 > Toll free: +1 866 758 9161 > Fax: +1 647 722 2038 > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 06 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From calisp at gmail.com Sun May 15 23:49:03 2005 From: calisp at gmail.com (calisp@gmail.com) Date: Wed Feb 15 12:06:11 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK Message-ID: Hi, I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the following error... 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the last phase of a two-phase commit. This shouldn't happen. Traceback (most recent call last): File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one jar.tpc_finish(self) File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish try: self._finish() File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could not perform COMMIT or ROLLBACK', 1023) What could be causing this? Can I get the mxODBCZopeDA source from somewhere? It would make debugging this much easier. Thanks, Calisp. From mal at egenix.com Mon May 16 13:52:12 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 15 12:06:11 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK In-Reply-To: References: Message-ID: <42887B5C.4010109@egenix.com> calisp@gmail.com wrote: > Hi, > > I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with > unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the > following error... > > 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the > last phase of a two-phase commit. This shouldn't happen. > Traceback (most recent call last): > File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one > jar.tpc_finish(self) > File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish > try: self._finish() > File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish > File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler > ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could > not perform COMMIT or ROLLBACK', 1023) You should have a look at the database logs to see what prevented the commit from being completed. > What could be causing this? Hard to say: mxODBCZopeDA is trying to commit the transaction, but the driver or database failed to complete the request. The above error was generated by the ODBC driver. This could be network or DNS problems, or be related to a bug in FreeTDS (which is getting more stable with every new release, but should still be considered beta quality software at the moment). > Can I get the mxODBCZopeDA source from > somewhere? It would make debugging this much easier. Getting the source is not an option and won't help much either since the source of the problem is not mxODBCZopeDA. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 16 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Sun May 1 21:29:25 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 15 16:01:50 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <427259F3.4090806@egenix.com> References: <20050427130906.52878.qmail@web30008.mail.mud.yahoo.com> <427259F3.4090806@egenix.com> Message-ID: <42752005.7080904@egenix.com> M.-A. Lemburg wrote: > David Rushby wrote: > >> --- "M.-A. Lemburg" wrote: >> >>> Are you using the standard mxDateTime build or one >>> with WANT_SUBCLASSABLE_TYPES defined... >> >> >> >> Presumably "the standard", since I just built with 'py24d setup.py >> build', making no attempt to enable special directives. >> >> >>> ... (mxDateTime_Deallocate is only used by the latter)? >> >> >> >> That's true in 2.1.0-2005-04-15, but not in 2.1.0b5. >> >> >>> In any case, please try our latest snapshot: >>> >>> >> >> http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-04-15.zip >> >>> to see if that makes any difference. >> >> >> >> I can't build it out of the box: > > > Hmm, looks like distutils' sdist command doesn't like our new > repository layout which uses symlinks (after we've switched to > subversion). > > We'll have to debug distutils first, I guess :-( Ok, we've found the problem and fixed it. Here's the new release (which does build out of the box at least on our boxes ;-): http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 01 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From davidrushby at yahoo.com Mon May 2 15:49:53 2005 From: davidrushby at yahoo.com (David Rushby) Date: Wed Feb 15 16:01:50 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Ok, we've found the problem and fixed it. Here's the new > release (which does build out of the box at least on our > boxes ;-): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip It does build now, but: py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" still behaves as it did when I submitted my original message: Fatal Python error: UNREF invalid object Aborted This is the same debug build of Python 2.4.1 that I was previously using, running the same configuration (CentOS Linux 4.0/i386, everything compiled with GCC 3.4.3). Have you examined my original claim as to the cause of the bug? __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 10:21:55 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 15 16:01:50 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> References: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> Message-ID: <42772693.8050306@egenix.com> David Rushby wrote: > --- "M.-A. Lemburg" wrote: > >>Ok, we've found the problem and fixed it. Here's the new >>release (which does build out of the box at least on our >>boxes ;-): >> >> > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip > > It does build now, but: > py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" > still behaves as it did when I submitted my original message: > Fatal Python error: UNREF invalid object > Aborted > > This is the same debug build of Python 2.4.1 that I was previously > using, running the same configuration (CentOS Linux 4.0/i386, > everything compiled with GCC 3.4.3). > > Have you examined my original claim as to the cause of the bug? No. We haven't had time for looking into it. I'm not sure whether your analysis of the problem is correct: if you don't define WANT_SUBCLASSABLE_TYPES, the API mxDateTime_Deallocate() is neither defined nor used. Furthermore, PyObject_Del() is only called by mxDateTime_Free() if you have explicitely edited mxDateTime.c to disabled the free list #defines. In a standard build, PyObject_Del() is only called at module finalization time. Note that the reason we call mxDateTime_Free() in the constructor is that we don't want the destructor of the object to be called. Py_DECREF() would call the destructor (mxDateTime_Deallocate). It is possible that the debug code in Python complains about the refcount in the object not being 0 at the time the object is finalized (module finalization time), but I don't see any such checks in PyObject_Free() (which is what PyObject_Del() maps to). Again, all of this does not happen in regular non-debug Python builds. Please be aware that we don't support debug builds, so fixing the problem (if there is one - gcc has some serious optimization problems on some combinations of platform and version) will take a while. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 09:27:37 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Wed Feb 15 16:01:50 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 Message-ID: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Hi all- I am trying to build the mx-base package, v.2.0.6. This will be used with postgresql 7.3.9, psycopg 1.1.18, and Roundup 0.8.2. RHEL 3.0 Python 2.3 egenix-mx-base-2.0.6.tar.gz I performed a: /usr/local/bin/python2.3 setup.py install Everything looks proper with the exeception of this series of warning statements: ----------------- gcc -pthread -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fno-strict-aliasing -fPIC -Imx/BeeBase/mxBeeBase -I/usr/local/incl ude/python2.3 -I/usr/local/include -c mx/BeeBase/mxBeeBase/btr.c -o build/temp.linux-i686-2.3/mx/BeeBase/mxBeeBase/mxBeeBa se/mx/BeeBase/mxBeeBase/btr.o mx/BeeBase/mxBeeBase/btr.c: In function `dumpBuf': mx/BeeBase/mxBeeBase/btr.c:249: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:250: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:255: warning: unsigned int format, long unsigned int arg (arg 4) mx/BeeBase/mxBeeBase/btr.c:256: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c: In function `_validateTree': mx/BeeBase/mxBeeBase/btr.c:330: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:337: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:339: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:349: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:351: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 3) creating build/lib.linux-i686-2.3/mx/BeeBase creating build/lib.linux-i686-2.3/mx/BeeBase/mxBeeBase -------------- Would someone be kind enough to let me know whether these messages were expected, and if not, how I might resolve these? Thanks! DC __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 22:06:33 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 15 16:01:50 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> References: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Message-ID: <4277CBB9.8020302@egenix.com> Dianne Chen wrote: > Hi all- > > I am trying to build the mx-base package, v.2.0.6. > This will be used with postgresql 7.3.9, psycopg > 1.1.18, and Roundup 0.8.2. > > RHEL 3.0 > Python 2.3 > egenix-mx-base-2.0.6.tar.gz > > I performed a: > > /usr/local/bin/python2.3 setup.py install > > Everything looks proper with the exeception of this > series of warning statements: > > ----------------- > ... > -------------- > > Would someone be kind enough to let me know whether > these messages were expected, and if not, how I might > resolve these? These warning can safely be ignored. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 13:41:14 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Wed Feb 15 16:01:50 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: 6667 Message-ID: <20050503194114.72091.qmail@web31414.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Dianne Chen wrote: > > Hi all- > > > > I am trying to build the mx-base package, v.2.0.6. > > This will be used with postgresql 7.3.9, psycopg > > 1.1.18, and Roundup 0.8.2. > > > > RHEL 3.0 > > Python 2.3 > > egenix-mx-base-2.0.6.tar.gz > > > > I performed a: > > > > /usr/local/bin/python2.3 setup.py install > > > > Everything looks proper with the exeception of > this > > series of warning statements: > > > > ----------------- > > ... > > -------------- > > > > Would someone be kind enough to let me know > whether > > these messages were expected, and if not, how I > might > > resolve these? > > These warning can safely be ignored. > > -- > Marc-Andre Lemburg > eGenix.com > Marc- Thank you very much for the reply. It helps greatly. With kind regards, DC __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From davidrushby at yahoo.com Tue May 3 17:18:46 2005 From: davidrushby at yahoo.com (David Rushby) Date: Wed Feb 15 16:01:50 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050503231846.35012.qmail@web30009.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > I'm not sure whether your analysis of the problem is correct... Indeed, my original analysis wasn't correct; I think this one is. The fatal error I'm complaining about only arises if the arguments to DateTime.DateTime are invalid, so that the object is deallocated in the onError block of mxDateTime_FromDateAndTime. If the object is created successfully, and later deallocated by Python's garbage collector, the fatal error doesn't arise. Here's my analysis of the problem: --- If the debugging directive Py_TRACE_REFS is enabled, as it is in my case, the Python interpreter maintains a doubly linked list of all Python objects (named refchain) via the _ob_next and _ob_prev pointers added to PyObject via _PyObject_HEAD_EXTRA. Each object is inserted into refchain by the _Py_AddToAllObjects call in _Py_NewReference, and removed from refchain by the _Py_ForgetReference call in _Py_Dealloc. _Py_ForgetReference performs an integrity check on the object being deallocated (op) to make sure that its neighbors in refchain recognize it. Specifically, _Py_ForgetReference verifies that the _ob_next pointer of the previous object in refchain (op->_ob_prev->_ob_next) points to op, and that the _ob_prev pointer of the next object in refchain (op->_ob_next->_ob_prev) points to op. If either of those conditions is false, the interpreter raises the fatal error I'm seeing. After mxDateTime_New pulls an mxDateTimeObject out of the free list, it calls _Py_NewReference on that object to transform it from a "conceptually deallocated" object to a "conceptually allocated" one. _Py_NewReference inserts the object into refchain. Later, when the object is being "conceptually deallocated", it should be removed from refchain with _Py_ForgetReference. The version of _Py_Dealloc that's active when Py_TRACE_REFS is enabled does this (_Py_Dealloc is the element of Py_DECREF that performs the actual destruction). _Py_Dealloc first calls _Py_ForgetReference to remove the object from refchain, then calls the object's destructor (op->ob_type->tp_dealloc). If WANT_SUBCLASSABLE_TYPES is not defined (it is not in my case), the destructor for mxDateTime_Type is mxDateTime_Free. So, if a DateTime object is deallocated normally, as a result of its reference count falling to zero, _Py_Dealloc is called on the object, which first removes it from refchain, then passes it to mxDateTime_Free. If a DateTime object is destroyed prematurely, as a result of invalid arguments to its destructor, the onError handler calls mxDateTime_Free, so the object is "conceptually deallocated" (placed in the free list), *but* the object is not removed from refchain. So if a refchain-membership-integrity-check is performed on the object in question or one of its immediate neighbors in refchain, that integrity check fails, leading to the fatal error. --- The solution is to 'Py_DECREF(...)' the object in the onError handler of its constructor, instead of passing the object directly to mxDateTime_Free. That change solves two problems: 1) It causes _Py_Dealloc to execute, which in turn executes _Py_ForgetReference, so the object is removed from refchain, as it should be. 2) At present, objects that are created successfully and later deallocated by normal reference count mechanics have a reference count of 0 when they enter the free list, whereas objects whose constructors abort their creation due to invalid arguments have a reference count of 1 when they enter the free list. Although AFAIK this doesn't cause an actual execution problem (because the object's reference count is *explicitly set to 1* rather than *incremented by 1* when the object is later "conceptually allocated" by _Py_NewReference), it is likely to confuse future maintainers and thereby lead to the introduction of an actual execution problem. I assume that if you agree that this is a reasonable solution, you'll want to apply the change not only to mxDateTime_FromDateAndTime, but to all similar constructors in mxDateTime.c. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From rj at maxxian.com Thu May 5 01:57:40 2005 From: rj at maxxian.com (RJ Juneau) Date: Wed Feb 15 16:01:50 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c5512e$f72798c0$6505a8c0@rjlaptop> I'm on the 30 day evaluation for mxodbc_zope_da. I'm getting the following error when I submit some queries: Error Type: KeyError Error Value: 'query' I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 with UCS4. The error seems to be caused by multiple rows being returned. I did see an earlier posting with the same error message. The response suggested a template error, but this is clearly not the case here. The additional evidence I've gathered so far: - I'm running the test directly from the ZSQL method, so there's no template involved. - If I use the same query with an additional "where" clause to ensure that only one row is returned, it works - If I use a value in the 'where' clause with no rows returned, it works - The same ZSQL query is being used on a Windows machine running Zope and the free ZODBC module without a problem - The query has been verified directly in mysql-client-browser Other info: - The database is MySQL 4.1.10A-0 - iODBC is the DB driver RJ Juneau -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050505/68d278bf/attachment-0135.htm From mal at egenix.com Thu May 5 12:37:43 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 15 16:01:50 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c5512e$f72798c0$6505a8c0@rjlaptop> References: <000301c5512e$f72798c0$6505a8c0@rjlaptop> Message-ID: <4279E967.6010904@egenix.com> RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 > with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 09:37:42 2005 From: rj at maxxian.com (RJ Juneau) Date: Wed Feb 15 16:01:50 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000101c5516f$3b96de90$6505a8c0@rjlaptop> More interesting info on the problem: If I execute the query directly in the "test" window of the base eGenix mxODBC Database Connection window, it works fine and returns the 20 lines expected. That could point to a problem in the rendering, which seems to be where the traceback ends. Note that within the same Zope system I also have an ODBC connection to a Sybase database, and I have successfully tested multi-line ZSQL queries there. This is the traceback: Time 2005/05/05 07:55:15.294 GMT-4 Exception Type KeyError Exception Value 'query' Traceback (innermost last): Module ZPublisher.Publish, line 101, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 39, in call_object Module Shared.DC.ZRDB.DA, line 337, in manage_test Module DocumentTemplate.DT_String, line 474, in __call__ Module DocumentTemplate.DT_In, line 602, in renderwb Module DocumentTemplate.DT_Var, line 219, in render KeyError: 'query' I don't think the following is an issue, but I'll include it for completeness.I am also getting the following iODBC warnings and errors in the Zope console log, which are related to the ODBC parameters being passed by iODBC. Note that these errors also appear for all of the successful queries. [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (Setup). [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (UsageCount). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Timeout). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Reuse). As for the ZSQL snippet from the template... Since there's no template involved yet (I'm still testing directly from the ZSQL method), I assume you mean the SQL code? select h.host_name, s.system_name, s.system_handle, count(*) from terminal t, system_map s, host h where t.system_index = s.system_index and s.host_index = h.host_index group by s.system_name order by h.host_name Nothing complicated here. There are no parameters passed to the query. RJ -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: May 5, 2005 5:38 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: Re: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is > 2.3.4 with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ---------------------------------------------------------------------- > -- > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 16:00:32 2005 From: charlie at egenix.com (Charlie Clark) Date: Wed Feb 15 16:01:50 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000101c5516f$3b96de90$6505a8c0@rjlaptop> References: <000101c5516f$3b96de90$6505a8c0@rjlaptop> Message-ID: <20050505150032.644.1@bepc.1115296715.fake> On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base eGenix > mxODBC Database Connection window, it works fine and returns the 20 > lines expected. That could point to a problem in the rendering, which > seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection to > a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 10:22:17 2005 From: rj at maxxian.com (RJ Juneau) Date: Wed Feb 15 16:01:50 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505150032.644.1@bepc.1115296715.fake> Message-ID: <000201c55175$75bcad10$6505a8c0@rjlaptop> At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 11:47:14 2005 From: rj at maxxian.com (RJ Juneau) Date: Wed Feb 15 16:01:50 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c55181$549be0e0$6505a8c0@rjlaptop> Charlie, I found a fix. Here it is in case anyone else runs into this. You were correct - the problem is in another part of Zope. Based on your feedback, I did a bit more searching and found something here: http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. html The problem appears to be in Zope versions after 2.7.0. I'm running 2.7.6, and the post indicates that it also happens in 2.7.4. The solution: Edit file /lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. There are two lines in the file that start with . Edit them as follows: Change first line to: Change second line to: Just to be after, I shut down Zope before I made the changes and restarted it after. Thanks for the help! RJ -----Original Message----- From: RJ Juneau [mailto:rj@maxxian.com] Sent: May 5, 2005 9:22 AM To: 'Charlie Clark' Cc: 'egenix-users@lists.egenix.com' Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 17:57:25 2005 From: charlie at egenix.com (Charlie Clark) Date: Wed Feb 15 16:01:50 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <20050505165725.3380.2@bepc.1115296715.fake> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Thu May 5 09:15:21 2005 From: charlie at egenix.com (Charlie Clark) Date: Wed Feb 15 16:01:50 2006 Subject: [Zope-DB] RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <000001c55185$41477730$6b00a8c0@fonacier.local> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________ Zope-DB mailing list Zope-DB@zope.org http://mail.zope.org/mailman/listinfo/zope-db From rj at maxxian.com Thu May 5 12:38:00 2005 From: rj at maxxian.com (RJ Juneau) Date: Wed Feb 15 16:01:50 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000001c55188$6b841eb0$6505a8c0@rjlaptop> I just double-checked. Zope-2.7.6-final. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 12:49:16 2005 From: rj at maxxian.com (RJ Juneau) Date: Wed Feb 15 16:01:50 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000501c55189$fe149ba0$6505a8c0@rjlaptop> Charlie, The fix has only been applied for 2.7.7, 2.8b2. The info is in the original bug report which is closed and can be found here: http://www.zope.org/Collectors/Zope/1745 RJ -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Fri May 6 11:50:09 2005 From: rj at maxxian.com (RJ Juneau) Date: Wed Feb 15 16:01:50 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC Message-ID: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Still on eval for the product. I cannot get a stable connection to Sybase via the iODBC drivers. - The Sybase ODBC connection - including a query - have been verified at the iODBC level. - The setup is already working well for ODBC connection to MySQL. Symptoms include: - If I click on "Open Connection", it still comes back with "Connection Closed" when I go to a ZSQL method - Using 'Connect on Demand' is not working either. - Clicking "Open Connection" gives me the following error: Connection string: DSN=lixbox_sybase; UID=sa; PWD=XXXXXXX Connection pool entry: 0 Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection rejected by data source', 7952) The odbc.ini definition for DSN "lixbox_sybase" is as follows: [lixbox_sybase] JetFix = No NoRowSetSizeLimit = No Description = Test connection to listbox Options = LIXBOX DSQUERY = SQLSERVER TDSHOST = lixbox TDSPORT = 5000 TDSVER = 5.0 SQLSERVER_CATALOG = N CURSOR_SENSITIVITY = LOW UserName = sa Password = XXXXXXXX ServerType = Sybase 10/11/12 Driver = /opt/openlink/lib/sql_mt_lt.so Database = pubs2 ReadOnly = no NoAutoCommit = No NoLoginBox = No FetchBufferSize = 60 Other relevant data: - Connecting via OpenLink's iODBC - Zope 2.7.6-final - Python 2.3.4 - Connection to Sybase has been successfully tested with iODBC, including issuing a query - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC connection RJ Juneau Chief Technology Officer Maxxian Integration Inc. 155 Westhampton Drive Thornhill, Ontario Canada L4J 7X2 E-mail: rj@maxxian.com Phone: +1 905 482 9429 Cell: +1 416 897 6682 Toll free: +1 866 758 9161 Fax: +1 647 722 2038 -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050506/aef33361/attachment-0135.htm From mal at egenix.com Fri May 6 18:27:37 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 15 16:01:51 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC In-Reply-To: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> References: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Message-ID: <427B8CE9.1010601@egenix.com> RJ Juneau wrote: > Still on eval for the product. > > I cannot get a stable connection to Sybase via the iODBC drivers. > > - The Sybase ODBC connection - including a query - have been verified at > the iODBC level. > - The setup is already working well for ODBC connection to MySQL. > > Symptoms include: > > - If I click on "Open Connection", it still comes back with "Connection > Closed" when I go to a ZSQL method > - Using 'Connect on Demand' is not working either. > - Clicking "Open Connection" gives me the following error: > > Connection string: DSN=lixbox_sybase; > UID=sa; > PWD=XXXXXXX Try writing the connection string on one line and without whitespace. ODBC drivers sometimes have problems with this. > Connection pool entry: 0 > Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection > rejected by data source', 7952) This is a generic error that relates to authentication or firewall problems. It is possible that turning on ODBC tracing the ODBC manager will give more clues as to the real cause of the problem. > The odbc.ini definition for DSN "lixbox_sybase" is as follows: > > [lixbox_sybase] > JetFix = No > NoRowSetSizeLimit = No > Description = Test connection to listbox > Options = LIXBOX > DSQUERY = SQLSERVER > TDSHOST = lixbox > TDSPORT = 5000 > TDSVER = 5.0 > SQLSERVER_CATALOG = N > CURSOR_SENSITIVITY = LOW > UserName = sa > Password = XXXXXXXX > ServerType = Sybase 10/11/12 > Driver = /opt/openlink/lib/sql_mt_lt.so > Database = pubs2 > ReadOnly = no > NoAutoCommit = No > NoLoginBox = No > FetchBufferSize = 60 > > > Other relevant data: > - Connecting via OpenLink's iODBC > - Zope 2.7.6-final > - Python 2.3.4 > - Connection to Sybase has been successfully tested with iODBC, > including issuing a query > - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC > connection > > > > RJ Juneau > Chief Technology Officer > Maxxian Integration Inc. > 155 Westhampton Drive > Thornhill, Ontario > Canada L4J 7X2 > E-mail: rj@maxxian.com > Phone: +1 905 482 9429 > Cell: +1 416 897 6682 > Toll free: +1 866 758 9161 > Fax: +1 647 722 2038 > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 06 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From calisp at gmail.com Sun May 15 23:49:03 2005 From: calisp at gmail.com (calisp@gmail.com) Date: Wed Feb 15 16:01:51 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK Message-ID: Hi, I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the following error... 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the last phase of a two-phase commit. This shouldn't happen. Traceback (most recent call last): File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one jar.tpc_finish(self) File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish try: self._finish() File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could not perform COMMIT or ROLLBACK', 1023) What could be causing this? Can I get the mxODBCZopeDA source from somewhere? It would make debugging this much easier. Thanks, Calisp. From mal at egenix.com Mon May 16 13:52:12 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 15 16:01:51 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK In-Reply-To: References: Message-ID: <42887B5C.4010109@egenix.com> calisp@gmail.com wrote: > Hi, > > I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with > unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the > following error... > > 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the > last phase of a two-phase commit. This shouldn't happen. > Traceback (most recent call last): > File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one > jar.tpc_finish(self) > File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish > try: self._finish() > File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish > File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler > ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could > not perform COMMIT or ROLLBACK', 1023) You should have a look at the database logs to see what prevented the commit from being completed. > What could be causing this? Hard to say: mxODBCZopeDA is trying to commit the transaction, but the driver or database failed to complete the request. The above error was generated by the ODBC driver. This could be network or DNS problems, or be related to a bug in FreeTDS (which is getting more stable with every new release, but should still be considered beta quality software at the moment). > Can I get the mxODBCZopeDA source from > somewhere? It would make debugging this much easier. Getting the source is not an option and won't help much either since the source of the problem is not mxODBCZopeDA. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 16 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Sun May 1 21:29:25 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 15 19:28:28 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <427259F3.4090806@egenix.com> References: <20050427130906.52878.qmail@web30008.mail.mud.yahoo.com> <427259F3.4090806@egenix.com> Message-ID: <42752005.7080904@egenix.com> M.-A. Lemburg wrote: > David Rushby wrote: > >> --- "M.-A. Lemburg" wrote: >> >>> Are you using the standard mxDateTime build or one >>> with WANT_SUBCLASSABLE_TYPES defined... >> >> >> >> Presumably "the standard", since I just built with 'py24d setup.py >> build', making no attempt to enable special directives. >> >> >>> ... (mxDateTime_Deallocate is only used by the latter)? >> >> >> >> That's true in 2.1.0-2005-04-15, but not in 2.1.0b5. >> >> >>> In any case, please try our latest snapshot: >>> >>> >> >> http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-04-15.zip >> >>> to see if that makes any difference. >> >> >> >> I can't build it out of the box: > > > Hmm, looks like distutils' sdist command doesn't like our new > repository layout which uses symlinks (after we've switched to > subversion). > > We'll have to debug distutils first, I guess :-( Ok, we've found the problem and fixed it. Here's the new release (which does build out of the box at least on our boxes ;-): http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 01 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From davidrushby at yahoo.com Mon May 2 15:49:53 2005 From: davidrushby at yahoo.com (David Rushby) Date: Wed Feb 15 19:28:28 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Ok, we've found the problem and fixed it. Here's the new > release (which does build out of the box at least on our > boxes ;-): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip It does build now, but: py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" still behaves as it did when I submitted my original message: Fatal Python error: UNREF invalid object Aborted This is the same debug build of Python 2.4.1 that I was previously using, running the same configuration (CentOS Linux 4.0/i386, everything compiled with GCC 3.4.3). Have you examined my original claim as to the cause of the bug? __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 10:21:55 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 15 19:28:28 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> References: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> Message-ID: <42772693.8050306@egenix.com> David Rushby wrote: > --- "M.-A. Lemburg" wrote: > >>Ok, we've found the problem and fixed it. Here's the new >>release (which does build out of the box at least on our >>boxes ;-): >> >> > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip > > It does build now, but: > py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" > still behaves as it did when I submitted my original message: > Fatal Python error: UNREF invalid object > Aborted > > This is the same debug build of Python 2.4.1 that I was previously > using, running the same configuration (CentOS Linux 4.0/i386, > everything compiled with GCC 3.4.3). > > Have you examined my original claim as to the cause of the bug? No. We haven't had time for looking into it. I'm not sure whether your analysis of the problem is correct: if you don't define WANT_SUBCLASSABLE_TYPES, the API mxDateTime_Deallocate() is neither defined nor used. Furthermore, PyObject_Del() is only called by mxDateTime_Free() if you have explicitely edited mxDateTime.c to disabled the free list #defines. In a standard build, PyObject_Del() is only called at module finalization time. Note that the reason we call mxDateTime_Free() in the constructor is that we don't want the destructor of the object to be called. Py_DECREF() would call the destructor (mxDateTime_Deallocate). It is possible that the debug code in Python complains about the refcount in the object not being 0 at the time the object is finalized (module finalization time), but I don't see any such checks in PyObject_Free() (which is what PyObject_Del() maps to). Again, all of this does not happen in regular non-debug Python builds. Please be aware that we don't support debug builds, so fixing the problem (if there is one - gcc has some serious optimization problems on some combinations of platform and version) will take a while. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 09:27:37 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Wed Feb 15 19:28:28 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 Message-ID: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Hi all- I am trying to build the mx-base package, v.2.0.6. This will be used with postgresql 7.3.9, psycopg 1.1.18, and Roundup 0.8.2. RHEL 3.0 Python 2.3 egenix-mx-base-2.0.6.tar.gz I performed a: /usr/local/bin/python2.3 setup.py install Everything looks proper with the exeception of this series of warning statements: ----------------- gcc -pthread -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fno-strict-aliasing -fPIC -Imx/BeeBase/mxBeeBase -I/usr/local/incl ude/python2.3 -I/usr/local/include -c mx/BeeBase/mxBeeBase/btr.c -o build/temp.linux-i686-2.3/mx/BeeBase/mxBeeBase/mxBeeBa se/mx/BeeBase/mxBeeBase/btr.o mx/BeeBase/mxBeeBase/btr.c: In function `dumpBuf': mx/BeeBase/mxBeeBase/btr.c:249: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:250: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:255: warning: unsigned int format, long unsigned int arg (arg 4) mx/BeeBase/mxBeeBase/btr.c:256: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c: In function `_validateTree': mx/BeeBase/mxBeeBase/btr.c:330: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:337: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:339: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:349: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:351: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 3) creating build/lib.linux-i686-2.3/mx/BeeBase creating build/lib.linux-i686-2.3/mx/BeeBase/mxBeeBase -------------- Would someone be kind enough to let me know whether these messages were expected, and if not, how I might resolve these? Thanks! DC __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 22:06:33 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 15 19:28:28 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> References: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Message-ID: <4277CBB9.8020302@egenix.com> Dianne Chen wrote: > Hi all- > > I am trying to build the mx-base package, v.2.0.6. > This will be used with postgresql 7.3.9, psycopg > 1.1.18, and Roundup 0.8.2. > > RHEL 3.0 > Python 2.3 > egenix-mx-base-2.0.6.tar.gz > > I performed a: > > /usr/local/bin/python2.3 setup.py install > > Everything looks proper with the exeception of this > series of warning statements: > > ----------------- > ... > -------------- > > Would someone be kind enough to let me know whether > these messages were expected, and if not, how I might > resolve these? These warning can safely be ignored. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 13:41:14 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Wed Feb 15 19:28:28 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: 6667 Message-ID: <20050503194114.72091.qmail@web31414.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Dianne Chen wrote: > > Hi all- > > > > I am trying to build the mx-base package, v.2.0.6. > > This will be used with postgresql 7.3.9, psycopg > > 1.1.18, and Roundup 0.8.2. > > > > RHEL 3.0 > > Python 2.3 > > egenix-mx-base-2.0.6.tar.gz > > > > I performed a: > > > > /usr/local/bin/python2.3 setup.py install > > > > Everything looks proper with the exeception of > this > > series of warning statements: > > > > ----------------- > > ... > > -------------- > > > > Would someone be kind enough to let me know > whether > > these messages were expected, and if not, how I > might > > resolve these? > > These warning can safely be ignored. > > -- > Marc-Andre Lemburg > eGenix.com > Marc- Thank you very much for the reply. It helps greatly. With kind regards, DC __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From davidrushby at yahoo.com Tue May 3 17:18:46 2005 From: davidrushby at yahoo.com (David Rushby) Date: Wed Feb 15 19:28:28 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050503231846.35012.qmail@web30009.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > I'm not sure whether your analysis of the problem is correct... Indeed, my original analysis wasn't correct; I think this one is. The fatal error I'm complaining about only arises if the arguments to DateTime.DateTime are invalid, so that the object is deallocated in the onError block of mxDateTime_FromDateAndTime. If the object is created successfully, and later deallocated by Python's garbage collector, the fatal error doesn't arise. Here's my analysis of the problem: --- If the debugging directive Py_TRACE_REFS is enabled, as it is in my case, the Python interpreter maintains a doubly linked list of all Python objects (named refchain) via the _ob_next and _ob_prev pointers added to PyObject via _PyObject_HEAD_EXTRA. Each object is inserted into refchain by the _Py_AddToAllObjects call in _Py_NewReference, and removed from refchain by the _Py_ForgetReference call in _Py_Dealloc. _Py_ForgetReference performs an integrity check on the object being deallocated (op) to make sure that its neighbors in refchain recognize it. Specifically, _Py_ForgetReference verifies that the _ob_next pointer of the previous object in refchain (op->_ob_prev->_ob_next) points to op, and that the _ob_prev pointer of the next object in refchain (op->_ob_next->_ob_prev) points to op. If either of those conditions is false, the interpreter raises the fatal error I'm seeing. After mxDateTime_New pulls an mxDateTimeObject out of the free list, it calls _Py_NewReference on that object to transform it from a "conceptually deallocated" object to a "conceptually allocated" one. _Py_NewReference inserts the object into refchain. Later, when the object is being "conceptually deallocated", it should be removed from refchain with _Py_ForgetReference. The version of _Py_Dealloc that's active when Py_TRACE_REFS is enabled does this (_Py_Dealloc is the element of Py_DECREF that performs the actual destruction). _Py_Dealloc first calls _Py_ForgetReference to remove the object from refchain, then calls the object's destructor (op->ob_type->tp_dealloc). If WANT_SUBCLASSABLE_TYPES is not defined (it is not in my case), the destructor for mxDateTime_Type is mxDateTime_Free. So, if a DateTime object is deallocated normally, as a result of its reference count falling to zero, _Py_Dealloc is called on the object, which first removes it from refchain, then passes it to mxDateTime_Free. If a DateTime object is destroyed prematurely, as a result of invalid arguments to its destructor, the onError handler calls mxDateTime_Free, so the object is "conceptually deallocated" (placed in the free list), *but* the object is not removed from refchain. So if a refchain-membership-integrity-check is performed on the object in question or one of its immediate neighbors in refchain, that integrity check fails, leading to the fatal error. --- The solution is to 'Py_DECREF(...)' the object in the onError handler of its constructor, instead of passing the object directly to mxDateTime_Free. That change solves two problems: 1) It causes _Py_Dealloc to execute, which in turn executes _Py_ForgetReference, so the object is removed from refchain, as it should be. 2) At present, objects that are created successfully and later deallocated by normal reference count mechanics have a reference count of 0 when they enter the free list, whereas objects whose constructors abort their creation due to invalid arguments have a reference count of 1 when they enter the free list. Although AFAIK this doesn't cause an actual execution problem (because the object's reference count is *explicitly set to 1* rather than *incremented by 1* when the object is later "conceptually allocated" by _Py_NewReference), it is likely to confuse future maintainers and thereby lead to the introduction of an actual execution problem. I assume that if you agree that this is a reasonable solution, you'll want to apply the change not only to mxDateTime_FromDateAndTime, but to all similar constructors in mxDateTime.c. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From rj at maxxian.com Thu May 5 01:57:40 2005 From: rj at maxxian.com (RJ Juneau) Date: Wed Feb 15 19:28:28 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c5512e$f72798c0$6505a8c0@rjlaptop> I'm on the 30 day evaluation for mxodbc_zope_da. I'm getting the following error when I submit some queries: Error Type: KeyError Error Value: 'query' I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 with UCS4. The error seems to be caused by multiple rows being returned. I did see an earlier posting with the same error message. The response suggested a template error, but this is clearly not the case here. The additional evidence I've gathered so far: - I'm running the test directly from the ZSQL method, so there's no template involved. - If I use the same query with an additional "where" clause to ensure that only one row is returned, it works - If I use a value in the 'where' clause with no rows returned, it works - The same ZSQL query is being used on a Windows machine running Zope and the free ZODBC module without a problem - The query has been verified directly in mysql-client-browser Other info: - The database is MySQL 4.1.10A-0 - iODBC is the DB driver RJ Juneau -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050505/68d278bf/attachment-0136.htm From mal at egenix.com Thu May 5 12:37:43 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 15 19:28:28 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c5512e$f72798c0$6505a8c0@rjlaptop> References: <000301c5512e$f72798c0$6505a8c0@rjlaptop> Message-ID: <4279E967.6010904@egenix.com> RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 > with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 09:37:42 2005 From: rj at maxxian.com (RJ Juneau) Date: Wed Feb 15 19:28:28 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000101c5516f$3b96de90$6505a8c0@rjlaptop> More interesting info on the problem: If I execute the query directly in the "test" window of the base eGenix mxODBC Database Connection window, it works fine and returns the 20 lines expected. That could point to a problem in the rendering, which seems to be where the traceback ends. Note that within the same Zope system I also have an ODBC connection to a Sybase database, and I have successfully tested multi-line ZSQL queries there. This is the traceback: Time 2005/05/05 07:55:15.294 GMT-4 Exception Type KeyError Exception Value 'query' Traceback (innermost last): Module ZPublisher.Publish, line 101, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 39, in call_object Module Shared.DC.ZRDB.DA, line 337, in manage_test Module DocumentTemplate.DT_String, line 474, in __call__ Module DocumentTemplate.DT_In, line 602, in renderwb Module DocumentTemplate.DT_Var, line 219, in render KeyError: 'query' I don't think the following is an issue, but I'll include it for completeness.I am also getting the following iODBC warnings and errors in the Zope console log, which are related to the ODBC parameters being passed by iODBC. Note that these errors also appear for all of the successful queries. [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (Setup). [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (UsageCount). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Timeout). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Reuse). As for the ZSQL snippet from the template... Since there's no template involved yet (I'm still testing directly from the ZSQL method), I assume you mean the SQL code? select h.host_name, s.system_name, s.system_handle, count(*) from terminal t, system_map s, host h where t.system_index = s.system_index and s.host_index = h.host_index group by s.system_name order by h.host_name Nothing complicated here. There are no parameters passed to the query. RJ -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: May 5, 2005 5:38 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: Re: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is > 2.3.4 with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ---------------------------------------------------------------------- > -- > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 16:00:32 2005 From: charlie at egenix.com (Charlie Clark) Date: Wed Feb 15 19:28:28 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000101c5516f$3b96de90$6505a8c0@rjlaptop> References: <000101c5516f$3b96de90$6505a8c0@rjlaptop> Message-ID: <20050505150032.644.1@bepc.1115296715.fake> On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base eGenix > mxODBC Database Connection window, it works fine and returns the 20 > lines expected. That could point to a problem in the rendering, which > seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection to > a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 10:22:17 2005 From: rj at maxxian.com (RJ Juneau) Date: Wed Feb 15 19:28:28 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505150032.644.1@bepc.1115296715.fake> Message-ID: <000201c55175$75bcad10$6505a8c0@rjlaptop> At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 11:47:14 2005 From: rj at maxxian.com (RJ Juneau) Date: Wed Feb 15 19:28:28 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c55181$549be0e0$6505a8c0@rjlaptop> Charlie, I found a fix. Here it is in case anyone else runs into this. You were correct - the problem is in another part of Zope. Based on your feedback, I did a bit more searching and found something here: http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. html The problem appears to be in Zope versions after 2.7.0. I'm running 2.7.6, and the post indicates that it also happens in 2.7.4. The solution: Edit file /lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. There are two lines in the file that start with . Edit them as follows: Change first line to: Change second line to: Just to be after, I shut down Zope before I made the changes and restarted it after. Thanks for the help! RJ -----Original Message----- From: RJ Juneau [mailto:rj@maxxian.com] Sent: May 5, 2005 9:22 AM To: 'Charlie Clark' Cc: 'egenix-users@lists.egenix.com' Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 17:57:25 2005 From: charlie at egenix.com (Charlie Clark) Date: Wed Feb 15 19:28:28 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <20050505165725.3380.2@bepc.1115296715.fake> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Thu May 5 09:15:21 2005 From: charlie at egenix.com (Charlie Clark) Date: Wed Feb 15 19:28:28 2006 Subject: [Zope-DB] RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <000001c55185$41477730$6b00a8c0@fonacier.local> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________ Zope-DB mailing list Zope-DB@zope.org http://mail.zope.org/mailman/listinfo/zope-db From rj at maxxian.com Thu May 5 12:38:00 2005 From: rj at maxxian.com (RJ Juneau) Date: Wed Feb 15 19:28:28 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000001c55188$6b841eb0$6505a8c0@rjlaptop> I just double-checked. Zope-2.7.6-final. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 12:49:16 2005 From: rj at maxxian.com (RJ Juneau) Date: Wed Feb 15 19:28:29 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000501c55189$fe149ba0$6505a8c0@rjlaptop> Charlie, The fix has only been applied for 2.7.7, 2.8b2. The info is in the original bug report which is closed and can be found here: http://www.zope.org/Collectors/Zope/1745 RJ -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Fri May 6 11:50:09 2005 From: rj at maxxian.com (RJ Juneau) Date: Wed Feb 15 19:28:29 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC Message-ID: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Still on eval for the product. I cannot get a stable connection to Sybase via the iODBC drivers. - The Sybase ODBC connection - including a query - have been verified at the iODBC level. - The setup is already working well for ODBC connection to MySQL. Symptoms include: - If I click on "Open Connection", it still comes back with "Connection Closed" when I go to a ZSQL method - Using 'Connect on Demand' is not working either. - Clicking "Open Connection" gives me the following error: Connection string: DSN=lixbox_sybase; UID=sa; PWD=XXXXXXX Connection pool entry: 0 Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection rejected by data source', 7952) The odbc.ini definition for DSN "lixbox_sybase" is as follows: [lixbox_sybase] JetFix = No NoRowSetSizeLimit = No Description = Test connection to listbox Options = LIXBOX DSQUERY = SQLSERVER TDSHOST = lixbox TDSPORT = 5000 TDSVER = 5.0 SQLSERVER_CATALOG = N CURSOR_SENSITIVITY = LOW UserName = sa Password = XXXXXXXX ServerType = Sybase 10/11/12 Driver = /opt/openlink/lib/sql_mt_lt.so Database = pubs2 ReadOnly = no NoAutoCommit = No NoLoginBox = No FetchBufferSize = 60 Other relevant data: - Connecting via OpenLink's iODBC - Zope 2.7.6-final - Python 2.3.4 - Connection to Sybase has been successfully tested with iODBC, including issuing a query - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC connection RJ Juneau Chief Technology Officer Maxxian Integration Inc. 155 Westhampton Drive Thornhill, Ontario Canada L4J 7X2 E-mail: rj@maxxian.com Phone: +1 905 482 9429 Cell: +1 416 897 6682 Toll free: +1 866 758 9161 Fax: +1 647 722 2038 -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050506/aef33361/attachment-0136.htm From mal at egenix.com Fri May 6 18:27:37 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 15 19:28:29 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC In-Reply-To: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> References: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Message-ID: <427B8CE9.1010601@egenix.com> RJ Juneau wrote: > Still on eval for the product. > > I cannot get a stable connection to Sybase via the iODBC drivers. > > - The Sybase ODBC connection - including a query - have been verified at > the iODBC level. > - The setup is already working well for ODBC connection to MySQL. > > Symptoms include: > > - If I click on "Open Connection", it still comes back with "Connection > Closed" when I go to a ZSQL method > - Using 'Connect on Demand' is not working either. > - Clicking "Open Connection" gives me the following error: > > Connection string: DSN=lixbox_sybase; > UID=sa; > PWD=XXXXXXX Try writing the connection string on one line and without whitespace. ODBC drivers sometimes have problems with this. > Connection pool entry: 0 > Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection > rejected by data source', 7952) This is a generic error that relates to authentication or firewall problems. It is possible that turning on ODBC tracing the ODBC manager will give more clues as to the real cause of the problem. > The odbc.ini definition for DSN "lixbox_sybase" is as follows: > > [lixbox_sybase] > JetFix = No > NoRowSetSizeLimit = No > Description = Test connection to listbox > Options = LIXBOX > DSQUERY = SQLSERVER > TDSHOST = lixbox > TDSPORT = 5000 > TDSVER = 5.0 > SQLSERVER_CATALOG = N > CURSOR_SENSITIVITY = LOW > UserName = sa > Password = XXXXXXXX > ServerType = Sybase 10/11/12 > Driver = /opt/openlink/lib/sql_mt_lt.so > Database = pubs2 > ReadOnly = no > NoAutoCommit = No > NoLoginBox = No > FetchBufferSize = 60 > > > Other relevant data: > - Connecting via OpenLink's iODBC > - Zope 2.7.6-final > - Python 2.3.4 > - Connection to Sybase has been successfully tested with iODBC, > including issuing a query > - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC > connection > > > > RJ Juneau > Chief Technology Officer > Maxxian Integration Inc. > 155 Westhampton Drive > Thornhill, Ontario > Canada L4J 7X2 > E-mail: rj@maxxian.com > Phone: +1 905 482 9429 > Cell: +1 416 897 6682 > Toll free: +1 866 758 9161 > Fax: +1 647 722 2038 > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 06 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From calisp at gmail.com Sun May 15 23:49:03 2005 From: calisp at gmail.com (calisp@gmail.com) Date: Wed Feb 15 19:28:29 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK Message-ID: Hi, I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the following error... 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the last phase of a two-phase commit. This shouldn't happen. Traceback (most recent call last): File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one jar.tpc_finish(self) File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish try: self._finish() File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could not perform COMMIT or ROLLBACK', 1023) What could be causing this? Can I get the mxODBCZopeDA source from somewhere? It would make debugging this much easier. Thanks, Calisp. From mal at egenix.com Mon May 16 13:52:12 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 15 19:28:29 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK In-Reply-To: References: Message-ID: <42887B5C.4010109@egenix.com> calisp@gmail.com wrote: > Hi, > > I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with > unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the > following error... > > 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the > last phase of a two-phase commit. This shouldn't happen. > Traceback (most recent call last): > File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one > jar.tpc_finish(self) > File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish > try: self._finish() > File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish > File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler > ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could > not perform COMMIT or ROLLBACK', 1023) You should have a look at the database logs to see what prevented the commit from being completed. > What could be causing this? Hard to say: mxODBCZopeDA is trying to commit the transaction, but the driver or database failed to complete the request. The above error was generated by the ODBC driver. This could be network or DNS problems, or be related to a bug in FreeTDS (which is getting more stable with every new release, but should still be considered beta quality software at the moment). > Can I get the mxODBCZopeDA source from > somewhere? It would make debugging this much easier. Getting the source is not an option and won't help much either since the source of the problem is not mxODBCZopeDA. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 16 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Sun May 1 21:29:25 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 15 20:15:22 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <427259F3.4090806@egenix.com> References: <20050427130906.52878.qmail@web30008.mail.mud.yahoo.com> <427259F3.4090806@egenix.com> Message-ID: <42752005.7080904@egenix.com> M.-A. Lemburg wrote: > David Rushby wrote: > >> --- "M.-A. Lemburg" wrote: >> >>> Are you using the standard mxDateTime build or one >>> with WANT_SUBCLASSABLE_TYPES defined... >> >> >> >> Presumably "the standard", since I just built with 'py24d setup.py >> build', making no attempt to enable special directives. >> >> >>> ... (mxDateTime_Deallocate is only used by the latter)? >> >> >> >> That's true in 2.1.0-2005-04-15, but not in 2.1.0b5. >> >> >>> In any case, please try our latest snapshot: >>> >>> >> >> http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-04-15.zip >> >>> to see if that makes any difference. >> >> >> >> I can't build it out of the box: > > > Hmm, looks like distutils' sdist command doesn't like our new > repository layout which uses symlinks (after we've switched to > subversion). > > We'll have to debug distutils first, I guess :-( Ok, we've found the problem and fixed it. Here's the new release (which does build out of the box at least on our boxes ;-): http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 01 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From davidrushby at yahoo.com Mon May 2 15:49:53 2005 From: davidrushby at yahoo.com (David Rushby) Date: Wed Feb 15 20:15:22 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Ok, we've found the problem and fixed it. Here's the new > release (which does build out of the box at least on our > boxes ;-): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip It does build now, but: py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" still behaves as it did when I submitted my original message: Fatal Python error: UNREF invalid object Aborted This is the same debug build of Python 2.4.1 that I was previously using, running the same configuration (CentOS Linux 4.0/i386, everything compiled with GCC 3.4.3). Have you examined my original claim as to the cause of the bug? __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 10:21:55 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 15 20:15:23 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> References: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> Message-ID: <42772693.8050306@egenix.com> David Rushby wrote: > --- "M.-A. Lemburg" wrote: > >>Ok, we've found the problem and fixed it. Here's the new >>release (which does build out of the box at least on our >>boxes ;-): >> >> > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip > > It does build now, but: > py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" > still behaves as it did when I submitted my original message: > Fatal Python error: UNREF invalid object > Aborted > > This is the same debug build of Python 2.4.1 that I was previously > using, running the same configuration (CentOS Linux 4.0/i386, > everything compiled with GCC 3.4.3). > > Have you examined my original claim as to the cause of the bug? No. We haven't had time for looking into it. I'm not sure whether your analysis of the problem is correct: if you don't define WANT_SUBCLASSABLE_TYPES, the API mxDateTime_Deallocate() is neither defined nor used. Furthermore, PyObject_Del() is only called by mxDateTime_Free() if you have explicitely edited mxDateTime.c to disabled the free list #defines. In a standard build, PyObject_Del() is only called at module finalization time. Note that the reason we call mxDateTime_Free() in the constructor is that we don't want the destructor of the object to be called. Py_DECREF() would call the destructor (mxDateTime_Deallocate). It is possible that the debug code in Python complains about the refcount in the object not being 0 at the time the object is finalized (module finalization time), but I don't see any such checks in PyObject_Free() (which is what PyObject_Del() maps to). Again, all of this does not happen in regular non-debug Python builds. Please be aware that we don't support debug builds, so fixing the problem (if there is one - gcc has some serious optimization problems on some combinations of platform and version) will take a while. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 09:27:37 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Wed Feb 15 20:15:23 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 Message-ID: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Hi all- I am trying to build the mx-base package, v.2.0.6. This will be used with postgresql 7.3.9, psycopg 1.1.18, and Roundup 0.8.2. RHEL 3.0 Python 2.3 egenix-mx-base-2.0.6.tar.gz I performed a: /usr/local/bin/python2.3 setup.py install Everything looks proper with the exeception of this series of warning statements: ----------------- gcc -pthread -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fno-strict-aliasing -fPIC -Imx/BeeBase/mxBeeBase -I/usr/local/incl ude/python2.3 -I/usr/local/include -c mx/BeeBase/mxBeeBase/btr.c -o build/temp.linux-i686-2.3/mx/BeeBase/mxBeeBase/mxBeeBa se/mx/BeeBase/mxBeeBase/btr.o mx/BeeBase/mxBeeBase/btr.c: In function `dumpBuf': mx/BeeBase/mxBeeBase/btr.c:249: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:250: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:255: warning: unsigned int format, long unsigned int arg (arg 4) mx/BeeBase/mxBeeBase/btr.c:256: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c: In function `_validateTree': mx/BeeBase/mxBeeBase/btr.c:330: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:337: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:339: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:349: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:351: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 3) creating build/lib.linux-i686-2.3/mx/BeeBase creating build/lib.linux-i686-2.3/mx/BeeBase/mxBeeBase -------------- Would someone be kind enough to let me know whether these messages were expected, and if not, how I might resolve these? Thanks! DC __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 22:06:33 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 15 20:15:23 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> References: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Message-ID: <4277CBB9.8020302@egenix.com> Dianne Chen wrote: > Hi all- > > I am trying to build the mx-base package, v.2.0.6. > This will be used with postgresql 7.3.9, psycopg > 1.1.18, and Roundup 0.8.2. > > RHEL 3.0 > Python 2.3 > egenix-mx-base-2.0.6.tar.gz > > I performed a: > > /usr/local/bin/python2.3 setup.py install > > Everything looks proper with the exeception of this > series of warning statements: > > ----------------- > ... > -------------- > > Would someone be kind enough to let me know whether > these messages were expected, and if not, how I might > resolve these? These warning can safely be ignored. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 13:41:14 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Wed Feb 15 20:15:23 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: 6667 Message-ID: <20050503194114.72091.qmail@web31414.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Dianne Chen wrote: > > Hi all- > > > > I am trying to build the mx-base package, v.2.0.6. > > This will be used with postgresql 7.3.9, psycopg > > 1.1.18, and Roundup 0.8.2. > > > > RHEL 3.0 > > Python 2.3 > > egenix-mx-base-2.0.6.tar.gz > > > > I performed a: > > > > /usr/local/bin/python2.3 setup.py install > > > > Everything looks proper with the exeception of > this > > series of warning statements: > > > > ----------------- > > ... > > -------------- > > > > Would someone be kind enough to let me know > whether > > these messages were expected, and if not, how I > might > > resolve these? > > These warning can safely be ignored. > > -- > Marc-Andre Lemburg > eGenix.com > Marc- Thank you very much for the reply. It helps greatly. With kind regards, DC __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From davidrushby at yahoo.com Tue May 3 17:18:46 2005 From: davidrushby at yahoo.com (David Rushby) Date: Wed Feb 15 20:15:23 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050503231846.35012.qmail@web30009.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > I'm not sure whether your analysis of the problem is correct... Indeed, my original analysis wasn't correct; I think this one is. The fatal error I'm complaining about only arises if the arguments to DateTime.DateTime are invalid, so that the object is deallocated in the onError block of mxDateTime_FromDateAndTime. If the object is created successfully, and later deallocated by Python's garbage collector, the fatal error doesn't arise. Here's my analysis of the problem: --- If the debugging directive Py_TRACE_REFS is enabled, as it is in my case, the Python interpreter maintains a doubly linked list of all Python objects (named refchain) via the _ob_next and _ob_prev pointers added to PyObject via _PyObject_HEAD_EXTRA. Each object is inserted into refchain by the _Py_AddToAllObjects call in _Py_NewReference, and removed from refchain by the _Py_ForgetReference call in _Py_Dealloc. _Py_ForgetReference performs an integrity check on the object being deallocated (op) to make sure that its neighbors in refchain recognize it. Specifically, _Py_ForgetReference verifies that the _ob_next pointer of the previous object in refchain (op->_ob_prev->_ob_next) points to op, and that the _ob_prev pointer of the next object in refchain (op->_ob_next->_ob_prev) points to op. If either of those conditions is false, the interpreter raises the fatal error I'm seeing. After mxDateTime_New pulls an mxDateTimeObject out of the free list, it calls _Py_NewReference on that object to transform it from a "conceptually deallocated" object to a "conceptually allocated" one. _Py_NewReference inserts the object into refchain. Later, when the object is being "conceptually deallocated", it should be removed from refchain with _Py_ForgetReference. The version of _Py_Dealloc that's active when Py_TRACE_REFS is enabled does this (_Py_Dealloc is the element of Py_DECREF that performs the actual destruction). _Py_Dealloc first calls _Py_ForgetReference to remove the object from refchain, then calls the object's destructor (op->ob_type->tp_dealloc). If WANT_SUBCLASSABLE_TYPES is not defined (it is not in my case), the destructor for mxDateTime_Type is mxDateTime_Free. So, if a DateTime object is deallocated normally, as a result of its reference count falling to zero, _Py_Dealloc is called on the object, which first removes it from refchain, then passes it to mxDateTime_Free. If a DateTime object is destroyed prematurely, as a result of invalid arguments to its destructor, the onError handler calls mxDateTime_Free, so the object is "conceptually deallocated" (placed in the free list), *but* the object is not removed from refchain. So if a refchain-membership-integrity-check is performed on the object in question or one of its immediate neighbors in refchain, that integrity check fails, leading to the fatal error. --- The solution is to 'Py_DECREF(...)' the object in the onError handler of its constructor, instead of passing the object directly to mxDateTime_Free. That change solves two problems: 1) It causes _Py_Dealloc to execute, which in turn executes _Py_ForgetReference, so the object is removed from refchain, as it should be. 2) At present, objects that are created successfully and later deallocated by normal reference count mechanics have a reference count of 0 when they enter the free list, whereas objects whose constructors abort their creation due to invalid arguments have a reference count of 1 when they enter the free list. Although AFAIK this doesn't cause an actual execution problem (because the object's reference count is *explicitly set to 1* rather than *incremented by 1* when the object is later "conceptually allocated" by _Py_NewReference), it is likely to confuse future maintainers and thereby lead to the introduction of an actual execution problem. I assume that if you agree that this is a reasonable solution, you'll want to apply the change not only to mxDateTime_FromDateAndTime, but to all similar constructors in mxDateTime.c. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From rj at maxxian.com Thu May 5 01:57:40 2005 From: rj at maxxian.com (RJ Juneau) Date: Wed Feb 15 20:15:23 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c5512e$f72798c0$6505a8c0@rjlaptop> I'm on the 30 day evaluation for mxodbc_zope_da. I'm getting the following error when I submit some queries: Error Type: KeyError Error Value: 'query' I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 with UCS4. The error seems to be caused by multiple rows being returned. I did see an earlier posting with the same error message. The response suggested a template error, but this is clearly not the case here. The additional evidence I've gathered so far: - I'm running the test directly from the ZSQL method, so there's no template involved. - If I use the same query with an additional "where" clause to ensure that only one row is returned, it works - If I use a value in the 'where' clause with no rows returned, it works - The same ZSQL query is being used on a Windows machine running Zope and the free ZODBC module without a problem - The query has been verified directly in mysql-client-browser Other info: - The database is MySQL 4.1.10A-0 - iODBC is the DB driver RJ Juneau -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050505/68d278bf/attachment-0137.htm From mal at egenix.com Thu May 5 12:37:43 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 15 20:15:23 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c5512e$f72798c0$6505a8c0@rjlaptop> References: <000301c5512e$f72798c0$6505a8c0@rjlaptop> Message-ID: <4279E967.6010904@egenix.com> RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 > with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 09:37:42 2005 From: rj at maxxian.com (RJ Juneau) Date: Wed Feb 15 20:15:23 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000101c5516f$3b96de90$6505a8c0@rjlaptop> More interesting info on the problem: If I execute the query directly in the "test" window of the base eGenix mxODBC Database Connection window, it works fine and returns the 20 lines expected. That could point to a problem in the rendering, which seems to be where the traceback ends. Note that within the same Zope system I also have an ODBC connection to a Sybase database, and I have successfully tested multi-line ZSQL queries there. This is the traceback: Time 2005/05/05 07:55:15.294 GMT-4 Exception Type KeyError Exception Value 'query' Traceback (innermost last): Module ZPublisher.Publish, line 101, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 39, in call_object Module Shared.DC.ZRDB.DA, line 337, in manage_test Module DocumentTemplate.DT_String, line 474, in __call__ Module DocumentTemplate.DT_In, line 602, in renderwb Module DocumentTemplate.DT_Var, line 219, in render KeyError: 'query' I don't think the following is an issue, but I'll include it for completeness.I am also getting the following iODBC warnings and errors in the Zope console log, which are related to the ODBC parameters being passed by iODBC. Note that these errors also appear for all of the successful queries. [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (Setup). [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (UsageCount). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Timeout). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Reuse). As for the ZSQL snippet from the template... Since there's no template involved yet (I'm still testing directly from the ZSQL method), I assume you mean the SQL code? select h.host_name, s.system_name, s.system_handle, count(*) from terminal t, system_map s, host h where t.system_index = s.system_index and s.host_index = h.host_index group by s.system_name order by h.host_name Nothing complicated here. There are no parameters passed to the query. RJ -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: May 5, 2005 5:38 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: Re: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is > 2.3.4 with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ---------------------------------------------------------------------- > -- > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 16:00:32 2005 From: charlie at egenix.com (Charlie Clark) Date: Wed Feb 15 20:15:23 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000101c5516f$3b96de90$6505a8c0@rjlaptop> References: <000101c5516f$3b96de90$6505a8c0@rjlaptop> Message-ID: <20050505150032.644.1@bepc.1115296715.fake> On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base eGenix > mxODBC Database Connection window, it works fine and returns the 20 > lines expected. That could point to a problem in the rendering, which > seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection to > a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 10:22:17 2005 From: rj at maxxian.com (RJ Juneau) Date: Wed Feb 15 20:15:23 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505150032.644.1@bepc.1115296715.fake> Message-ID: <000201c55175$75bcad10$6505a8c0@rjlaptop> At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 11:47:14 2005 From: rj at maxxian.com (RJ Juneau) Date: Wed Feb 15 20:15:23 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c55181$549be0e0$6505a8c0@rjlaptop> Charlie, I found a fix. Here it is in case anyone else runs into this. You were correct - the problem is in another part of Zope. Based on your feedback, I did a bit more searching and found something here: http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. html The problem appears to be in Zope versions after 2.7.0. I'm running 2.7.6, and the post indicates that it also happens in 2.7.4. The solution: Edit file /lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. There are two lines in the file that start with . Edit them as follows: Change first line to: Change second line to: Just to be after, I shut down Zope before I made the changes and restarted it after. Thanks for the help! RJ -----Original Message----- From: RJ Juneau [mailto:rj@maxxian.com] Sent: May 5, 2005 9:22 AM To: 'Charlie Clark' Cc: 'egenix-users@lists.egenix.com' Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 17:57:25 2005 From: charlie at egenix.com (Charlie Clark) Date: Wed Feb 15 20:15:23 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <20050505165725.3380.2@bepc.1115296715.fake> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Thu May 5 09:15:21 2005 From: charlie at egenix.com (Charlie Clark) Date: Wed Feb 15 20:15:23 2006 Subject: [Zope-DB] RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <000001c55185$41477730$6b00a8c0@fonacier.local> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________ Zope-DB mailing list Zope-DB@zope.org http://mail.zope.org/mailman/listinfo/zope-db From rj at maxxian.com Thu May 5 12:38:00 2005 From: rj at maxxian.com (RJ Juneau) Date: Wed Feb 15 20:15:24 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000001c55188$6b841eb0$6505a8c0@rjlaptop> I just double-checked. Zope-2.7.6-final. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 12:49:16 2005 From: rj at maxxian.com (RJ Juneau) Date: Wed Feb 15 20:15:24 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000501c55189$fe149ba0$6505a8c0@rjlaptop> Charlie, The fix has only been applied for 2.7.7, 2.8b2. The info is in the original bug report which is closed and can be found here: http://www.zope.org/Collectors/Zope/1745 RJ -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Fri May 6 11:50:09 2005 From: rj at maxxian.com (RJ Juneau) Date: Wed Feb 15 20:15:24 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC Message-ID: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Still on eval for the product. I cannot get a stable connection to Sybase via the iODBC drivers. - The Sybase ODBC connection - including a query - have been verified at the iODBC level. - The setup is already working well for ODBC connection to MySQL. Symptoms include: - If I click on "Open Connection", it still comes back with "Connection Closed" when I go to a ZSQL method - Using 'Connect on Demand' is not working either. - Clicking "Open Connection" gives me the following error: Connection string: DSN=lixbox_sybase; UID=sa; PWD=XXXXXXX Connection pool entry: 0 Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection rejected by data source', 7952) The odbc.ini definition for DSN "lixbox_sybase" is as follows: [lixbox_sybase] JetFix = No NoRowSetSizeLimit = No Description = Test connection to listbox Options = LIXBOX DSQUERY = SQLSERVER TDSHOST = lixbox TDSPORT = 5000 TDSVER = 5.0 SQLSERVER_CATALOG = N CURSOR_SENSITIVITY = LOW UserName = sa Password = XXXXXXXX ServerType = Sybase 10/11/12 Driver = /opt/openlink/lib/sql_mt_lt.so Database = pubs2 ReadOnly = no NoAutoCommit = No NoLoginBox = No FetchBufferSize = 60 Other relevant data: - Connecting via OpenLink's iODBC - Zope 2.7.6-final - Python 2.3.4 - Connection to Sybase has been successfully tested with iODBC, including issuing a query - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC connection RJ Juneau Chief Technology Officer Maxxian Integration Inc. 155 Westhampton Drive Thornhill, Ontario Canada L4J 7X2 E-mail: rj@maxxian.com Phone: +1 905 482 9429 Cell: +1 416 897 6682 Toll free: +1 866 758 9161 Fax: +1 647 722 2038 -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050506/aef33361/attachment-0137.htm From mal at egenix.com Fri May 6 18:27:37 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 15 20:15:24 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC In-Reply-To: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> References: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Message-ID: <427B8CE9.1010601@egenix.com> RJ Juneau wrote: > Still on eval for the product. > > I cannot get a stable connection to Sybase via the iODBC drivers. > > - The Sybase ODBC connection - including a query - have been verified at > the iODBC level. > - The setup is already working well for ODBC connection to MySQL. > > Symptoms include: > > - If I click on "Open Connection", it still comes back with "Connection > Closed" when I go to a ZSQL method > - Using 'Connect on Demand' is not working either. > - Clicking "Open Connection" gives me the following error: > > Connection string: DSN=lixbox_sybase; > UID=sa; > PWD=XXXXXXX Try writing the connection string on one line and without whitespace. ODBC drivers sometimes have problems with this. > Connection pool entry: 0 > Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection > rejected by data source', 7952) This is a generic error that relates to authentication or firewall problems. It is possible that turning on ODBC tracing the ODBC manager will give more clues as to the real cause of the problem. > The odbc.ini definition for DSN "lixbox_sybase" is as follows: > > [lixbox_sybase] > JetFix = No > NoRowSetSizeLimit = No > Description = Test connection to listbox > Options = LIXBOX > DSQUERY = SQLSERVER > TDSHOST = lixbox > TDSPORT = 5000 > TDSVER = 5.0 > SQLSERVER_CATALOG = N > CURSOR_SENSITIVITY = LOW > UserName = sa > Password = XXXXXXXX > ServerType = Sybase 10/11/12 > Driver = /opt/openlink/lib/sql_mt_lt.so > Database = pubs2 > ReadOnly = no > NoAutoCommit = No > NoLoginBox = No > FetchBufferSize = 60 > > > Other relevant data: > - Connecting via OpenLink's iODBC > - Zope 2.7.6-final > - Python 2.3.4 > - Connection to Sybase has been successfully tested with iODBC, > including issuing a query > - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC > connection > > > > RJ Juneau > Chief Technology Officer > Maxxian Integration Inc. > 155 Westhampton Drive > Thornhill, Ontario > Canada L4J 7X2 > E-mail: rj@maxxian.com > Phone: +1 905 482 9429 > Cell: +1 416 897 6682 > Toll free: +1 866 758 9161 > Fax: +1 647 722 2038 > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 06 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From calisp at gmail.com Sun May 15 23:49:03 2005 From: calisp at gmail.com (calisp@gmail.com) Date: Wed Feb 15 20:15:24 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK Message-ID: Hi, I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the following error... 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the last phase of a two-phase commit. This shouldn't happen. Traceback (most recent call last): File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one jar.tpc_finish(self) File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish try: self._finish() File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could not perform COMMIT or ROLLBACK', 1023) What could be causing this? Can I get the mxODBCZopeDA source from somewhere? It would make debugging this much easier. Thanks, Calisp. From mal at egenix.com Mon May 16 13:52:12 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Feb 15 20:15:24 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK In-Reply-To: References: Message-ID: <42887B5C.4010109@egenix.com> calisp@gmail.com wrote: > Hi, > > I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with > unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the > following error... > > 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the > last phase of a two-phase commit. This shouldn't happen. > Traceback (most recent call last): > File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one > jar.tpc_finish(self) > File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish > try: self._finish() > File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish > File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler > ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could > not perform COMMIT or ROLLBACK', 1023) You should have a look at the database logs to see what prevented the commit from being completed. > What could be causing this? Hard to say: mxODBCZopeDA is trying to commit the transaction, but the driver or database failed to complete the request. The above error was generated by the ODBC driver. This could be network or DNS problems, or be related to a bug in FreeTDS (which is getting more stable with every new release, but should still be considered beta quality software at the moment). > Can I get the mxODBCZopeDA source from > somewhere? It would make debugging this much easier. Getting the source is not an option and won't help much either since the source of the problem is not mxODBCZopeDA. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 16 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Sun May 1 21:29:25 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Feb 16 08:50:01 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <427259F3.4090806@egenix.com> References: <20050427130906.52878.qmail@web30008.mail.mud.yahoo.com> <427259F3.4090806@egenix.com> Message-ID: <42752005.7080904@egenix.com> M.-A. Lemburg wrote: > David Rushby wrote: > >> --- "M.-A. Lemburg" wrote: >> >>> Are you using the standard mxDateTime build or one >>> with WANT_SUBCLASSABLE_TYPES defined... >> >> >> >> Presumably "the standard", since I just built with 'py24d setup.py >> build', making no attempt to enable special directives. >> >> >>> ... (mxDateTime_Deallocate is only used by the latter)? >> >> >> >> That's true in 2.1.0-2005-04-15, but not in 2.1.0b5. >> >> >>> In any case, please try our latest snapshot: >>> >>> >> >> http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-04-15.zip >> >>> to see if that makes any difference. >> >> >> >> I can't build it out of the box: > > > Hmm, looks like distutils' sdist command doesn't like our new > repository layout which uses symlinks (after we've switched to > subversion). > > We'll have to debug distutils first, I guess :-( Ok, we've found the problem and fixed it. Here's the new release (which does build out of the box at least on our boxes ;-): http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 01 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From davidrushby at yahoo.com Mon May 2 15:49:53 2005 From: davidrushby at yahoo.com (David Rushby) Date: Thu Feb 16 08:50:02 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Ok, we've found the problem and fixed it. Here's the new > release (which does build out of the box at least on our > boxes ;-): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip It does build now, but: py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" still behaves as it did when I submitted my original message: Fatal Python error: UNREF invalid object Aborted This is the same debug build of Python 2.4.1 that I was previously using, running the same configuration (CentOS Linux 4.0/i386, everything compiled with GCC 3.4.3). Have you examined my original claim as to the cause of the bug? __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 10:21:55 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Feb 16 08:50:02 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> References: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> Message-ID: <42772693.8050306@egenix.com> David Rushby wrote: > --- "M.-A. Lemburg" wrote: > >>Ok, we've found the problem and fixed it. Here's the new >>release (which does build out of the box at least on our >>boxes ;-): >> >> > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip > > It does build now, but: > py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" > still behaves as it did when I submitted my original message: > Fatal Python error: UNREF invalid object > Aborted > > This is the same debug build of Python 2.4.1 that I was previously > using, running the same configuration (CentOS Linux 4.0/i386, > everything compiled with GCC 3.4.3). > > Have you examined my original claim as to the cause of the bug? No. We haven't had time for looking into it. I'm not sure whether your analysis of the problem is correct: if you don't define WANT_SUBCLASSABLE_TYPES, the API mxDateTime_Deallocate() is neither defined nor used. Furthermore, PyObject_Del() is only called by mxDateTime_Free() if you have explicitely edited mxDateTime.c to disabled the free list #defines. In a standard build, PyObject_Del() is only called at module finalization time. Note that the reason we call mxDateTime_Free() in the constructor is that we don't want the destructor of the object to be called. Py_DECREF() would call the destructor (mxDateTime_Deallocate). It is possible that the debug code in Python complains about the refcount in the object not being 0 at the time the object is finalized (module finalization time), but I don't see any such checks in PyObject_Free() (which is what PyObject_Del() maps to). Again, all of this does not happen in regular non-debug Python builds. Please be aware that we don't support debug builds, so fixing the problem (if there is one - gcc has some serious optimization problems on some combinations of platform and version) will take a while. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 09:27:37 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Thu Feb 16 08:50:02 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 Message-ID: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Hi all- I am trying to build the mx-base package, v.2.0.6. This will be used with postgresql 7.3.9, psycopg 1.1.18, and Roundup 0.8.2. RHEL 3.0 Python 2.3 egenix-mx-base-2.0.6.tar.gz I performed a: /usr/local/bin/python2.3 setup.py install Everything looks proper with the exeception of this series of warning statements: ----------------- gcc -pthread -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fno-strict-aliasing -fPIC -Imx/BeeBase/mxBeeBase -I/usr/local/incl ude/python2.3 -I/usr/local/include -c mx/BeeBase/mxBeeBase/btr.c -o build/temp.linux-i686-2.3/mx/BeeBase/mxBeeBase/mxBeeBa se/mx/BeeBase/mxBeeBase/btr.o mx/BeeBase/mxBeeBase/btr.c: In function `dumpBuf': mx/BeeBase/mxBeeBase/btr.c:249: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:250: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:255: warning: unsigned int format, long unsigned int arg (arg 4) mx/BeeBase/mxBeeBase/btr.c:256: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c: In function `_validateTree': mx/BeeBase/mxBeeBase/btr.c:330: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:337: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:339: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:349: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:351: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 3) creating build/lib.linux-i686-2.3/mx/BeeBase creating build/lib.linux-i686-2.3/mx/BeeBase/mxBeeBase -------------- Would someone be kind enough to let me know whether these messages were expected, and if not, how I might resolve these? Thanks! DC __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 22:06:33 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Feb 16 08:50:02 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> References: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Message-ID: <4277CBB9.8020302@egenix.com> Dianne Chen wrote: > Hi all- > > I am trying to build the mx-base package, v.2.0.6. > This will be used with postgresql 7.3.9, psycopg > 1.1.18, and Roundup 0.8.2. > > RHEL 3.0 > Python 2.3 > egenix-mx-base-2.0.6.tar.gz > > I performed a: > > /usr/local/bin/python2.3 setup.py install > > Everything looks proper with the exeception of this > series of warning statements: > > ----------------- > ... > -------------- > > Would someone be kind enough to let me know whether > these messages were expected, and if not, how I might > resolve these? These warning can safely be ignored. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 13:41:14 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Thu Feb 16 08:50:02 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: 6667 Message-ID: <20050503194114.72091.qmail@web31414.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Dianne Chen wrote: > > Hi all- > > > > I am trying to build the mx-base package, v.2.0.6. > > This will be used with postgresql 7.3.9, psycopg > > 1.1.18, and Roundup 0.8.2. > > > > RHEL 3.0 > > Python 2.3 > > egenix-mx-base-2.0.6.tar.gz > > > > I performed a: > > > > /usr/local/bin/python2.3 setup.py install > > > > Everything looks proper with the exeception of > this > > series of warning statements: > > > > ----------------- > > ... > > -------------- > > > > Would someone be kind enough to let me know > whether > > these messages were expected, and if not, how I > might > > resolve these? > > These warning can safely be ignored. > > -- > Marc-Andre Lemburg > eGenix.com > Marc- Thank you very much for the reply. It helps greatly. With kind regards, DC __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From davidrushby at yahoo.com Tue May 3 17:18:46 2005 From: davidrushby at yahoo.com (David Rushby) Date: Thu Feb 16 08:50:02 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050503231846.35012.qmail@web30009.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > I'm not sure whether your analysis of the problem is correct... Indeed, my original analysis wasn't correct; I think this one is. The fatal error I'm complaining about only arises if the arguments to DateTime.DateTime are invalid, so that the object is deallocated in the onError block of mxDateTime_FromDateAndTime. If the object is created successfully, and later deallocated by Python's garbage collector, the fatal error doesn't arise. Here's my analysis of the problem: --- If the debugging directive Py_TRACE_REFS is enabled, as it is in my case, the Python interpreter maintains a doubly linked list of all Python objects (named refchain) via the _ob_next and _ob_prev pointers added to PyObject via _PyObject_HEAD_EXTRA. Each object is inserted into refchain by the _Py_AddToAllObjects call in _Py_NewReference, and removed from refchain by the _Py_ForgetReference call in _Py_Dealloc. _Py_ForgetReference performs an integrity check on the object being deallocated (op) to make sure that its neighbors in refchain recognize it. Specifically, _Py_ForgetReference verifies that the _ob_next pointer of the previous object in refchain (op->_ob_prev->_ob_next) points to op, and that the _ob_prev pointer of the next object in refchain (op->_ob_next->_ob_prev) points to op. If either of those conditions is false, the interpreter raises the fatal error I'm seeing. After mxDateTime_New pulls an mxDateTimeObject out of the free list, it calls _Py_NewReference on that object to transform it from a "conceptually deallocated" object to a "conceptually allocated" one. _Py_NewReference inserts the object into refchain. Later, when the object is being "conceptually deallocated", it should be removed from refchain with _Py_ForgetReference. The version of _Py_Dealloc that's active when Py_TRACE_REFS is enabled does this (_Py_Dealloc is the element of Py_DECREF that performs the actual destruction). _Py_Dealloc first calls _Py_ForgetReference to remove the object from refchain, then calls the object's destructor (op->ob_type->tp_dealloc). If WANT_SUBCLASSABLE_TYPES is not defined (it is not in my case), the destructor for mxDateTime_Type is mxDateTime_Free. So, if a DateTime object is deallocated normally, as a result of its reference count falling to zero, _Py_Dealloc is called on the object, which first removes it from refchain, then passes it to mxDateTime_Free. If a DateTime object is destroyed prematurely, as a result of invalid arguments to its destructor, the onError handler calls mxDateTime_Free, so the object is "conceptually deallocated" (placed in the free list), *but* the object is not removed from refchain. So if a refchain-membership-integrity-check is performed on the object in question or one of its immediate neighbors in refchain, that integrity check fails, leading to the fatal error. --- The solution is to 'Py_DECREF(...)' the object in the onError handler of its constructor, instead of passing the object directly to mxDateTime_Free. That change solves two problems: 1) It causes _Py_Dealloc to execute, which in turn executes _Py_ForgetReference, so the object is removed from refchain, as it should be. 2) At present, objects that are created successfully and later deallocated by normal reference count mechanics have a reference count of 0 when they enter the free list, whereas objects whose constructors abort their creation due to invalid arguments have a reference count of 1 when they enter the free list. Although AFAIK this doesn't cause an actual execution problem (because the object's reference count is *explicitly set to 1* rather than *incremented by 1* when the object is later "conceptually allocated" by _Py_NewReference), it is likely to confuse future maintainers and thereby lead to the introduction of an actual execution problem. I assume that if you agree that this is a reasonable solution, you'll want to apply the change not only to mxDateTime_FromDateAndTime, but to all similar constructors in mxDateTime.c. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From rj at maxxian.com Thu May 5 01:57:40 2005 From: rj at maxxian.com (RJ Juneau) Date: Thu Feb 16 08:50:05 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c5512e$f72798c0$6505a8c0@rjlaptop> I'm on the 30 day evaluation for mxodbc_zope_da. I'm getting the following error when I submit some queries: Error Type: KeyError Error Value: 'query' I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 with UCS4. The error seems to be caused by multiple rows being returned. I did see an earlier posting with the same error message. The response suggested a template error, but this is clearly not the case here. The additional evidence I've gathered so far: - I'm running the test directly from the ZSQL method, so there's no template involved. - If I use the same query with an additional "where" clause to ensure that only one row is returned, it works - If I use a value in the 'where' clause with no rows returned, it works - The same ZSQL query is being used on a Windows machine running Zope and the free ZODBC module without a problem - The query has been verified directly in mysql-client-browser Other info: - The database is MySQL 4.1.10A-0 - iODBC is the DB driver RJ Juneau -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050505/68d278bf/attachment-0138.htm From mal at egenix.com Thu May 5 12:37:43 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Feb 16 08:50:05 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c5512e$f72798c0$6505a8c0@rjlaptop> References: <000301c5512e$f72798c0$6505a8c0@rjlaptop> Message-ID: <4279E967.6010904@egenix.com> RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 > with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 09:37:42 2005 From: rj at maxxian.com (RJ Juneau) Date: Thu Feb 16 08:50:05 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000101c5516f$3b96de90$6505a8c0@rjlaptop> More interesting info on the problem: If I execute the query directly in the "test" window of the base eGenix mxODBC Database Connection window, it works fine and returns the 20 lines expected. That could point to a problem in the rendering, which seems to be where the traceback ends. Note that within the same Zope system I also have an ODBC connection to a Sybase database, and I have successfully tested multi-line ZSQL queries there. This is the traceback: Time 2005/05/05 07:55:15.294 GMT-4 Exception Type KeyError Exception Value 'query' Traceback (innermost last): Module ZPublisher.Publish, line 101, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 39, in call_object Module Shared.DC.ZRDB.DA, line 337, in manage_test Module DocumentTemplate.DT_String, line 474, in __call__ Module DocumentTemplate.DT_In, line 602, in renderwb Module DocumentTemplate.DT_Var, line 219, in render KeyError: 'query' I don't think the following is an issue, but I'll include it for completeness.I am also getting the following iODBC warnings and errors in the Zope console log, which are related to the ODBC parameters being passed by iODBC. Note that these errors also appear for all of the successful queries. [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (Setup). [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (UsageCount). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Timeout). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Reuse). As for the ZSQL snippet from the template... Since there's no template involved yet (I'm still testing directly from the ZSQL method), I assume you mean the SQL code? select h.host_name, s.system_name, s.system_handle, count(*) from terminal t, system_map s, host h where t.system_index = s.system_index and s.host_index = h.host_index group by s.system_name order by h.host_name Nothing complicated here. There are no parameters passed to the query. RJ -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: May 5, 2005 5:38 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: Re: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is > 2.3.4 with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ---------------------------------------------------------------------- > -- > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 16:00:32 2005 From: charlie at egenix.com (Charlie Clark) Date: Thu Feb 16 08:50:05 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000101c5516f$3b96de90$6505a8c0@rjlaptop> References: <000101c5516f$3b96de90$6505a8c0@rjlaptop> Message-ID: <20050505150032.644.1@bepc.1115296715.fake> On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base eGenix > mxODBC Database Connection window, it works fine and returns the 20 > lines expected. That could point to a problem in the rendering, which > seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection to > a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 10:22:17 2005 From: rj at maxxian.com (RJ Juneau) Date: Thu Feb 16 08:50:05 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505150032.644.1@bepc.1115296715.fake> Message-ID: <000201c55175$75bcad10$6505a8c0@rjlaptop> At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 11:47:14 2005 From: rj at maxxian.com (RJ Juneau) Date: Thu Feb 16 08:50:05 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c55181$549be0e0$6505a8c0@rjlaptop> Charlie, I found a fix. Here it is in case anyone else runs into this. You were correct - the problem is in another part of Zope. Based on your feedback, I did a bit more searching and found something here: http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. html The problem appears to be in Zope versions after 2.7.0. I'm running 2.7.6, and the post indicates that it also happens in 2.7.4. The solution: Edit file /lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. There are two lines in the file that start with . Edit them as follows: Change first line to: Change second line to: Just to be after, I shut down Zope before I made the changes and restarted it after. Thanks for the help! RJ -----Original Message----- From: RJ Juneau [mailto:rj@maxxian.com] Sent: May 5, 2005 9:22 AM To: 'Charlie Clark' Cc: 'egenix-users@lists.egenix.com' Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 17:57:25 2005 From: charlie at egenix.com (Charlie Clark) Date: Thu Feb 16 08:50:05 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <20050505165725.3380.2@bepc.1115296715.fake> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Thu May 5 09:15:21 2005 From: charlie at egenix.com (Charlie Clark) Date: Thu Feb 16 08:50:05 2006 Subject: [Zope-DB] RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <000001c55185$41477730$6b00a8c0@fonacier.local> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________ Zope-DB mailing list Zope-DB@zope.org http://mail.zope.org/mailman/listinfo/zope-db From rj at maxxian.com Thu May 5 12:38:00 2005 From: rj at maxxian.com (RJ Juneau) Date: Thu Feb 16 08:50:05 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000001c55188$6b841eb0$6505a8c0@rjlaptop> I just double-checked. Zope-2.7.6-final. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 12:49:16 2005 From: rj at maxxian.com (RJ Juneau) Date: Thu Feb 16 08:50:06 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000501c55189$fe149ba0$6505a8c0@rjlaptop> Charlie, The fix has only been applied for 2.7.7, 2.8b2. The info is in the original bug report which is closed and can be found here: http://www.zope.org/Collectors/Zope/1745 RJ -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Fri May 6 11:50:09 2005 From: rj at maxxian.com (RJ Juneau) Date: Thu Feb 16 08:50:08 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC Message-ID: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Still on eval for the product. I cannot get a stable connection to Sybase via the iODBC drivers. - The Sybase ODBC connection - including a query - have been verified at the iODBC level. - The setup is already working well for ODBC connection to MySQL. Symptoms include: - If I click on "Open Connection", it still comes back with "Connection Closed" when I go to a ZSQL method - Using 'Connect on Demand' is not working either. - Clicking "Open Connection" gives me the following error: Connection string: DSN=lixbox_sybase; UID=sa; PWD=XXXXXXX Connection pool entry: 0 Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection rejected by data source', 7952) The odbc.ini definition for DSN "lixbox_sybase" is as follows: [lixbox_sybase] JetFix = No NoRowSetSizeLimit = No Description = Test connection to listbox Options = LIXBOX DSQUERY = SQLSERVER TDSHOST = lixbox TDSPORT = 5000 TDSVER = 5.0 SQLSERVER_CATALOG = N CURSOR_SENSITIVITY = LOW UserName = sa Password = XXXXXXXX ServerType = Sybase 10/11/12 Driver = /opt/openlink/lib/sql_mt_lt.so Database = pubs2 ReadOnly = no NoAutoCommit = No NoLoginBox = No FetchBufferSize = 60 Other relevant data: - Connecting via OpenLink's iODBC - Zope 2.7.6-final - Python 2.3.4 - Connection to Sybase has been successfully tested with iODBC, including issuing a query - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC connection RJ Juneau Chief Technology Officer Maxxian Integration Inc. 155 Westhampton Drive Thornhill, Ontario Canada L4J 7X2 E-mail: rj@maxxian.com Phone: +1 905 482 9429 Cell: +1 416 897 6682 Toll free: +1 866 758 9161 Fax: +1 647 722 2038 -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050506/aef33361/attachment-0138.htm From mal at egenix.com Fri May 6 18:27:37 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Feb 16 08:50:08 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC In-Reply-To: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> References: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Message-ID: <427B8CE9.1010601@egenix.com> RJ Juneau wrote: > Still on eval for the product. > > I cannot get a stable connection to Sybase via the iODBC drivers. > > - The Sybase ODBC connection - including a query - have been verified at > the iODBC level. > - The setup is already working well for ODBC connection to MySQL. > > Symptoms include: > > - If I click on "Open Connection", it still comes back with "Connection > Closed" when I go to a ZSQL method > - Using 'Connect on Demand' is not working either. > - Clicking "Open Connection" gives me the following error: > > Connection string: DSN=lixbox_sybase; > UID=sa; > PWD=XXXXXXX Try writing the connection string on one line and without whitespace. ODBC drivers sometimes have problems with this. > Connection pool entry: 0 > Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection > rejected by data source', 7952) This is a generic error that relates to authentication or firewall problems. It is possible that turning on ODBC tracing the ODBC manager will give more clues as to the real cause of the problem. > The odbc.ini definition for DSN "lixbox_sybase" is as follows: > > [lixbox_sybase] > JetFix = No > NoRowSetSizeLimit = No > Description = Test connection to listbox > Options = LIXBOX > DSQUERY = SQLSERVER > TDSHOST = lixbox > TDSPORT = 5000 > TDSVER = 5.0 > SQLSERVER_CATALOG = N > CURSOR_SENSITIVITY = LOW > UserName = sa > Password = XXXXXXXX > ServerType = Sybase 10/11/12 > Driver = /opt/openlink/lib/sql_mt_lt.so > Database = pubs2 > ReadOnly = no > NoAutoCommit = No > NoLoginBox = No > FetchBufferSize = 60 > > > Other relevant data: > - Connecting via OpenLink's iODBC > - Zope 2.7.6-final > - Python 2.3.4 > - Connection to Sybase has been successfully tested with iODBC, > including issuing a query > - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC > connection > > > > RJ Juneau > Chief Technology Officer > Maxxian Integration Inc. > 155 Westhampton Drive > Thornhill, Ontario > Canada L4J 7X2 > E-mail: rj@maxxian.com > Phone: +1 905 482 9429 > Cell: +1 416 897 6682 > Toll free: +1 866 758 9161 > Fax: +1 647 722 2038 > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 06 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From calisp at gmail.com Sun May 15 23:49:03 2005 From: calisp at gmail.com (calisp@gmail.com) Date: Thu Feb 16 08:50:08 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK Message-ID: Hi, I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the following error... 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the last phase of a two-phase commit. This shouldn't happen. Traceback (most recent call last): File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one jar.tpc_finish(self) File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish try: self._finish() File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could not perform COMMIT or ROLLBACK', 1023) What could be causing this? Can I get the mxODBCZopeDA source from somewhere? It would make debugging this much easier. Thanks, Calisp. From mal at egenix.com Mon May 16 13:52:12 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Feb 16 08:50:08 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK In-Reply-To: References: Message-ID: <42887B5C.4010109@egenix.com> calisp@gmail.com wrote: > Hi, > > I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with > unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the > following error... > > 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the > last phase of a two-phase commit. This shouldn't happen. > Traceback (most recent call last): > File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one > jar.tpc_finish(self) > File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish > try: self._finish() > File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish > File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler > ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could > not perform COMMIT or ROLLBACK', 1023) You should have a look at the database logs to see what prevented the commit from being completed. > What could be causing this? Hard to say: mxODBCZopeDA is trying to commit the transaction, but the driver or database failed to complete the request. The above error was generated by the ODBC driver. This could be network or DNS problems, or be related to a bug in FreeTDS (which is getting more stable with every new release, but should still be considered beta quality software at the moment). > Can I get the mxODBCZopeDA source from > somewhere? It would make debugging this much easier. Getting the source is not an option and won't help much either since the source of the problem is not mxODBCZopeDA. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 16 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Sun May 1 21:29:25 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Mar 31 16:34:12 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <427259F3.4090806@egenix.com> References: <20050427130906.52878.qmail@web30008.mail.mud.yahoo.com> <427259F3.4090806@egenix.com> Message-ID: <42752005.7080904@egenix.com> M.-A. Lemburg wrote: > David Rushby wrote: > >> --- "M.-A. Lemburg" wrote: >> >>> Are you using the standard mxDateTime build or one >>> with WANT_SUBCLASSABLE_TYPES defined... >> >> >> >> Presumably "the standard", since I just built with 'py24d setup.py >> build', making no attempt to enable special directives. >> >> >>> ... (mxDateTime_Deallocate is only used by the latter)? >> >> >> >> That's true in 2.1.0-2005-04-15, but not in 2.1.0b5. >> >> >>> In any case, please try our latest snapshot: >>> >>> >> >> http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-04-15.zip >> >>> to see if that makes any difference. >> >> >> >> I can't build it out of the box: > > > Hmm, looks like distutils' sdist command doesn't like our new > repository layout which uses symlinks (after we've switched to > subversion). > > We'll have to debug distutils first, I guess :-( Ok, we've found the problem and fixed it. Here's the new release (which does build out of the box at least on our boxes ;-): http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 01 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From davidrushby at yahoo.com Mon May 2 15:49:53 2005 From: davidrushby at yahoo.com (David Rushby) Date: Fri Mar 31 16:34:13 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Ok, we've found the problem and fixed it. Here's the new > release (which does build out of the box at least on our > boxes ;-): > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip It does build now, but: py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" still behaves as it did when I submitted my original message: Fatal Python error: UNREF invalid object Aborted This is the same debug build of Python 2.4.1 that I was previously using, running the same configuration (CentOS Linux 4.0/i386, everything compiled with GCC 3.4.3). Have you examined my original claim as to the cause of the bug? __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 10:21:55 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Mar 31 16:34:13 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> References: <20050502214954.68561.qmail@web30013.mail.mud.yahoo.com> Message-ID: <42772693.8050306@egenix.com> David Rushby wrote: > --- "M.-A. Lemburg" wrote: > >>Ok, we've found the problem and fixed it. Here's the new >>release (which does build out of the box at least on our >>boxes ;-): >> >> > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0-2005-05-01.zip > > It does build now, but: > py24d -c "import mx.DateTime as dt; dt.DateTime(-1, 13, 32)" > still behaves as it did when I submitted my original message: > Fatal Python error: UNREF invalid object > Aborted > > This is the same debug build of Python 2.4.1 that I was previously > using, running the same configuration (CentOS Linux 4.0/i386, > everything compiled with GCC 3.4.3). > > Have you examined my original claim as to the cause of the bug? No. We haven't had time for looking into it. I'm not sure whether your analysis of the problem is correct: if you don't define WANT_SUBCLASSABLE_TYPES, the API mxDateTime_Deallocate() is neither defined nor used. Furthermore, PyObject_Del() is only called by mxDateTime_Free() if you have explicitely edited mxDateTime.c to disabled the free list #defines. In a standard build, PyObject_Del() is only called at module finalization time. Note that the reason we call mxDateTime_Free() in the constructor is that we don't want the destructor of the object to be called. Py_DECREF() would call the destructor (mxDateTime_Deallocate). It is possible that the debug code in Python complains about the refcount in the object not being 0 at the time the object is finalized (module finalization time), but I don't see any such checks in PyObject_Free() (which is what PyObject_Del() maps to). Again, all of this does not happen in regular non-debug Python builds. Please be aware that we don't support debug builds, so fixing the problem (if there is one - gcc has some serious optimization problems on some combinations of platform and version) will take a while. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 09:27:37 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Fri Mar 31 16:34:13 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 Message-ID: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Hi all- I am trying to build the mx-base package, v.2.0.6. This will be used with postgresql 7.3.9, psycopg 1.1.18, and Roundup 0.8.2. RHEL 3.0 Python 2.3 egenix-mx-base-2.0.6.tar.gz I performed a: /usr/local/bin/python2.3 setup.py install Everything looks proper with the exeception of this series of warning statements: ----------------- gcc -pthread -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fno-strict-aliasing -fPIC -Imx/BeeBase/mxBeeBase -I/usr/local/incl ude/python2.3 -I/usr/local/include -c mx/BeeBase/mxBeeBase/btr.c -o build/temp.linux-i686-2.3/mx/BeeBase/mxBeeBase/mxBeeBa se/mx/BeeBase/mxBeeBase/btr.o mx/BeeBase/mxBeeBase/btr.c: In function `dumpBuf': mx/BeeBase/mxBeeBase/btr.c:249: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:250: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:251: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:255: warning: unsigned int format, long unsigned int arg (arg 4) mx/BeeBase/mxBeeBase/btr.c:256: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c: In function `_validateTree': mx/BeeBase/mxBeeBase/btr.c:330: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:337: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:339: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:343: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:349: warning: unsigned int format, long unsigned int arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:351: warning: unsigned int format, long unsigned int arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:359: warning: unsigned int format, bIdxAddr arg (arg 3) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 2) mx/BeeBase/mxBeeBase/btr.c:370: warning: unsigned int format, bIdxAddr arg (arg 3) creating build/lib.linux-i686-2.3/mx/BeeBase creating build/lib.linux-i686-2.3/mx/BeeBase/mxBeeBase -------------- Would someone be kind enough to let me know whether these messages were expected, and if not, how I might resolve these? Thanks! DC __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ From mal at egenix.com Tue May 3 22:06:33 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Mar 31 16:34:13 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> References: <20050503152737.42918.qmail@web31401.mail.mud.yahoo.com> Message-ID: <4277CBB9.8020302@egenix.com> Dianne Chen wrote: > Hi all- > > I am trying to build the mx-base package, v.2.0.6. > This will be used with postgresql 7.3.9, psycopg > 1.1.18, and Roundup 0.8.2. > > RHEL 3.0 > Python 2.3 > egenix-mx-base-2.0.6.tar.gz > > I performed a: > > /usr/local/bin/python2.3 setup.py install > > Everything looks proper with the exeception of this > series of warning statements: > > ----------------- > ... > -------------- > > Would someone be kind enough to let me know whether > these messages were expected, and if not, how I might > resolve these? These warning can safely be ignored. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 03 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From diana_chen23 at yahoo.com Tue May 3 13:41:14 2005 From: diana_chen23 at yahoo.com (Dianne Chen) Date: Fri Mar 31 16:34:13 2006 Subject: [egenix-users] Build question with mx-base-2.0.6 In-Reply-To: 6667 Message-ID: <20050503194114.72091.qmail@web31414.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > Dianne Chen wrote: > > Hi all- > > > > I am trying to build the mx-base package, v.2.0.6. > > This will be used with postgresql 7.3.9, psycopg > > 1.1.18, and Roundup 0.8.2. > > > > RHEL 3.0 > > Python 2.3 > > egenix-mx-base-2.0.6.tar.gz > > > > I performed a: > > > > /usr/local/bin/python2.3 setup.py install > > > > Everything looks proper with the exeception of > this > > series of warning statements: > > > > ----------------- > > ... > > -------------- > > > > Would someone be kind enough to let me know > whether > > these messages were expected, and if not, how I > might > > resolve these? > > These warning can safely be ignored. > > -- > Marc-Andre Lemburg > eGenix.com > Marc- Thank you very much for the reply. It helps greatly. With kind regards, DC __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From davidrushby at yahoo.com Tue May 3 17:18:46 2005 From: davidrushby at yahoo.com (David Rushby) Date: Fri Mar 31 16:34:13 2006 Subject: [egenix-users] mx base 2.1.0b5 ref count bug? In-Reply-To: 6667 Message-ID: <20050503231846.35012.qmail@web30009.mail.mud.yahoo.com> --- "M.-A. Lemburg" wrote: > I'm not sure whether your analysis of the problem is correct... Indeed, my original analysis wasn't correct; I think this one is. The fatal error I'm complaining about only arises if the arguments to DateTime.DateTime are invalid, so that the object is deallocated in the onError block of mxDateTime_FromDateAndTime. If the object is created successfully, and later deallocated by Python's garbage collector, the fatal error doesn't arise. Here's my analysis of the problem: --- If the debugging directive Py_TRACE_REFS is enabled, as it is in my case, the Python interpreter maintains a doubly linked list of all Python objects (named refchain) via the _ob_next and _ob_prev pointers added to PyObject via _PyObject_HEAD_EXTRA. Each object is inserted into refchain by the _Py_AddToAllObjects call in _Py_NewReference, and removed from refchain by the _Py_ForgetReference call in _Py_Dealloc. _Py_ForgetReference performs an integrity check on the object being deallocated (op) to make sure that its neighbors in refchain recognize it. Specifically, _Py_ForgetReference verifies that the _ob_next pointer of the previous object in refchain (op->_ob_prev->_ob_next) points to op, and that the _ob_prev pointer of the next object in refchain (op->_ob_next->_ob_prev) points to op. If either of those conditions is false, the interpreter raises the fatal error I'm seeing. After mxDateTime_New pulls an mxDateTimeObject out of the free list, it calls _Py_NewReference on that object to transform it from a "conceptually deallocated" object to a "conceptually allocated" one. _Py_NewReference inserts the object into refchain. Later, when the object is being "conceptually deallocated", it should be removed from refchain with _Py_ForgetReference. The version of _Py_Dealloc that's active when Py_TRACE_REFS is enabled does this (_Py_Dealloc is the element of Py_DECREF that performs the actual destruction). _Py_Dealloc first calls _Py_ForgetReference to remove the object from refchain, then calls the object's destructor (op->ob_type->tp_dealloc). If WANT_SUBCLASSABLE_TYPES is not defined (it is not in my case), the destructor for mxDateTime_Type is mxDateTime_Free. So, if a DateTime object is deallocated normally, as a result of its reference count falling to zero, _Py_Dealloc is called on the object, which first removes it from refchain, then passes it to mxDateTime_Free. If a DateTime object is destroyed prematurely, as a result of invalid arguments to its destructor, the onError handler calls mxDateTime_Free, so the object is "conceptually deallocated" (placed in the free list), *but* the object is not removed from refchain. So if a refchain-membership-integrity-check is performed on the object in question or one of its immediate neighbors in refchain, that integrity check fails, leading to the fatal error. --- The solution is to 'Py_DECREF(...)' the object in the onError handler of its constructor, instead of passing the object directly to mxDateTime_Free. That change solves two problems: 1) It causes _Py_Dealloc to execute, which in turn executes _Py_ForgetReference, so the object is removed from refchain, as it should be. 2) At present, objects that are created successfully and later deallocated by normal reference count mechanics have a reference count of 0 when they enter the free list, whereas objects whose constructors abort their creation due to invalid arguments have a reference count of 1 when they enter the free list. Although AFAIK this doesn't cause an actual execution problem (because the object's reference count is *explicitly set to 1* rather than *incremented by 1* when the object is later "conceptually allocated" by _Py_NewReference), it is likely to confuse future maintainers and thereby lead to the introduction of an actual execution problem. I assume that if you agree that this is a reasonable solution, you'll want to apply the change not only to mxDateTime_FromDateAndTime, but to all similar constructors in mxDateTime.c. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From rj at maxxian.com Thu May 5 01:57:40 2005 From: rj at maxxian.com (RJ Juneau) Date: Fri Mar 31 16:34:13 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c5512e$f72798c0$6505a8c0@rjlaptop> I'm on the 30 day evaluation for mxodbc_zope_da. I'm getting the following error when I submit some queries: Error Type: KeyError Error Value: 'query' I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 with UCS4. The error seems to be caused by multiple rows being returned. I did see an earlier posting with the same error message. The response suggested a template error, but this is clearly not the case here. The additional evidence I've gathered so far: - I'm running the test directly from the ZSQL method, so there's no template involved. - If I use the same query with an additional "where" clause to ensure that only one row is returned, it works - If I use a value in the 'where' clause with no rows returned, it works - The same ZSQL query is being used on a Windows machine running Zope and the free ZODBC module without a problem - The query has been verified directly in mysql-client-browser Other info: - The database is MySQL 4.1.10A-0 - iODBC is the DB driver RJ Juneau -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050505/68d278bf/attachment-0139.htm From mal at egenix.com Thu May 5 12:37:43 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Mar 31 16:34:13 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c5512e$f72798c0$6505a8c0@rjlaptop> References: <000301c5512e$f72798c0$6505a8c0@rjlaptop> Message-ID: <4279E967.6010904@egenix.com> RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is 2.3.4 > with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 09:37:42 2005 From: rj at maxxian.com (RJ Juneau) Date: Fri Mar 31 16:34:13 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000101c5516f$3b96de90$6505a8c0@rjlaptop> More interesting info on the problem: If I execute the query directly in the "test" window of the base eGenix mxODBC Database Connection window, it works fine and returns the 20 lines expected. That could point to a problem in the rendering, which seems to be where the traceback ends. Note that within the same Zope system I also have an ODBC connection to a Sybase database, and I have successfully tested multi-line ZSQL queries there. This is the traceback: Time 2005/05/05 07:55:15.294 GMT-4 Exception Type KeyError Exception Value 'query' Traceback (innermost last): Module ZPublisher.Publish, line 101, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 39, in call_object Module Shared.DC.ZRDB.DA, line 337, in manage_test Module DocumentTemplate.DT_String, line 474, in __call__ Module DocumentTemplate.DT_In, line 602, in renderwb Module DocumentTemplate.DT_Var, line 219, in render KeyError: 'query' I don't think the following is an issue, but I'll include it for completeness.I am also getting the following iODBC warnings and errors in the Zope console log, which are related to the ODBC parameters being passed by iODBC. Note that these errors also appear for all of the successful queries. [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (Setup). [MYODBCUtilReadDataSource.c][205][ERROR] Unknown attribute (UsageCount). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Timeout). [MYODBCUtilReadDataSource.c][209][WARNING] Failed to get value for attribute (CP Reuse). As for the ZSQL snippet from the template... Since there's no template involved yet (I'm still testing directly from the ZSQL method), I assume you mean the SQL code? select h.host_name, s.system_name, s.system_handle, count(*) from terminal t, system_map s, host h where t.system_index = s.system_index and s.host_index = h.host_index group by s.system_name order by h.host_name Nothing complicated here. There are no parameters passed to the query. RJ -----Original Message----- From: M.-A. Lemburg [mailto:mal@egenix.com] Sent: May 5, 2005 5:38 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: Re: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ Juneau wrote: > I'm on the 30 day evaluation for mxodbc_zope_da. > > I'm getting the following error when I submit some queries: > > Error Type: KeyError > Error Value: 'query' > > I'm using 1.0.9 because the default Python install on my Linux is > 2.3.4 with UCS4. > > The error seems to be caused by multiple rows being returned. Could you provide the traceback that came along with the message ? It would also help, if you could provide the Z SQL method snippet that you have in the page template. > I did see an earlier posting with the same error message. The response > suggested a template error, but this is clearly not the case here. > > The additional evidence I've gathered so far: > > - I'm running the test directly from the ZSQL method, so there's no > template involved. > - If I use the same query with an additional "where" clause to ensure > that only one row is returned, it works > - If I use a value in the 'where' clause with no rows returned, it > works > - The same ZSQL query is being used on a Windows machine running Zope > and the free ZODBC module without a problem > - The query has been verified directly in mysql-client-browser > > Other info: > > - The database is MySQL 4.1.10A-0 > - iODBC is the DB driver > > RJ Juneau > > > > > > > > ---------------------------------------------------------------------- > -- > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 05 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 16:00:32 2005 From: charlie at egenix.com (Charlie Clark) Date: Fri Mar 31 16:34:13 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000101c5516f$3b96de90$6505a8c0@rjlaptop> References: <000101c5516f$3b96de90$6505a8c0@rjlaptop> Message-ID: <20050505150032.644.1@bepc.1115296715.fake> On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base eGenix > mxODBC Database Connection window, it works fine and returns the 20 > lines expected. That could point to a problem in the rendering, which > seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection to > a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From rj at maxxian.com Thu May 5 10:22:17 2005 From: rj at maxxian.com (RJ Juneau) Date: Fri Mar 31 16:34:13 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505150032.644.1@bepc.1115296715.fake> Message-ID: <000201c55175$75bcad10$6505a8c0@rjlaptop> At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 11:47:14 2005 From: rj at maxxian.com (RJ Juneau) Date: Fri Mar 31 16:34:13 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query Message-ID: <000301c55181$549be0e0$6505a8c0@rjlaptop> Charlie, I found a fix. Here it is in case anyone else runs into this. You were correct - the problem is in another part of Zope. Based on your feedback, I did a bit more searching and found something here: http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. html The problem appears to be in Zope versions after 2.7.0. I'm running 2.7.6, and the post indicates that it also happens in 2.7.4. The solution: Edit file /lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. There are two lines in the file that start with . Edit them as follows: Change first line to: Change second line to: Just to be after, I shut down Zope before I made the changes and restarted it after. Thanks for the help! RJ -----Original Message----- From: RJ Juneau [mailto:rj@maxxian.com] Sent: May 5, 2005 9:22 AM To: 'Charlie Clark' Cc: 'egenix-users@lists.egenix.com' Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query At this point, I'm still only trying to display the query results within the "Test" tab of the ZSQL method. I have not called the ZSQL method from any template yet on this system. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 9:01 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > More interesting info on the problem: > > If I execute the query directly in the "test" window of the base > eGenix mxODBC Database Connection window, it works fine and returns > the 20 lines expected. That could point to a problem in the rendering, > which seems to be where the traceback ends. > > Note that within the same Zope system I also have an ODBC connection > to a Sybase database, and I have successfully tested multi-line ZSQL > queries there. > > This is the traceback: > > Time 2005/05/05 07:55:15.294 GMT-4 > > Exception Type KeyError > Exception Value 'query' > > Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.ZRDB.DA, line 337, in manage_test > Module DocumentTemplate.DT_String, line 474, in __call__ > Module DocumentTemplate.DT_In, line 602, in renderwb > Module DocumentTemplate.DT_Var, line 219, in render > KeyError: 'query' This is definitely a problem in your DTML or some other part of Zope. Zope is raising a KeyError which means something is missing from a mapping. Are you trying to display the query itself? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From charlie at egenix.com Thu May 5 17:57:25 2005 From: charlie at egenix.com (Charlie Clark) Date: Fri Mar 31 16:34:13 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <20050505165725.3380.2@bepc.1115296715.fake> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From charlie at egenix.com Thu May 5 09:15:21 2005 From: charlie at egenix.com (Charlie Clark) Date: Fri Mar 31 16:34:13 2006 Subject: [Zope-DB] RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <000301c55181$549be0e0$6505a8c0@rjlaptop> References: <000301c55181$549be0e0$6505a8c0@rjlaptop> Message-ID: <000001c55185$41477730$6b00a8c0@fonacier.local> RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on your > feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/005362. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit them > as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequence > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-sta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results within > the "Test" tab of the ZSQL method. I have not called the ZSQL method > from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope > is raising a KeyError which means something is missing from a mapping. > Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________ Zope-DB mailing list Zope-DB@zope.org http://mail.zope.org/mailman/listinfo/zope-db From rj at maxxian.com Thu May 5 12:38:00 2005 From: rj at maxxian.com (RJ Juneau) Date: Fri Mar 31 16:34:13 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000001c55188$6b841eb0$6505a8c0@rjlaptop> I just double-checked. Zope-2.7.6-final. -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Thu May 5 12:49:16 2005 From: rj at maxxian.com (RJ Juneau) Date: Fri Mar 31 16:34:13 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query In-Reply-To: <20050505165725.3380.2@bepc.1115296715.fake> Message-ID: <000501c55189$fe149ba0$6505a8c0@rjlaptop> Charlie, The fix has only been applied for 2.7.7, 2.8b2. The info is in the original bug report which is closed and can be found here: http://www.zope.org/Collectors/Zope/1745 RJ -----Original Message----- From: Charlie Clark [mailto:charlie@egenix.com] Sent: May 5, 2005 10:57 AM To: RJ Juneau Cc: egenix-users@lists.egenix.com; zope-db@zope.org Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, query RJ, are you runing Zope 2.7.6 final? this was released recently and according to the collector on Zope.org should not be affected by this bug. If this is not the case then please take this up at Zope.org Charlie On 2005-05-05 at 16:47:14 [+0200], RJ Juneau wrote: > Charlie, > > I found a fix. Here it is in case anyone else runs into this. > > You were correct - the problem is in another part of Zope. Based on > your feedback, I did a bit more searching and found something here: > > > http://mail.zope.org/pipermail/zope-collector-monitor/2005-April/00536 > 2. > html > > The problem appears to be in Zope versions after 2.7.0. I'm running > 2.7.6, and the post indicates that it also happens in 2.7.4. > > The solution: > > Edit file Directory>/lib/python/Shared/DC/ZRDB/dtml/customDefaultReport.dtml. > > There are two lines in the file that start with . Edit > them as follows: > > Change first line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-previous-sequen > ce > -start-number;"> > > Change second line to: > href="&dtml-URL;&dtml-sequence-query;query_start=&dtml-next-sequence-s > ta > rt-number;"> > > Just to be after, I shut down Zope before I made the changes and > restarted it after. > > Thanks for the help! > > RJ > > -----Original Message----- > From: RJ Juneau [mailto:rj@maxxian.com] > Sent: May 5, 2005 9:22 AM > To: 'Charlie Clark' > Cc: 'egenix-users@lists.egenix.com' > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > At this point, I'm still only trying to display the query results > within the "Test" tab of the ZSQL method. I have not called the ZSQL > method from any template yet on this system. > > -----Original Message----- > From: Charlie Clark [mailto:charlie@egenix.com] > Sent: May 5, 2005 9:01 AM > To: RJ Juneau > Cc: egenix-users@lists.egenix.com > Subject: RE: [egenix-users] mxodbc_zope_da_1.0.9 problem: KeyError, > query > > > > On 2005-05-05 at 14:37:42 [+0200], RJ Juneau wrote: > > > > > > More interesting info on the problem: > > > > If I execute the query directly in the "test" window of the base > > eGenix mxODBC Database Connection window, it works fine and returns > > the 20 lines expected. That could point to a problem in the > > rendering, > > > which seems to be where the traceback ends. > > > > Note that within the same Zope system I also have an ODBC connection > > to a Sybase database, and I have successfully tested multi-line ZSQL > > queries there. > > > > This is the traceback: > > > > Time 2005/05/05 07:55:15.294 GMT-4 > > > > Exception Type KeyError > > Exception Value 'query' > > > > Traceback (innermost last): > > Module ZPublisher.Publish, line 101, in publish > > Module ZPublisher.mapply, line 88, in mapply > > Module ZPublisher.Publish, line 39, in call_object > > Module Shared.DC.ZRDB.DA, line 337, in manage_test > > Module DocumentTemplate.DT_String, line 474, in __call__ > > Module DocumentTemplate.DT_In, line 602, in renderwb > > Module DocumentTemplate.DT_Var, line 219, in render > > KeyError: 'query' > > This is definitely a problem in your DTML or some other part of Zope. > Zope is raising a KeyError which means something is missing from a > mapping. Are > you trying to display the query itself? > > Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: This mail is marked as non spam by Pinjo revealer, spamfilter technology. ( http://www.pinjo.nl ) From rj at maxxian.com Fri May 6 11:50:09 2005 From: rj at maxxian.com (RJ Juneau) Date: Fri Mar 31 16:34:14 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC Message-ID: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Still on eval for the product. I cannot get a stable connection to Sybase via the iODBC drivers. - The Sybase ODBC connection - including a query - have been verified at the iODBC level. - The setup is already working well for ODBC connection to MySQL. Symptoms include: - If I click on "Open Connection", it still comes back with "Connection Closed" when I go to a ZSQL method - Using 'Connect on Demand' is not working either. - Clicking "Open Connection" gives me the following error: Connection string: DSN=lixbox_sybase; UID=sa; PWD=XXXXXXX Connection pool entry: 0 Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection rejected by data source', 7952) The odbc.ini definition for DSN "lixbox_sybase" is as follows: [lixbox_sybase] JetFix = No NoRowSetSizeLimit = No Description = Test connection to listbox Options = LIXBOX DSQUERY = SQLSERVER TDSHOST = lixbox TDSPORT = 5000 TDSVER = 5.0 SQLSERVER_CATALOG = N CURSOR_SENSITIVITY = LOW UserName = sa Password = XXXXXXXX ServerType = Sybase 10/11/12 Driver = /opt/openlink/lib/sql_mt_lt.so Database = pubs2 ReadOnly = no NoAutoCommit = No NoLoginBox = No FetchBufferSize = 60 Other relevant data: - Connecting via OpenLink's iODBC - Zope 2.7.6-final - Python 2.3.4 - Connection to Sybase has been successfully tested with iODBC, including issuing a query - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC connection RJ Juneau Chief Technology Officer Maxxian Integration Inc. 155 Westhampton Drive Thornhill, Ontario Canada L4J 7X2 E-mail: rj@maxxian.com Phone: +1 905 482 9429 Cell: +1 416 897 6682 Toll free: +1 866 758 9161 Fax: +1 647 722 2038 -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20050506/aef33361/attachment-0139.htm From mal at egenix.com Fri May 6 18:27:37 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Mar 31 16:34:14 2006 Subject: [egenix-users] mxodbc_zope_da_1.0.9 problem: Unable to connect with Sybase via ODBC In-Reply-To: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> References: <000c01c5524a$e6b29d10$7005a8c0@rjlaptop> Message-ID: <427B8CE9.1010601@egenix.com> RJ Juneau wrote: > Still on eval for the product. > > I cannot get a stable connection to Sybase via the iODBC drivers. > > - The Sybase ODBC connection - including a query - have been verified at > the iODBC level. > - The setup is already working well for ODBC connection to MySQL. > > Symptoms include: > > - If I click on "Open Connection", it still comes back with "Connection > Closed" when I go to a ZSQL method > - Using 'Connect on Demand' is not working either. > - Clicking "Open Connection" gives me the following error: > > Connection string: DSN=lixbox_sybase; > UID=sa; > PWD=XXXXXXX Try writing the connection string on one line and without whitespace. ODBC drivers sometimes have problems with this. > Connection pool entry: 0 > Error message: ('08004', 0, '[OpenLink][ODBC][Driver]Connection > rejected by data source', 7952) This is a generic error that relates to authentication or firewall problems. It is possible that turning on ODBC tracing the ODBC manager will give more clues as to the real cause of the problem. > The odbc.ini definition for DSN "lixbox_sybase" is as follows: > > [lixbox_sybase] > JetFix = No > NoRowSetSizeLimit = No > Description = Test connection to listbox > Options = LIXBOX > DSQUERY = SQLSERVER > TDSHOST = lixbox > TDSPORT = 5000 > TDSVER = 5.0 > SQLSERVER_CATALOG = N > CURSOR_SENSITIVITY = LOW > UserName = sa > Password = XXXXXXXX > ServerType = Sybase 10/11/12 > Driver = /opt/openlink/lib/sql_mt_lt.so > Database = pubs2 > ReadOnly = no > NoAutoCommit = No > NoLoginBox = No > FetchBufferSize = 60 > > > Other relevant data: > - Connecting via OpenLink's iODBC > - Zope 2.7.6-final > - Python 2.3.4 > - Connection to Sybase has been successfully tested with iODBC, > including issuing a query > - Zope/mxodbc_zope_da/iODBC successfully tested for MySQL ODBC > connection > > > > RJ Juneau > Chief Technology Officer > Maxxian Integration Inc. > 155 Westhampton Drive > Thornhill, Ontario > Canada L4J 7X2 > E-mail: rj@maxxian.com > Phone: +1 905 482 9429 > Cell: +1 416 897 6682 > Toll free: +1 866 758 9161 > Fax: +1 647 722 2038 > > > > > > ------------------------------------------------------------------------ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > > List subscription management: > https://www.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 06 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From calisp at gmail.com Sun May 15 23:49:03 2005 From: calisp at gmail.com (calisp@gmail.com) Date: Fri Mar 31 16:34:14 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK Message-ID: Hi, I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the following error... 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the last phase of a two-phase commit. This shouldn't happen. Traceback (most recent call last): File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one jar.tpc_finish(self) File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish try: self._finish() File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could not perform COMMIT or ROLLBACK', 1023) What could be causing this? Can I get the mxODBCZopeDA source from somewhere? It would make debugging this much easier. Thanks, Calisp. From mal at egenix.com Mon May 16 13:52:12 2005 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Mar 31 16:34:14 2006 Subject: [egenix-users] Could not perform COMMIT or ROLLBACK In-Reply-To: References: Message-ID: <42887B5C.4010109@egenix.com> calisp@gmail.com wrote: > Hi, > > I'm using egenix-mxodbc-zopeda-1.0.9.linux-i686-py2.3ucs4 with > unixODBC-2.2.8, Zope 2.7.5 and python 2.3.4. Every so often I get the > following error... > > 2005-05-15T21:41:18 PANIC(300) ZODB A storage error occurred in the > last phase of a two-phase commit. This shouldn't happen. > Traceback (most recent call last): > File "/opt/Zope-2.7/lib/python/ZODB/Transaction.py", line 363, in _finish_one > jar.tpc_finish(self) > File "/opt/Zope-2.7/lib/python/Shared/DC/ZRDB/TM.py", line 59, in tpc_finish > try: self._finish() > File "Products/mxODBCZopeDA/ZopeDA.py", line 1036, in _finish > File "Products/mxODBCZopeDA/ZopeDA.py", line 948, in errorhandler > ProgrammingError: ('HY000', 0, '[unixODBC][FreeTDS][SQL Server]Could > not perform COMMIT or ROLLBACK', 1023) You should have a look at the database logs to see what prevented the commit from being completed. > What could be causing this? Hard to say: mxODBCZopeDA is trying to commit the transaction, but the driver or database failed to complete the request. The above error was generated by the ODBC driver. This could be network or DNS problems, or be related to a bug in FreeTDS (which is getting more stable with every new release, but should still be considered beta quality software at the moment). > Can I get the mxODBCZopeDA source from > somewhere? It would make debugging this much easier. Getting the source is not an option and won't help much either since the source of the problem is not mxODBCZopeDA. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 16 2005) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! ::::